Re: [patch] possible SMP races all over the place in wait_event

Jeremy Fitzhardinge (jeremy@goop.org)
Tue, 17 Aug 1999 16:19:15 -0700 (PDT)


On 17-Aug-99 Andrea Arcangeli wrote:
> On Mon, 16 Aug 1999, Linus Torvalds wrote:
>
>>So about half of your patch is unnecessary, but the latter half looks
>>valid.
>
> I checked the 2.3.13 kernel sources wrt the wait_event SMP race.
> Here it is a fix against 2.3.13:

Wouldn't it be cleaner to define a macro in linux/sched.h

#define SET_TASK_STATE(s) do { current->state = (s); mb(); } while(0)

and replace all the explicit assignments with the macro?

J

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