public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Difference wait_event_interruptible and interruptible_wait_on
@ 2004-11-24 12:05 Hendrik Wiese
  2004-11-24 13:30 ` Davide Rossetti
  0 siblings, 1 reply; 5+ messages in thread
From: Hendrik Wiese @ 2004-11-24 12:05 UTC (permalink / raw)
  To: LKLM

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Difference wait_event_interruptible and interruptible_wait_on
  2004-11-24 12:05 Difference wait_event_interruptible and interruptible_wait_on Hendrik Wiese
@ 2004-11-24 13:30 ` Davide Rossetti
  2004-11-24 13:42   ` Hendrik Wiese
  0 siblings, 1 reply; 5+ messages in thread
From: Davide Rossetti @ 2004-11-24 13:30 UTC (permalink / raw)
  To: Hendrik Wiese; +Cc: LKLM

Hendrik Wiese wrote:

> 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?

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Difference wait_event_interruptible and interruptible_wait_on
  2004-11-24 13:30 ` Davide Rossetti
@ 2004-11-24 13:42   ` Hendrik Wiese
  2004-11-24 14:24     ` Arjan van de Ven
  0 siblings, 1 reply; 5+ messages in thread
From: Hendrik Wiese @ 2004-11-24 13:42 UTC (permalink / raw)
  To: Davide Rossetti; +Cc: LKLM

Davide Rossetti wrote:

> Hendrik Wiese wrote:
>
>> 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?
>
>
> 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
>
>
Thanks for your reply.

So what should such a condition be? What should be put there?

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Difference wait_event_interruptible and interruptible_wait_on
  2004-11-24 13:42   ` Hendrik Wiese
@ 2004-11-24 14:24     ` Arjan van de Ven
  2004-11-25  8:37       ` Hendrik Wiese
  0 siblings, 1 reply; 5+ messages in thread
From: Arjan van de Ven @ 2004-11-24 14:24 UTC (permalink / raw)
  To: Hendrik Wiese; +Cc: Davide Rossetti, LKLM

On Wed, 2004-11-24 at 14:42 +0100, Hendrik Wiese wrote:

> 
> 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 ?



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Difference wait_event_interruptible and interruptible_wait_on
  2004-11-24 14:24     ` Arjan van de Ven
@ 2004-11-25  8:37       ` Hendrik Wiese
  0 siblings, 0 replies; 5+ messages in thread
From: Hendrik Wiese @ 2004-11-25  8:37 UTC (permalink / raw)
  To: Arjan van de Ven; +Cc: Davide Rossetti, LKLM

Arjan van de Ven wrote:

>On Wed, 2004-11-24 at 14:42 +0100, Hendrik Wiese wrote:
>
>  
>
>>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.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2004-11-25  9:36 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-11-24 12:05 Difference wait_event_interruptible and interruptible_wait_on Hendrik Wiese
2004-11-24 13:30 ` Davide Rossetti
2004-11-24 13:42   ` Hendrik Wiese
2004-11-24 14:24     ` Arjan van de Ven
2004-11-25  8:37       ` Hendrik Wiese

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox