Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 22 Oct 2008 18:07:37 +0000 (UTC)
From:      Alfred Perlstein <alfred@FreeBSD.org>
To:        cvs-src-old@freebsd.org
Subject:   cvs commit: src/lib/libthr/thread thr_cond.c thr_private.h src/sys/kern kern_umtx.c
Message-ID:  <200810221816.m9MIGcNV058326@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
alfred      2008-10-22 18:07:37 UTC

  FreeBSD src repository

  Modified files:        (Branch: RELENG_6)
    lib/libthr/thread    thr_cond.c thr_private.h 
    sys/kern             kern_umtx.c 
  Log:
  SVN rev 184172 on 2008-10-22 18:07:37Z by alfred
  
  Close races in the pthread_condvar implementation in 6.x, note that
  7.x and beyond have very different implementations and these fixes
  do not apply.
  
  In the kernel:
  
    Move the flag UQF_UMTXQ from the thread's td_flags where it was
    unlocked to the umtx_q struct where it now has locking.
  
    Nuke the UMTX_DYNAMIC_SHARED define while here, it's unused and
    complex.
  
    Refactor do_wait so that if we get a signal or timeout AND woken
    up, we forward the wakeup to any other waiters pending to avoid
    a missed wakeup.
  
  In userland:
  
    Bring over some fixes from DragonFlyBSD for the userland part of
    pthread_condvars, basically relax the consistency on the number of
    waiters and signals pending because it was both too strict and
    incorrect causing lost wakeups.
  
  Reviewed by: davidxu
  Approved by: re
  
  Revision  Changes    Path
  1.16.2.1  +36 -35    src/lib/libthr/thread/thr_cond.c
  1.47.2.4  +1 -1      src/lib/libthr/thread/thr_private.h
  1.33.2.5  +34 -115   src/sys/kern/kern_umtx.c



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200810221816.m9MIGcNV058326>