Re: wait_queue_t is fundamentally broken; need pthread_cond_t

From: Peter Osterlund (petero2_at_telia.com)
Date: 02/28/04

  • Next message: Adrian Bunk: "[2.6 patch] remove unused drivers/net/wan/lmc/lmc_ver.h"
    To: Ralph Campbell <ralphc@nikto.sfbay.sun.com>
    Date:	28 Feb 2004 08:54:29 +0100
    
    

    Ralph Campbell <ralphc@nikto.sfbay.sun.com> 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@telia.com
    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@vger.kernel.org
    More majordomo info at  http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at  http://www.tux.org/lkml/
    

  • Next message: Adrian Bunk: "[2.6 patch] remove unused drivers/net/wan/lmc/lmc_ver.h"

    Relevant Pages

    • Re: [parisc-linux] Re: [PATCH 3/9] mm: parisc pte atomicity
      ... using your own tmpalias area sounds much better than getting ... I've simply not wrapped my head around the races, ... it looks like we agree that my patch is necessary and valid as is; ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: filesystem bug?
      ... and it happens both on SCSI disk and ... <Adaptec aic7899 Ultra160 SCSI adapter> ... >such as races between sync and unmount, ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: [SCHED] wrong priority calc - SIMPLE test case
      ... 2 to begin treating all new sleep as noninteractive (stern ... These are all /proc settings at the moment, so I can set set my starvation ... pain threshold from super duper desktop to just as fair as a ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: Post-halloween doc updates.
      ... > | have at least one working method of putting a laptop to sleep? ... > I have no problem putting the laptop to sleep. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: High CPU temp on Athlon MP w/ recent 2.6 kernels
      ... >haven't got time to contact devs with that, but I do know for sure that ... >AFAIK my xmms uses OSS emulation and rhytmbox is native alsa.) ... >easily we go into sleep. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)