about summary refs log tree commit diff
path: root/ChangeLog
diff options
context:
space:
mode:
authorTorvald Riegel <triegel@redhat.com>2014-12-04 14:12:23 +0100
committerTorvald Riegel <triegel@redhat.com>2015-07-10 13:47:09 +0200
commita2f0363f817a58c4d3f439aa515a3b1d73efde36 (patch)
tree6204a1208c1421d573e8c91e4523376a18e1dd60 /ChangeLog
parent203c1a898dd2e281eae30f3c57ceb8d4a50b00f4 (diff)
downloadglibc-a2f0363f817a58c4d3f439aa515a3b1d73efde36.tar.gz
glibc-a2f0363f817a58c4d3f439aa515a3b1d73efde36.tar.xz
glibc-a2f0363f817a58c4d3f439aa515a3b1d73efde36.zip
Add and use new glibc-internal futex API.
This adds new functions for futex operations, starting with wait,
abstimed_wait, reltimed_wait, wake.  They add documentation and error
checking according to the current draft of the Linux kernel futex manpage.

Waiting with absolute or relative timeouts is split into separate functions.
This allows for removing a few cases of code duplication in pthreads code,
which uses absolute timeouts; also, it allows us to put platform-specific
code to go from an absolute to a relative timeout into the platform-specific
futex abstractions..

Futex operations that can be canceled are also split out into separate
functions suffixed by "_cancelable".

There are separate versions for both Linux and NaCl; while they currently
differ only slightly, my expectation is that the separate versions of
lowlevellock-futex.h will eventually be merged into futex-internal.h
when we get to move the lll_ functions over to the new futex API.
Diffstat (limited to 'ChangeLog')
-rw-r--r--ChangeLog70
1 files changed, 70 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 91c963200a..a8bab48b86 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,73 @@
+2015-07-10  Torvald Riegel  <triegel@redhat.com>
+
+	* sysdeps/nptl/futex-internal.h: New file.
+	* sysdeps/nacl/futex-internal.h: New file.
+	* sysdeps/unix/sysv/linux/futex-internal.h: New file.
+	* nptl/allocatestack.c (setxid_mark_thread): Use futex wrappers with
+	error checking.
+	(setxid_unmark_thread): Likewise.
+	(__nptl_setxid): Likewise.
+	(__wait_lookup_done): Likewise.
+	* nptl/cancellation.c (__pthread_disable_asynccancel): Likewise.
+	* nptl/nptl-init.c (sighandler_setxid): Likewise.
+	* nptl/pthread_create.c (START_THREAD_DEFN): Likewise.
+	* nptl/pthread_once.c (clear_once_control): Likewise.
+	(__pthread_once_slow): Likewise.
+	* nptl/unregister-atfork.c (__unregister_atfork): Likewise.
+	* sysdeps/nacl/exit-thread.h (__exit_thread): Likewise.
+	* sysdeps/nptl/aio_misc.h (AIO_MISC_NOTIFY, AIO_MISC_WAIT): Likewise.
+	* sysdeps/nptl/fork.c (__libc_fork): Likewise.
+	* sysdeps/nptl/gai_misc.h (GAI_MISC_NOTIFY, GAI_MISC_WAIT): Likewise.
+	* nptl/pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock_slow):
+	Likewise.
+	(__pthread_rwlock_rdlock): Likewise.
+	* nptl/pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock):
+	Likewise.
+	* nptl/pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock):
+	Likewise.
+	* nptl/pthread_rwlock_tryrdlock.c (__pthread_rwlock_tryrdlock):
+	Likewise.
+	* nptl/pthread_rwlock_unlock.c (__pthread_rwlock_unlock): Likewise.
+	* nptl/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock_slow:
+	Likewise.
+	* nptl/pthread_rwlock_init (__pthread_rwlock_init): Remove
+	__ASSUME_PRIVATE_FUTEX check.
+	* nptl/pthread_rwlockattr_setpshared (pthread_rwlockattr_setpshared):
+	Check that shared futexes are supported.
+	* nptl/pthread_barrier_wait.c (pthread_barrier_wait): Use futex
+	wrappers with error checking.
+	* nptl/pthread_barrier_init.c (pthread_barrier_init): Add comments,
+	remove attribute sanity check and __ASSUME_PRIVATE_FUTEX check.
+	* nptl/pthread_barrierattr_setpshared.c
+	(pthread_barrierattr_setpshared): Check that shared futexes are
+	supported.
+	* nptl/pthread_condattr_setpshared.c (pthread_condattr_setpshared):
+	Likewise.
+	* nptl/pthread_mutexattr_setpshared.c (pthread_mutexattr_setpshared):
+	Likewise.
+	* nptl/sem_init.c (futex_private_if_supported): Remove.
+	(__new_sem_init): Adapt and check that shared futexes are supported.
+	* nptl/sem_open.c (sem_open): Likewise.
+	* nptl/sem_post.c (futex_wake): Remove.
+	* nptl/sem_waitcommon.c (futex_abstimed_wait, futex_wake): Remove.
+	(do_futex_wait): Use futex wrappers with error checking.
+	* nptl/sem_wait.c: Include lowlevellock.h.
+	* sysdeps/sparc/nptl/pthread_barrier_init.c (__pthread_barrier_init):
+	Use futex_supports_pshared.
+	* sysdeps/sparc/nptl/pthread_barrier_wait.c (pthread_barrier_wait):
+	Use futex wrappers with error checking.
+	* sysdeps/sparc/sparc32/pthread_barrier_wait.c (pthread_barrier_wait):
+	Likewise.
+	* sysdeps/sparc/sparc32/sem_init.c (futex_private_if_supported): Remove.
+	* sysdeps/sparc/sparc32/sem_post.c (futex_wake): Likewise.
+	* sysdeps/sparc/sparc32/sem_open.c (sem_open): Use FUTEX_SHARED.
+	* sysdeps/sparc/sparc32/sem_waitcommon.c (futex_abstimed_wait): Remove.
+	(futex_wake): Likewise.
+	(sem_assume_only_signals_cause_futex_EINTR): Likewise.
+	(do_futex_wait): Use futex wrappers with error checking.
+	(__new_sem_wait_slow): Update EINTR handling.
+	* sysdeps/sparc/sparc32/sem_wait.c: Include lowlevellock.h.
+
 2015-07-09  Martin Sebor  <msebor@redhat.com>
 
 	[BZ #18435]