Mailinglist Archive: opensuse-programming (85 mails)
| < Previous | Next > |
System call priority
- From: Pierre Patino <pierre@xxxxxxxxxx>
- Date: Sun, 19 Mar 2006 12:36:08 -0800
- Message-id: <441DC0B8.2040906@xxxxxxxxxx>
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
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
| < Previous | Next > |