Re: wait_queue_t is fundamentally broken; need pthread_cond_t

From: Peter Osterlund
Date: Sat Feb 28 2004 - 02:56:05 EST


Ralph Campbell <ralphc@xxxxxxxxxxxxxxxxxxx> writes:

> [1.] One line summary of the problem:
> wait_queue_t is fundamentally broken; need pthread_cond_t
>
> [2.] Full description of the problem/report:
> I hate to be the bearer of bad news but the programming model
> for using wait queues is fundamentally broken and should be
> replaced with something like pthread_cond_t. Here is an example
> taken from chapter 5 of "Linux Device Drivers", 2nd edition,
> by Rubini & Corbet:

I suggest you read the "Going to Sleep Without Races" section in
chapter 9 of that book if you want to understand why you are wrong.

--
Peter Osterlund - petero2@xxxxxxxxx
http://w1.894.telia.com/~u89404340
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/