cvs commit: src/lib/libthread_xu/thread thr_cond.c thr_private.h thr_umtx.c thr_umtx.h

Matthew Dillon dillon at
Mon Apr 14 13:14:30 PDT 2008

dillon      2008/04/14 13:12:42 PDT

DragonFly src repository

  Modified files:
    lib/libthread_xu/thread thr_cond.c thr_private.h thr_umtx.c 
  Fix some issues in libthread_xu's condvar implementation.
  * Non-broadcast mode is not guaranteed to signal just one waiter, loosen
    it up a bit to close race conditions and signal more if necessary.
  * Clean up the condition structure.  Do not try to track non-broadcast
    wakeups.  Do not try to block waiting for individual wakeups... the
    spec does not require it and, in fact, doing so can create more
    problems then it solves.
  * Load oldseq from cv->c_seqno *BEFORE* releasing the passed mutex to
    close a race.  The mutex is there precisely so that userland can
    guarantee that no race will occur between waiter and signaler.
  Reported-by: Jordan Gordeev <jgordeev at>,
               "Simon 'corecode' Schubert" <corecode at xxxxxxxxxxxx>
  Revision  Changes    Path
  1.11      +32 -35    src/lib/libthread_xu/thread/thr_cond.c
  1.18      +1 -1      src/lib/libthread_xu/thread/thr_private.h
  1.4       +14 -3     src/lib/libthread_xu/thread/thr_umtx.c
  1.5       +1 -1      src/lib/libthread_xu/thread/thr_umtx.h

More information about the Commits mailing list