Messages in this thread | | | Subject | Re: [patch] sleep_on() done with cli(), NetROM, 2.2.2 | Date | Wed, 3 Mar 1999 09:07:50 +0100 (MET) | From | (Rogier Wolff) |
| |
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/
| |