Re: [patch] sleep_on() done with cli(), NetROM, 2.2.2

Matthew Kirkwood (weejock@ferret.lmh.ox.ac.uk)
Tue, 2 Mar 1999 21:14:01 +0000 (GMT)


On Tue, 2 Mar 1999, Linus Torvalds 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);

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

They're not routines or inlines, but #defines.

Of course, that could make for some potentially
ugly code expansions...

Matthew.

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