19 Mar
2006
19 Mar
'06
20:36
Greeting I've got a kernel module that contains something like this: while(loop) { take semaphore A do some I/O on the PCI bus give semaphore A } This loop is launched by a worker thread Meanwhile, I've got write() mapped into a module function like this: my_write() { take semaphore A write to the PCI pus give semaphore A } The problem is that my_write() can never get the A semaphore. The loop is too tight perhaps. Or maybe the system call has a lower priority than the kernel's worker thread. Other than using flags, is there some easy way to fix this? TIA&Cheers