]> git.ipfire.org Git - thirdparty/glibc.git/commit - nptl/pthread_barrierattr_setpshared.c
New pthread_barrier algorithm to fulfill barrier destruction requirements.
authorTorvald Riegel <triegel@redhat.com>
Wed, 24 Jun 2015 12:37:32 +0000 (14:37 +0200)
committerTorvald Riegel <triegel@redhat.com>
Fri, 15 Jan 2016 20:20:34 +0000 (21:20 +0100)
commitb02840bacdefde318d2ad2f920e50785b9b25d69
treedcf8ee01d1e4bdb42686d890c1d00bf3249fbcaf
parenta3e5b4feeb54cb92657ec2bc6d9be1fcef9e8575
New pthread_barrier algorithm to fulfill barrier destruction requirements.

The previous barrier implementation did not fulfill the POSIX requirements
for when a barrier can be destroyed.  Specifically, it was possible that
threads that haven't noticed yet that their round is complete still access
the barrier's memory, and that those accesses can happen after the barrier
has been legally destroyed.
The new algorithm does not have this issue, and it avoids using a lock
internally.
18 files changed:
ChangeLog
nptl/DESIGN-barrier.txt [deleted file]
nptl/Makefile
nptl/lowlevelbarrier.sym [deleted file]
nptl/pthread_barrier_destroy.c
nptl/pthread_barrier_init.c
nptl/pthread_barrier_wait.c
nptl/pthread_barrierattr_setpshared.c
nptl/tst-barrier4.c
nptl/tst-barrier5.c [new file with mode: 0644]
sysdeps/nptl/internaltypes.h
sysdeps/sparc/nptl/pthread_barrier_destroy.c [deleted file]
sysdeps/sparc/nptl/pthread_barrier_init.c [deleted file]
sysdeps/sparc/nptl/pthread_barrier_wait.c [deleted file]
sysdeps/sparc/sparc32/pthread_barrier_wait.c
sysdeps/sparc/sparc32/sparcv9/pthread_barrier_wait.c
sysdeps/unix/sysv/linux/i386/pthread_barrier_wait.S [deleted file]
sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S [deleted file]