Branch
Hash :
f9f125c4
Author :
Date :
2024-08-06T15:43:16
pthread-mutex tests: Strengthen tests. * tests/test-pthread-mutex-type.c: New file. * modules/pthread-mutex-tests (Files): Add it. (Makefile.am): Arrange to test test-pthread-mutex-type. * doc/posix-functions/pthread_mutex_lock.texi: Mention FreeBSD and NetBSD problem. * doc/posix-functions/pthread_mutex_trylock.texi: Likewise.
Files:
tests/test-pthread-mutex.c
tests/test-pthread-mutex-type.c
tests/atomic-int-posix.h
tests/macros.h
m4/semaphore.m4
Depends-on:
pthread-thread
sched_yield
random
configure.ac:
AC_CHECK_HEADERS_ONCE([semaphore.h])
AC_CHECK_DECLS_ONCE([alarm])
AC_REQUIRE([gl_SEMAPHORE])
Makefile.am:
TESTS += test-pthread-mutex test-pthread-mutex-type
check_PROGRAMS += test-pthread-mutex test-pthread-mutex-type
test_pthread_mutex_LDADD = $(LDADD) @LIBPMULTITHREAD@ @SCHED_YIELD_LIB@ @LIB_SEMAPHORE@
# If we were to link test-pthread-mutex-type only with @LIBPTHREAD@ instead of
# @LIBPMULTITHREAD@, this test would fail on FreeBSD and NetBSD.
test_pthread_mutex_type_LDADD = $(LDADD) @LIBPMULTITHREAD@