Difference wait_event_interruptible and interruptible_wait_on
Hello,
I'm porting a device driver from 2.2.14 to 2.6.7 and I got some problems doing this...
one of them is the following:
I know that a call to interruptible_wait_on puts a process into sleep state and that wait_event_interruptible does the same. But the difference is that wait_event_interruptible needs a condition to pass to wake up the processes. I do not need that mechanism since I wake up the processes at other places inside my driver with wake_up_interruptible calls. So how do I get a function similar to interruptible_wait_on where no condition is needed using kernel 2.6?
Thanks a lot and please CC me, 'cos I haven't subscribed to the LKML yet.
Kind regards,
Hendrik
Quoted 6 lines · Hendrik Wiese
Hello,
I'm porting a device driver from 2.2.14 to 2.6.7 and I got some problems doing this...
one of them is the following:
I know that a call tointerruptible_wait_onputs a process into sleep state and thatwait_event_interruptibledoes the same. But the difference is thatwait_event_interruptibleneeds a condition to pass to wake up the processes. I do not need that mechanism since I wake up the processes at other places inside my driver withwake_up_interruptiblecalls. So how do I get a function similar tointerruptible_wait_onwhere no condition is needed using kernel 2.6?
I did not check, so maybe I'm wrong, anyway the condition wait_event_interruptible is used to avoid the race window between the time you decide to call it and the time the process is actually made to sleep and ready to be woken up. regards
Quoted 4 lines · Davide Rossetti
Quoted 2 lines · Hendrik Wiese
Hello,
Quoted 10 lines
Quoted 4 lines
I'm porting a device driver from 2.2.14 to 2.6.7 and I got some problems doing this...
one of them is the following:
I know that a call tointerruptible_wait_onputs a process into sleep state and thatwait_event_interruptibledoes the same. But the difference is thatwait_event_interruptibleneeds a condition to pass to wake up the processes. I do not need that mechanism since I wake up the processes at other places inside my driver withwake_up_interruptiblecalls. So how do I get a function similar tointerruptible_wait_onwhere no condition is needed using kernel 2.6?I did not check, so maybe I'm wrong, anyway the condition
wait_event_interruptibleis used to avoid the race window between the time you decide to call it and the time the process is actually made to sleep and ready to be woken up. regards
Thanks for your reply.
So what should such a condition be? What should be put there?
Quoted 2 lines · Hendrik Wiese
So what should such a condition be? What should be put there?
depends on your code.. do you have an URL to your driver source so that people can see what you're asking ?
Quoted 4 lines · Arjan van de Ven
On Wed, 2004-11-24 at 14:42 +0100, Hendrik Wiese wrote:
Quoted 11 lines
Quoted 3 lines
So what should such a condition be? What should be put there?
depends on your code.. do you have an URL to your driver source so that people can see what you're asking ?
It is a proprietary driver developed for access to passive and active modules inside a vme-rack. Active modules can communicate with each other over an IP layer created by the driver on top of the VME architecture (dual port ram, Tundra Universe II PCI-VME Bridge) and on the other hand a device for communication between active and passive modules. I don't know if I may make the source code public, 'cos it is property of my employer. I have to communicate this. I know there is something called GPL and I also know what it means, but I fear my oppinion won't be heard by my employer. Well... it's worth a try.