]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Add sem_clockwait_np()
authorvangyzen <vangyzen@FreeBSD.org>
Thu, 23 Feb 2017 19:36:38 +0000 (19:36 +0000)
committervangyzen <vangyzen@FreeBSD.org>
Thu, 23 Feb 2017 19:36:38 +0000 (19:36 +0000)
commit179d58125034de6036af86b4d14f7bb7fd073128
tree283fb98ae5f8fe20395133cd5175c738b0f5fe19
parent5957fc99c4a2290a61a758076471555bbd942333
Add sem_clockwait_np()

This function allows the caller to specify the reference clock
and choose between absolute and relative mode.  In relative mode,
the remaining time can be returned.

The API is similar to clock_nanosleep(3).  Thanks to Ed Schouten
for that suggestion.

While I'm here, reduce the sleep time in the semaphore "child"
test to greatly reduce its runtime.  Also add a reasonable timeout.

Reviewed by: ed (userland)
MFC after: 2 weeks
Relnotes: yes
Sponsored by: Dell EMC
Differential Revision: https://reviews.freebsd.org/D9656
contrib/netbsd-tests/lib/librt/t_sem.c
include/semaphore.h
lib/libc/gen/Makefile.inc
lib/libc/gen/Symbol.map
lib/libc/gen/sem_new.c
lib/libc/gen/sem_timedwait.3
lib/libc/include/namespace.h
lib/libc/include/un-namespace.h
share/man/man3/pthread_testcancel.3
sys/kern/kern_umtx.c