Здравствуйте, TheBeard, Вы писали:
TB>If the resource is located in kernel, it should be guarded by kernel
TB>spinlock, I think. Access operation from userspace must wait with this
TB>spinlock.
TB>If you decribe yor problem more detailed (what is the resource, what are
TB>resource operations from userspace and kernel, for example) other
TB>suggestions may comes.
TB>BTW, preferred language in this forum is Russian, so please forgive me
TB>my terrible English.
TB>zifo wrote:
>> I have a resource which must be manipulated through semaphores from user space and from kernel space ... I think the only way is to use a SysV IPC semaphore ...
>> but it seems I can't use it from my kernel module .. the kernel doesn't export any of its functions ...
Actually, resource is an ordinary node file (file located in /dev directory). There can be processes which open and manipulate the mentioned file and drivers which do the same thing, but at every moment only one module (read driver or process) can work with it. So, I must synchronize this process ...
Is there any way to synchronize the same resource from kernel space and user space ?
This is the main question