diff options
author | jasone <jasone@FreeBSD.org> | 2001-06-27 11:41:15 +0000 |
---|---|---|
committer | jasone <jasone@FreeBSD.org> | 2001-06-27 11:41:15 +0000 |
commit | 22f14eaadfe2f54e3d94f9a549dbb55a301222e1 (patch) | |
tree | 463b1f41916ef7a7abac0e3d8230ce498dcde63c /lib/libc_r/uthread/uthread_shutdown.c | |
parent | 97220dbd1ea90cd0e4fbc824e176960ac2efe949 (diff) | |
download | FreeBSD-src-22f14eaadfe2f54e3d94f9a549dbb55a301222e1.zip FreeBSD-src-22f14eaadfe2f54e3d94f9a549dbb55a301222e1.tar.gz |
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.
Diffstat (limited to 'lib/libc_r/uthread/uthread_shutdown.c')
0 files changed, 0 insertions, 0 deletions