summaryrefslogtreecommitdiff
path: root/modules/pthread-mutex-tests
Commit message (Collapse)AuthorAgeFilesLines
* sched_yield: Rename LIB_SCHED_YIELD to SCHED_YIELD_LIB.Bruno Haible2023-01-071-1/+1
| | | | | | * m4/threadlib.m4: Rename LIB_SCHED_YIELD to SCHED_YIELD_LIB. All uses changed. * NEWS: Mention the change.
* tests: Reduce code duplication.Bruno Haible2020-07-011-0/+1
| | | | | | | | | * tests/atomic-int-posix.h: New file, extracted from tests/test-pthread-mutex.c. * tests/test-pthread-mutex.c: Include it. Remove the corresponding code. * tests/test-pthread-rwlock.c: Likewise. * modules/pthread-mutex-tests (Files): Add tests/atomic-int-posix.h. * modules/pthread-rwlock-tests (Files): Likewise.
* pthread-mutex-tests, pthread-rwlock-tests: Fix link errors on HP-UX.Bruno Haible2020-02-111-1/+1
| | | | | | | * modules/pthread-mutex-tests (Makefile.am): Link test-pthread-mutex with $(LIB_SEMAPHORE). * modules/pthread-rwlock-tests (Makefile.am): Link test-pthread-rwlock with $(LIB_SEMAPHORE).
* sched_yield: Don't depend on threadlib and yield.Bruno Haible2019-12-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | * m4/threadlib.m4 (gl_PTHREADLIB): Document that it sets LIB_SCHED_YIELD. (gl_PTHREADLIB_BODY): Set LIB_SCHED_YIELD (code moved here from m4/yield.m4). * m4/sched_yield.m4 (gl_FUNC_SCHED_YIELD): Require gl_PTHREADLIB, not gl_THREADLIB and gl_YIELD. * m4/yield.m4 (gl_YIELD): Require gl_PTHREADLIB. Determine YIELD_LIB based on $(LIB_SCHED_YIELD). * m4/threads.m4 (gl_THREADS_H): Don't require gl_YIELD. Use $(LIB_SCHED_YIELD), not $(YIELD_LIB). * modules/sched_yield (Files): Remove yield.m4. Add threadlib.m4. (Depends-on): Remove threadlib. (Link): Mention $(LIB_SCHED_YIELD), not $(YIELD_LIB). * modules/threads-h (Files): Remove m4/yield.m4. * modules/pthread-cond-tests (Makefile.am): Link the programs against $(LIB_SCHED_YIELD), not $(YIELD_LIB). * modules/pthread-mutex-tests (Makefile.am): Likewise. * modules/pthread-once-tests (Makefile.am): Likewise. * modules/pthread-rwlock-tests (Makefile.am): Likewise. * modules/pthread-tss-tests (Makefile.am): Likewise.
* pthread-h: Fix link errors with --enable-threads=isoc on AIX.Bruno Haible2019-12-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * m4/threadlib.m4 (gl_ANYTHREADLIB_EARLY): New macro, extracted from gl_THREADLIB_EARLY_BODY. (gl_THREADLIB_EARLY_BODY): Invoke it. (gl_PTHREADLIB_BODY): New macro, extracted from gl_THREADLIB_BODY. (gl_THREADLIB_BODY): Invoke it. (gl_PTHREADLIB): New macro. * m4/pthread_h.m4 (gl_PTHREAD_H): Require gl_PTHREADLIB. Require gl_THREADLIB and test $gl_threads_api only if module 'threadlib' is present. Define LIB_PTHREAD using LIBPMULTITHREAD, not LIBMULTITHREAD. * modules/pthread-h (Files): Add threadlib.m4. (Depends-on): Remove threadlib. (configure.ac-early): Invoke gl_ANYTHREADLIB_EARLY. Don't set _REENTRANT and _THREAD_SAFE here. (Link): Use LIBPTHREAD, not LIBTHREAD. * modules/pthread-thread (Link): Use LIBPMULTITHREAD, not LIBMULTITHREAD. * modules/pthread-once (Link): Likewise. * modules/pthread-mutex (Link): Likewise. * modules/pthread-rwlock (Link): Likewise. * modules/pthread-cond (Link): Likewise. * modules/pthread-tss (Link): Likewise. * modules/pthread-spin (Link): Likewise. * modules/pthread (Link): Likewise. * modules/pthread-h-c++-tests (test_pthread_c___LDADD): Likewise. * modules/pthread-thread-tests (test_pthread_thread_LDADD): Likewise. * modules/pthread-once-tests (test_pthread_once1_LDADD, test_pthread_once2_LDADD): Likewise. * modules/pthread-mutex-tests (test_pthread_mutex_LDADD): Likewise. * modules/pthread-rwlock-tests (test_pthread_rwlock_LDADD): Likewise. * modules/pthread-cond-tests (test_pthread_cond_LDADD): Likewise. * modules/pthread-tss-tests (test_pthread_tss_LDADD): Likewise.
* pthread-mutex: Add tests.Bruno Haible2019-07-151-0/+14
* tests/test-pthread-mutex.c: New file, based on tests/test-lock.c and tests/test-mtx.c. * modules/pthread-mutex-tests: New file.