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

Matthew Dillon dillon at crater.dragonflybsd.org
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 
                            thr_umtx.h 
  Log:
  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 dir.bg>,
               "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


http://www.dragonflybsd.org/cvsweb/src/lib/libthread_xu/thread/thr_cond.c.diff?r1=1.10&r2=1.11&f=u
http://www.dragonflybsd.org/cvsweb/src/lib/libthread_xu/thread/thr_private.h.diff?r1=1.17&r2=1.18&f=u
http://www.dragonflybsd.org/cvsweb/src/lib/libthread_xu/thread/thr_umtx.c.diff?r1=1.3&r2=1.4&f=u
http://www.dragonflybsd.org/cvsweb/src/lib/libthread_xu/thread/thr_umtx.h.diff?r1=1.4&r2=1.5&f=u





More information about the Commits mailing list