Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 27 Jun 2001 04:41:16 -0700 (PDT)
From:      Jason Evans <jasone@FreeBSD.org>
To:        cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   cvs commit: src/lib/libc_r/uthread pthread_private.h uthread_find_thread.c uthread_join.c
Message-ID:  <200106271141.f5RBfGm89143@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
jasone      2001/06/27 04:41:16 PDT

  Modified files:
    lib/libc_r/uthread   pthread_private.h uthread_find_thread.c 
                         uthread_join.c 
  Log:
  Fix a race condition in pthread_join().  All of the following must occur
  atomically:
  
  1) Search _thread_list for the thread to join.
  2) Search _dead_list for the thread to join.
  3) Set the running thread as the joiner.
  
  While we're at it, fix a race in the case where multiple threads try to
  join on the same thread.  POSIX says that the behavior of multiple joiners
  is undefined, but the fix is cheap as a result of the other fix.
  
  Revision  Changes    Path
  1.58      +1 -2      src/lib/libc_r/uthread/pthread_private.h
  1.7       +1 -33     src/lib/libc_r/uthread/uthread_find_thread.c
  1.18      +54 -16    src/lib/libc_r/uthread/uthread_join.c


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




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