- Get this branch:
-
git clone
-b nsz/mathvec
https://git.launchpad.net/glibc
Branch merges
Related source package recipes
Branch information
- Name:
- nsz/mathvec
- Repository:
- lp:glibc
Recent commits
- 9179115... by Szabolcs Nagy <email address hidden>
-
aarch64: add vector sin, cos, log and pow abi symbols
Add simple assembly implementations that fall back to scalar code,
similar to the vector exp code.2019-07-15 Szabolcs Nagy <email address hidden>
* sysdeps/
aarch64/ fpu/Makefile: Add functions.
* sysdeps/aarch64/ fpu/Versions: Add symbols.
* sysdeps/aarch64/ fpu/libmvec_ double_ vlen2_cos. S: New file.
* sysdeps/aarch64/ fpu/libmvec_ double_ vlen2_log. S: New file.
* sysdeps/aarch64/ fpu/libmvec_ double_ vlen2_pow. S: New file.
* sysdeps/aarch64/ fpu/libmvec_ double_ vlen2_sin. S: New file.
* sysdeps/aarch64/ fpu/libmvec_ float_vlen4_ cosf.S: New file.
* sysdeps/aarch64/ fpu/libmvec_ float_vlen4_ logf.S: New file.
* sysdeps/aarch64/ fpu/libmvec_ float_vlen4_ powf.S: New file.
* sysdeps/aarch64/ fpu/libmvec_ float_vlen4_ sinf.S: New file.
* sysdeps/aarch64/ fpu/test- double- vlen2-wrappers. c: Add wrappers.
* sysdeps/aarch64/ fpu/test- float-vlen4- wrappers. c: Add wrappers.
* sysdeps/aarch64/ libm-test- ulps: Update.
* sysdeps/unix/sysv/ linux/aarch64/ libmvec. abilist: Update. - 80792b6... by Szabolcs Nagy <email address hidden>
-
Aarch64: Add simd exp/expf ABI symbols
The implementation is in assembly and just calls the scalar math code.
This ensures that old compiler without vector call abi support can
build libmvec. The abi is supported since GCC 9.1, the specification isVector functions require a STO_AARCH64_
VARIANT_ PCS marking in the
dynamic symbol table for lazy bound calls to work. This will be
missing in libmvec, which works because the marking only affects
the behaviour if there are calls to the symbols in the binary.Testing requires vector call abi support, which is detected.
Header declarations are not added yet, so the symbols will not be used
by the compiler: they are just added so the abi is in place which
enables backporting later. Currently we cannot add correct declarations
that only declare the specific symbols we provide: the OpenMP pragma
mechanism would declare both AdvSIMD and SVE variants.2019-07-15 Steve Ellcey <email address hidden>
Szabolcs Nagy <email address hidden>* sysdeps/
aarch64/ configure. ac (build_mathvec): Enable.
(test-mathvec): Enable if ABI is supported.
* sysdeps/aarch64/ configure: Regenerate.
* sysdeps/aarch64/ fpu/Makefile
(libmvec-support): Add libmvec_double_ vlen2_exp,
libmvec_float_vlen4_ expf to list.
(libmvec_nonshared. a): Use make-dummy-lib.
(libmvec-tests): Add double-vlen2, float-vlen4 to list.
(double-vlen2-funcs) : Add new vector function name.
(float-vlen4-funcs) : Add new vector function name.
* sysdeps/aarch64/ fpu/Versions: New file.
* sysdeps/aarch64/ fpu/libmvec_ double_ vlen2.h: New file.
* sysdeps/aarch64/ fpu/libmvec_ double_ vlen2_exp. S: New file.
* sysdeps/aarch64/ fpu/libmvec_ float_vlen4. h: New file.
* sysdeps/aarch64/ fpu/libmvec_ float_vlen4_ expf.S: New file.
* sysdeps/aarch64/ fpu/test- double- vlen2-wrappers. c: New file.
* sysdeps/aarch64/ fpu/test- float-vlen4- wrappers. c: New file.
* sysdeps/aarch64/ libm-test- ulps (exp_vlen2): New entry.
(exp_vlen4): Likewise.
* sysdeps/unix/sysv/ linux/aarch64/ libmvec. abilist: New file. - 1ff1373... by Mike Crowe
-
nptl: Remove futex_supports_
exact_relative_ timeouts The only implementation of futex_supports_
exact_relative_ timeouts always
returns true. Let's remove it and all its callers.* nptl/pthread_
cond_wait. c: (__pthread_ cond_clockwait) : Remove code
that is only useful if futex_supports_exact_relative_ timeouts ()
returns false.
* nptl/pthread_condattr_ setclock. c: (pthread_ condattr_ setclock) :
Likewise.
* sysdeps/nptl/futex- internal. h: Remove comment about relative
timeouts potentially being imprecise since it's no longer true.
Remove declaration of futex_supports_exact_relative_ timeouts.
* sysdeps/unix/sysv/ linux/futex- internal. h: Remove implementation
of futex_supports_exact_relative_ timeouts. Reviewed-by: Adhemerval Zanella <email address hidden>
- 65dd7e9... by Mike Crowe
-
Update NEWS for new _clockwait and _clocklock functions
* NEWS: Mention recently-added pthread_
cond_clockwait,
pthread_rwlock_ clockrdlock, pthread_ rwlock_ clockwrlock and
sem_clockwait functions.Reviewed-by: Adhemerval Zanella <email address hidden>
- 9d20e22... by Mike Crowe
-
nptl: Add POSIX-proposed pthread_
mutex_clocklock Add POSIX-proposed pthread_
mutex_clocklock function that works like
pthread_mutex_timedlock but takes a clockid parameter to measure the
abstime parameter against.* sysdeps/
nptl/pthread. h: Add pthread_ mutex_clocklock .
* nptl/DESIGN-systemtap- probes. txt: Likewise.
* nptl/pthread_mutex_timedlock .c
(__pthread_mutex_clocklock _common) : Rename from
__pthread_mutex_timedlock and add clockid parameter. Pass this
parameter to lll_clocklock and lll_clocklock_elision in place of
CLOCK_REALTIME. (__pthread_mutex_clocklock ): New function to add
LIBC_PROBE and validate clockid parameter before calling
__pthread_mutex_clocklock _common. (__pthread_ mutex_timedlock ): New
implementation to add LIBC_PROBE and calls
__pthread_mutex_clocklock _common passing CLOCK_REALTIME as the
clockid.
* nptl/Makefile: Add tst-mutex11.c.
* nptl/tst-abstime.c (th): Add tests for pthread_mutex_clocklock .
* nptl/tst-mutex11.c: New tests for passing invalid and unsupported
clockid parameters to pthread_mutex_clocklock .
* nptl/tst-mutex5.c (do_test_clock): Rename from do_test and take
clockid parameter to indicate which clock to be used. Call
pthread_mutex_timedlock or pthread_ mutex_clocklock as appropriate.
(do_test): Call do_test_clock to separately test
pthread_mutex_timedlock , pthread_ mutex_clocklock (CLOCK_ REALTIME)
and pthread_mutex_clocklock (CLOCK_ MONOTONIC) .
* nptl/tst-mutex9.c: Likewise.
* nptl/Versions (GLIBC_2.30): Add pthread_mutex_clocklock .
* sysdeps/unix/sysv/ linux/aarch64/ libpthread. abilist (GLIBC_2.30):
Likewise.
* sysdeps/unix/sysv/ linux/alpha/ libpthread. abilist (GLIBC_2.30):
Likewise.
* sysdeps/unix/sysv/ linux/arm/ libpthread. abilist (GLIBC_2.30):
Likewise.
* sysdeps/unix/sysv/ linux/csky/ libpthread. abilist (GLIBC_2.30):
Likewise.
* sysdeps/unix/sysv/ linux/hppa/ libpthread. abilist (GLIBC_2.30):
Likewise.
* sysdeps/unix/sysv/ linux/i386/ libpthread. abilist (GLIBC_2.30):
Likewise.
* sysdeps/unix/sysv/ linux/ia64/ libpthread. abilist (GLIBC_2.30):
Likewise.
* sysdeps/unix/sysv/ linux/m68k/ coldfire/ libpthread. abilist
(GLIBC_2.30): Likewise.
* sysdeps/unix/sysv/ linux/m68k/ m680x0/ libpthread. abilist
(GLIBC_2.30): Likewise.
* sysdeps/unix/sysv/ linux/microblaz e/libpthread. abilist
(GLIBC_2.30): Likewise.
* sysdeps/unix/sysv/ linux/mips/ mips32/ libpthread. abilist
(GLIBC_2.30): Likewise.
* sysdeps/unix/sysv/ linux/mips/ mips64/ libpthread. abilist
(GLIBC_2.30): Likewise.
* sysdeps/unix/sysv/ linux/nios2/ libpthread. abilist (GLIBC_2.30):
Likewise.
* sysdeps/unix/sysv/ linux/powerpc/ powerpc32/ libpthread. abilist
(GLIBC_2.30): Likewise.
* sysdeps/unix/sysv/ linux/powerpc/ powerpc64/ be/libpthread. abilist
(GLIBC_2.30): Likewise.
* sysdeps/unix/sysv/ linux/powerpc/ powerpc64/ le/libpthread. abilist
(GLIBC_2.30): Likewise.
* sysdeps/unix/sysv/ linux/riscv/ rv64/libpthread .abilist
(GLIBC_2.30): Likewise.
* sysdeps/unix/sysv/ linux/s390/ s390-32/ libpthread. abilist
(GLIBC_2.30): Likewise.
* sysdeps/unix/sysv/ linux/s390/ s390-64/ libpthread. abilist
(GLIBC_2.30): Likewise.
* sysdeps/unix/sysv/ linux/sh/ libpthread. abilist (GLIBC_2.30):
Likewise.
* sysdeps/unix/sysv/ linux/sparc/ sparc32/ libpthread. abilist
(GLIBC_2.30): Likewise.
* sysdeps/unix/sysv/ linux/sparc/ sparc64/ libpthread. abilist
(GLIBC_2.30): Likewise.
* sysdeps/unix/sysv/ linux/x86_ 64/64/libpthrea d.abilist
(GLIBC_2.30): Likewise.
* sysdeps/unix/sysv/ linux/x86_ 64/x32/ libpthread. abilist
(GLIBC_2.30): Likewise.Reviewed-by: Adhemerval Zanella <email address hidden>
- 5921309... by Mike Crowe
-
nptl: Rename lll_timedlock to lll_clocklock and add clockid parameter
Rename lll_timedlock to lll_clocklock and add clockid
parameter to indicate the clock that the abstime parameter should
be measured against in preparation for adding
pthread_mutex_clocklock . The name change mirrors the naming for the exposed pthread functions:
timed => absolute timeout measured against CLOCK_REALTIME (or clock
specified by attribute in the case of pthread_cond_timedwait. ) clock => absolute timeout measured against clock specified in preceding
parameter. * sysdeps/
nptl/lowlevello ck.h (lll_clocklock): Rename from
lll_timedlock and add clockid parameter. (__lll_clocklock): Rename
from __lll_timedlock and add clockid parameter.
* sysdeps/unix/sysv/ linux/sparc/ lowlevellock. h (lll_clocklock):
Likewise.
* nptl/lll_timedlock_ wait.c (__lll_ clocklock_ wait): Rename from
__lll_timedlock_ wait and add clockid parameter. Use __clock_gettime
rather than __gettimeofday so that clockid can be used. This means
that conversion from struct timeval is no longer required.
* sysdeps/sparc/sparc32/ lowlevellock. c (lll_clocklock_ wait):
Likewise.
* sysdeps/sparc/sparc32/ lll_timedlock_ wait.c: Update comment to
refer to __lll_clocklock_wait rather than __lll_timedlock _wait.
* nptl/pthread_mutex_timedlock .c (lll_clocklock_ elision) : Rename
from lll_timedlock_elision, add clockid parameter and use
meaningful names for other parameters. (__pthread_mutex_timedlock ):
Pass CLOCK_REALTIME where necessary to lll_clocklock and
lll_clocklock_elision.
* sysdeps/unix/sysv/ linux/powerpc/ lowlevellock. h
(lll_clocklock_elision) : Rename from lll_timedlock_ elision and add
clockid parameter. (__lll_clocklock_ elision) : Rename from
__lll_timedlock_ elision and add clockid parameter.
* sysdeps/unix/sysv/ linux/s390/ lowlevellock. h: Likewise.
* sysdeps/unix/sysv/ linux/x86/ lowlevellock. h: Likewise.
* sysdeps/unix/sysv/ linux/powerpc/ elision- timed.c
(__lll_lock_elision) : Call __lll_clocklock _elision rather than
__lll_timedlock_ elision. (EXTRAARG): Add clockid parameter.
(LLL_LOCK): Likewise.
* sysdeps/unix/sysv/ linux/s390/ elision- timed.c: Likewise.
* sysdeps/unix/sysv/ linux/x86/ elision- timed.c: Likewise. Reviewed-by: Adhemerval Zanella <email address hidden>
- e996fa7... by Mike Crowe
-
nptl: Add POSIX-proposed pthread_
rwlock_ clockrdlock & pthread_ rwlock_ clockwrlock Add:
int pthread_rwlock_ clockrdlock (pthread_rwlock_t *rwlock,
clockid_ t clockid,
const struct timespec *abstime)
and:
int pthread_rwlock_ clockwrlock (pthread_rwlock_t *rwlock,
clockid_ t clockid,
const struct timespec *abstime) which behave like pthread_
rwlock_ timedrdlock and
pthread_rwlock_ timedwrlock respectively, except they always measure
abstime against the supplied clockid. The functions currently support
CLOCK_REALTIME and CLOCK_MONOTONIC and return EINVAL if any other
clock is specified.* sysdeps/
nptl/pthread. h: Add pthread_ rwlock_ clockrdlock and
pthread_wrlock_ clockwrlock.
* nptl/Makefile: Build pthread_rwlock_ clockrdlock. c and
pthread_rwlock_ clockwrlock. c.
* nptl/pthread_rwlock_ clockrdlock. c: Implement
pthread_rwlock_ clockrdlock.
* nptl/pthread_rwlock_ clockwrlock. c: Implement
pthread_rwlock_ clockwrlock.
* nptl/pthread_rwlock_ common. c (__pthread_ rwlock_ rdlock_ full): Add
clockid parameter and verify that it indicates a supported clock on
entry so that we fail even if it doesn't end up being used. Pass
that clock on to futex_abstimed_wait when necessary.
(__pthread_rwlock_ wrlock_ full): Likewise.
* nptl/pthread_rwlock_ rdlock. c: (__pthread_ rwlock_ rdlock) : Pass
CLOCK_REALTIME to __pthread_rwlock_ rdlock_ full even though it won't
be used because there's no timeout.
* nptl/pthread_rwlock_ wrlock. c (__pthread_ rwlock_ wrlock) : Pass
CLOCK_REALTIME to __pthread_rwlock_ wrlock_ full even though it won't
be used because there is no timeout.
* nptl/pthread_rwlock_ timedrdlock. c (pthread_ rwlock_ timedrdlock) :
Pass CLOCK_REALTIME to __pthread_rwlock_ rdlock_ full since abstime
uses that clock.
* nptl/pthread_rwlock_ timedwrlock. c (pthread_ rwlock_ timedwrlock) :
Pass CLOCK_REALTIME to __pthread_rwlock_ wrlock_ full since abstime
uses that clock.
* sysdeps/unix/sysv/ linux/aarch64/ libpthread. abilist (GLIBC_2.30): Likewise.
* sysdeps/unix/sysv/ linux/alpha/ libpthread. abilist (GLIBC_2.30): Likewise.
* sysdeps/unix/sysv/ linux/arm/ libpthread. abilist (GLIBC_2.30): Likewise.
* sysdeps/unix/sysv/ linux/csky/ libpthread. abilist (GLIBC_2.30): Likewise.
* sysdeps/unix/sysv/ linux/hppa/ libpthread. abilist (GLIBC_2.30): Likewise.
* sysdeps/unix/sysv/ linux/i386/ libpthread. abilist (GLIBC_2.30): Likewise.
* sysdeps/unix/sysv/ linux/ia64/ libpthread. abilist (GLIBC_2.30): Likewise.
* sysdeps/unix/sysv/ linux/m68k/ coldfire/ libpthread. abilist
(GLIBC_2.30): Likewise.
* sysdeps/unix/sysv/ linux/m68k/ m680x0/ libpthread. abilist
(GLIBC_2.30): Likewise.
* sysdeps/unix/sysv/ linux/microblaz e/libpthread. abilist
(GLIBC_2.30): Likewise.
* sysdeps/unix/sysv/ linux/mips/ mips32/ libpthread. abilist
(GLIBC_2.30): Likewise.
* sysdeps/unix/sysv/ linux/mips/ mips64/ libpthread. abilist
(GLIBC_2.30): Likewise.
* sysdeps/unix/sysv/ linux/nios2/ libpthread. abilist (GLIBC_2.30): Likewise.
* sysdeps/unix/sysv/ linux/powerpc/ powerpc32/ libpthread. abilist
(GLIBC_2.30): Likewise.
* sysdeps/unix/sysv/ linux/powerpc/ powerpc64/ be/libpthread. abilist
(GLIBC_2.30): Likewise.
* sysdeps/unix/sysv/ linux/powerpc/ powerpc64/ le/libpthread. abilist
(GLIBC_2.30): Likewise.
* sysdeps/unix/sysv/ linux/riscv/ rv64/libpthread .abilist
(GLIBC_2.30): Likewise.
* sysdeps/unix/sysv/ linux/s390/ s390-32/ libpthread. abilist
(GLIBC_2.30): Likewise.
* sysdeps/unix/sysv/ linux/s390/ s390-64/ libpthread. abilist
(GLIBC_2.30): Likewise.
* sysdeps/unix/sysv/ linux/sh/ libpthread. abilist (GLIBC_2.30): Likewise.
* sysdeps/unix/sysv/ linux/sparc/ sparc32/ libpthread. abilist
(GLIBC_2.30): Likewise.
* sysdeps/unix/sysv/ linux/sparc/ sparc64/ libpthread. abilist
(GLIBC_2.30): Likewise.
* sysdeps/unix/sysv/ linux/x86_ 64/64/libpthrea d.abilist
(GLIBC_2.30): Likewise.
* sysdeps/unix/sysv/ linux/x86_ 64/x32/ libpthread. abilist
(GLIBC_2.30): Likewise.
* nptl/tst-abstime.c (th): Add pthread_rwlock_ clockrdlock and
pthread_rwlock_ clockwrlock timeout tests to match the existing
pthread_rwlock_ timedrdloock and pthread_ rwlock_ timedwrlock tests.
* nptl/tst-rwlock14.c (do_test): Likewise.
* nptl/tst-rwlock6.c Invent verbose_printf macro, and use for
ancillary output throughout. (tf): Accept thread_args structure so
that rwlock, a clockid and function name can be passed to the
thread. (do_test_clock): Rename from do_test. Accept clockid
parameter to specify test clock. Use the magic clockid value of
CLOCK_USE_TIMEDLOCK to indicate that pthread_ rwlock_ timedrdlock and
pthread_rwlock_ timedwrlock should be tested, otherwise pass the
specified clockid to pthread_rwlock_ clockrdlock and
pthread_rwlock_ clockwrlock. Use xpthread_create and xpthread_join.
(do_test): Call do_test_clock to test each clockid in turn.
* nptl/tst-rwlock7.c: Likewise.
* nptl/tst-rwlock9.c (writer_thread, reader_thread): Accept
thread_args structure so that the (now int) thread number, the
clockid and the function name can be passed to the thread.
(do_test_clock): Renamed from do_test. Pass the necessary
thread_args when creating the reader and writer threads. Use
xpthread_create and xpthread_join.
(do_test): Call do_test_clock to test each clockid in turn.
* manual/threads. texi: Add documentation for
pthread_rwlock_ clockrdlock and pthread_ rwlock_ clockwrclock. Reviewed-by: Adhemerval Zanella <email address hidden>
- 600b4be... by Mike Crowe
-
nptl: pthread_rwlock: Move timeout validation into _full functions
As recommended by the comments in the implementations of
pthread_rwlock_ timedrdlock and pthread_ rwlock_ timedwrlock, let's move
the timeout validity checks into the corresponding pthread_rwlock_ rdlock_ full
and pthread_rwlock_ wrlock_ full functions. Since these functions may be
called with abstime == NULL, an extra check for that is necessary too.* nptl/pthread_
rwlock_ common. c (__pthread_ rwlock_ rdlock_ full):
Check validity of abstime parameter.
(__pthread_rwlock_ rwlock_ full): Likewise.
* nptl/pthread_rwlock_ timedrdlock. c
* (pthread_rwlock_ timedrdlock) :
Remove check for validity of abstime parameter.
* nptl/pthread_rwlock_ timedwrlock. c
* (pthread_rwlock_ timedwrlock) :
Likewise.Reviewed-by: Adhemerval Zanella <email address hidden>
- afe4de7... by Mike Crowe
-
nptl: Add POSIX-proposed pthread_
cond_clockwait Add:
int pthread_
cond_clockwait (pthread_cond_t *cond,
pthread_ mutex_t *mutex,
clockid_ t clockid,
const struct timespec *abstime) which behaves just like pthread_
cond_timedwait except it always measures
abstime against the supplied clockid. Currently supports CLOCK_REALTIME
and
CLOCK_MONOTONIC and returns EINVAL if any other clock is specified.Includes feedback from many others. This function was originally
proposed[1] as pthread_cond_timedwaito nclock_ np, but The Austin Group
preferred the new name.* nptl/Makefile: Add tst-cond26 and tst-cond27
* nptl/Versions (GLIBC_2.30): Add pthread_cond_clockwait
* sysdeps/nptl/pthread. h: Likewise
* nptl/forward.c: Add __pthread_cond_clockwait
* nptl/forward.c: Likewise
* nptl/pthreadP.h: Likewise
* sysdeps/nptl/pthread- functions. h: Likewise
* nptl/pthread_cond_wait. c (__pthread_ cond_wait_ common) : Add
clockid parameter and comment describing why we don't need to
check
its value. Use that value when calling
futex_abstimed_ wait_cancelable rather than reading the clock
from
the flags. (__pthread_cond_wait) : Pass unused clockid parameter.
(__pthread_cond_timedwait) : Read clock from flags and pass it to
__pthread_cond_wait_ common. (__pthread_ cond_clockwait) : Add new
function with weak alias from pthread_cond_clockwait.
* sysdeps/mach/hurd/ i386/libpthread .abilist (GLIBC_2.30):
* Likewise.
* sysdeps/unix/sysv/ linux/aarch64/ libpthread. abilist
* (GLIBC_2.30): Likewise.
* sysdeps/unix/sysv/ linux/alpha/ libpthread. abilist (GLIBC_2.30):
* Likewise.
* sysdeps/unix/sysv/ linux/arm/ libpthread. abilist (GLIBC_2.30):
* Likewise.
* sysdeps/unix/sysv/ linux/csky/ libpthread. abilist (GLIBC_2.30):
* Likewise.
* sysdeps/unix/sysv/ linux/hppa/ libpthread. abilist (GLIBC_2.30):
* Likewise.
* sysdeps/unix/sysv/ linux/i386/ libpthread. abilist (GLIBC_2.30):
* Likewise.
* sysdeps/unix/sysv/ linux/ia64/ libpthread. abilist (GLIBC_2.30):
* Likewise.
* sysdeps/unix/sysv/ linux/m68k/ coldfire/ libpthread. abilist
(GLIBC_2.30): Likewise.
* sysdeps/unix/sysv/ linux/m68k/ m680x0/ libpthread. abilist
(GLIBC_2.30): Likewise.
* sysdeps/unix/sysv/ linux/microblaz e/libpthread. abilist
(GLIBC_2.30): Likewise.
* sysdeps/unix/sysv/ linux/mips/ mips32/ libpthread. abilist
(GLIBC_2.30): Likewise.
* sysdeps/unix/sysv/ linux/mips/ mips64/ libpthread. abilist
(GLIBC_2.30): Likewise.
* sysdeps/unix/sysv/ linux/nios2/ libpthread. abilist (GLIBC_2.30):
* Likewise.
* sysdeps/unix/sysv/ linux/powerpc/ powerpc32/ libpthread. abilist
(GLIBC_2.30): Likewise.
* sysdeps/unix/sysv/ linux/powerpc/ powerpc64/ be/libpthread. abilist
(GLIBC_2.30): Likewise.
* sysdeps/unix/sysv/ linux/powerpc/ powerpc64/ le/libpthread. abilist
(GLIBC_2.30): Likewise.
* sysdeps/unix/sysv/ linux/riscv/ rv64/libpthread .abilist
(GLIBC_2.30): Likewise.
* sysdeps/unix/sysv/ linux/s390/ s390-32/ libpthread. abilist
(GLIBC_2.30): Likewise.
* sysdeps/unix/sysv/ linux/s390/ s390-64/ libpthread. abilist
(GLIBC_2.30): Likewise.
* sysdeps/unix/sysv/ linux/sh/ libpthread. abilist (GLIBC_2.30):
* Likewise.
* sysdeps/unix/sysv/ linux/sparc/ sparc32/ libpthread. abilist
(GLIBC_2.30): Likewise.
* sysdeps/unix/sysv/ linux/sparc/ sparc64/ libpthread. abilist
(GLIBC_2.30): Likewise.
* sysdeps/unix/sysv/ linux/x86_ 64/64/libpthrea d.abilist
(GLIBC_2.30): Likewise.
* sysdeps/unix/sysv/ linux/x86_ 64/x32/ libpthread. abilist
(GLIBC_2.30): Likewise.
* nptl/tst-cond11.c (run_test): Support testing
pthread_cond_clockwait too by using a special magic
CLOCK_USE_ATTR_ CLOCK value to determine whether to call
pthread_cond_timedwait or pthread_ cond_clockwait. (do_test):
Pass
CLOCK_USE_ATTR_ CLOCK for existing tests, and add new tests using
all combinations of CLOCK_MONOTONIC and CLOCK_REALTIME.
* ntpl/tst-cond26.c: New test for passing unsupported and
* invalid
clocks to pthread_cond_clockwait.
* nptl/tst-cond27.c: Add test similar to tst-cond5.c, but using
struct timespec and pthread_cond_clockwait.
* manual/threads. texi: Document pthread_ cond_clockwait. The
* comment
was provided by Carlos O'Donell.[1] https:/
/sourceware. org/ml/ libc-alpha/ 2015-07/ msg00193. html Reviewed-by: Adhemerval Zanella <email address hidden>
- 6615f77... by Mike Crowe
-
nptl: Add POSIX-proposed sem_clockwait
Add:
int sem_clockwait (sem_t *sem, clockid_t clock, const struct timespec
*abstime)which behaves just like sem_timedwait, but measures abstime against the
specified clock. Currently supports CLOCK_REALTIME and CLOCK_MONOTONIC
and sets errno == EINVAL if any other clock is specified.* nptl/sem_
waitcommon. c (do_futex_wait, __new_sem_ wait_slow) : Add
clockid parameters to indicate the clock which abstime should be
measured against.
* nptl/sem_timedwait. c (sem_timedwait), nptl/sem_wait.c
(__new_sem_wait): Pass CLOCK_REALTIME as clockid to
__new_sem_wait_ slow.
* nptl/sem_clockwait. c: New file to implement sem_clockwait based
on sem_timedwait.c.
* nptl/Makefile: Add sem_clockwait.c source file. Add CFLAGS for
sem_clockwait.c to match those used for sem_timedwait.c.
* sysdeps/pthread/ semaphore. h: Add sem_clockwait.
* nptl/Versions (GLIBC_2.30): Likewise.
* sysdeps/unix/sysv/ linux/aarch64/ libpthread. abilist (GLIBC_2.30): Likewise.
* sysdeps/unix/sysv/ linux/alpha/ libpthread. abilist (GLIBC_2.30): Likewise.
* sysdeps/unix/sysv/ linux/arm/ libpthread. abilist (GLIBC_2.30): Likewise.
* sysdeps/unix/sysv/ linux/csky/ libpthread. abilist (GLIBC_2.30): Likewise.
* sysdeps/unix/sysv/ linux/hppa/ libpthread. abilist (GLIBC_2.30): Likewise.
* sysdeps/unix/sysv/ linux/i386/ libpthread. abilist (GLIBC_2.30): Likewise.
* sysdeps/unix/sysv/ linux/ia64/ libpthread. abilist (GLIBC_2.30): Likewise.
* sysdeps/unix/sysv/ linux/m68k/ coldfire/ libpthread. abilist
(GLIBC_2.30): Likewise.
* sysdeps/unix/sysv/ linux/m68k/ m680x0/ libpthread. abilist
(GLIBC_2.30): Likewise.
* sysdeps/unix/sysv/ linux/microblaz e/libpthread. abilist
(GLIBC_2.30): Likewise.
* sysdeps/unix/sysv/ linux/mips/ mips32/ libpthread. abilist
(GLIBC_2.30): Likewise.
* sysdeps/unix/sysv/ linux/mips/ mips64/ libpthread. abilist
(GLIBC_2.30): Likewise.
* sysdeps/unix/sysv/ linux/nios2/ libpthread. abilist (GLIBC_2.30): Likewise.
* sysdeps/unix/sysv/ linux/powerpc/ powerpc32/ libpthread. abilist
(GLIBC_2.30): Likewise.
* sysdeps/unix/sysv/ linux/powerpc/ powerpc64/ be/libpthread. abilist
(GLIBC_2.30): Likewise.
* sysdeps/unix/sysv/ linux/powerpc/ powerpc64/ le/libpthread. abilist
(GLIBC_2.30): Likewise.
* sysdeps/unix/sysv/ linux/riscv/ rv64/libpthread .abilist
(GLIBC_2.30): Likewise.
* sysdeps/unix/sysv/ linux/s390/ s390-32/ libpthread. abilist
(GLIBC_2.30): Likewise.
* sysdeps/unix/sysv/ linux/s390/ s390-64/ libpthread. abilist
(GLIBC_2.30): Likewise.
* sysdeps/unix/sysv/ linux/sh/ libpthread. abilist (GLIBC_2.30): Likewise.
* sysdeps/unix/sysv/ linux/sparc/ sparc32/ libpthread. abilist
(GLIBC_2.30): Likewise.
* sysdeps/unix/sysv/ linux/sparc/ sparc64/ libpthread. abilist
(GLIBC_2.30): Likewise.
* sysdeps/unix/sysv/ linux/x86_ 64/64/libpthrea d.abilist
(GLIBC_2.30): Likewise.
* sysdeps/unix/sysv/ linux/x86_ 64/x32/ libpthread. abilist
(GLIBC_2.30): Likewise.
* nptl/tst-sem17.c: Add new test for passing invalid clock to
sem_clockwait.
* nptl/tst-sem13.c, nptl/tst-sem5.c: Modify existing sem_timedwait
tests to also test sem_clockwait.
* manual/threads. texi: Document sem_clockwait. Reviewed-by: Adhemerval Zanella <email address hidden>