lkml.org 
[lkml]   [1999]   [Mar]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [patch] sleep_on() done with cli(), NetROM, 2.2.2
Date
From
Linus Torvalds wrote:
>
>
> On Tue, 2 Mar 1999, Ingo Molnar wrote:
> >
> > i've attached a draft 'waiting for events' framework, and i've converted
> > printk.c to the 'new' usage. This now is both raceless and doesnt lock up
> > on SMP. The user-visible interface is:
> >
> > wait_event(wq, condition);
> > or
> > wait_async_event(wq, condition);
> > or
> > error = wait_event_interruptible(wq, condition);
> > or
> > error = wait_async_event_interruptible(wq, condition);
>
> No, you can't do it this way.
>
> "condition" has to be _recalculated_ at each point - there's no point
> sending in a stale condition to the routine, as it has to be recalculated
> after yoiu've added yourself to the wait-queues.

Yes, these need to be macros.

Roger.


--
** R.E.Wolff@BitWizard.nl ** http://www.BitWizard.nl/ ** +31-15-2137555 **
*-- BitWizard writes Linux device drivers for any device you may have! --*
* Never blow in a cat's ear because if you do, usually after three or *
* four times, they will bite your lips! And they don't let go for at *
* least a minute. -- Lisa Coburn, age 9

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:50    [W:0.055 / U:0.272 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site