[PATCH] Semaphores: add sem_timedwait_monotonic GNU extension [BZ #14717]
Joseph Myers
joseph@codesourcery.com
Thu Dec 13 22:27:00 GMT 2018
On Thu, 13 Dec 2018, Jan Klötzke wrote:
> The added sem_timedwait_monotonic() function behaves just like
> sem_timedwait() but is based on CLOCK_MONOTONIC. An identically named
> function is already provided by QNX for the same reasons.
My understanding from the Austin Group discussion was that the preferred
approach was functions with "clock" instead of "timed" in their names,
taking a clockid parameter (so sem_clockwait in this case).
http://austingroupbugs.net/view.php?id=1216
Note that new functions need a NEWS entry. They also need testcases; I
don't see any in this patch.
How has this patch been tested? I'd have expected it to fail the ABI
tests, because
> diff --git a/sysdeps/unix/sysv/linux/x86_64/64/libpthread.abilist b/sysdeps/unix/sysv/linux/x86_64/64/libpthread.abilist
> index 931c8277a8..a69993f4d9 100644
> --- a/sysdeps/unix/sysv/linux/x86_64/64/libpthread.abilist
> +++ b/sysdeps/unix/sysv/linux/x86_64/64/libpthread.abilist
> @@ -254,3 +254,4 @@ GLIBC_2.4 pthread_mutexattr_getrobust_np F
> GLIBC_2.4 pthread_mutexattr_setprioceiling F
> GLIBC_2.4 pthread_mutexattr_setprotocol F
> GLIBC_2.4 pthread_mutexattr_setrobust_np F
> +GLIBC_2.29 sem_timedwait_monotonic F
(for example) is not placing the new entry in its correct (LC_ALL=C)
sorted location.
Are you covered by an FSF copyright assignment?
--
Joseph S. Myers
joseph@codesourcery.com
More information about the Libc-alpha
mailing list