summaryrefslogtreecommitdiff
path: root/modules/mtx-tests
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2023-03-25 20:54:29 +0100
committerBruno Haible <bruno@clisp.org>2023-03-25 20:58:44 +0100
commit53370c23642eb6256dafd7b6abca8cc93581b7c2 (patch)
treee8fedc5095c2d787898557a2e699a52e0d812b77 /modules/mtx-tests
parenteb8da36e0b3a667444707fb7d0182e54bb2130d0 (diff)
downloadgnulib-53370c23642eb6256dafd7b6abca8cc93581b7c2.tar.gz
call_once: New module, separate from mtx.
* lib/threads.in.h (call_once): Declare as part of module 'call_once', not module 'mtx'. * lib/call_once.c: New file, extracted from lib/mtx.c. * lib/mtx.c (call_once): Remove function. * m4/threads_h.m4 (gl_THREADS_H_REQUIRE_DEFAULTS): Inititalize GNULIB_CALL_ONCE. * modules/threads-h (Makefile.am): Substitute GNULIB_CALL_ONCE. * modules/call_once: New file, based on modules/mtx. * modules/threads (Depends-on): Add call_once. * tests/test-threads-c++.cc: Update accordingly. * modules/call_once-tests: New file, based on modules/mtx-tests. * modules/mtx-tests (Files): Remove tests/test-call_once.c. (Makefile.am): Don't compile test-call_once. * doc/posix-functions/call_once.texi: Document that the relevant module is now 'call_once'. * NEWS: Mention the change.
Diffstat (limited to 'modules/mtx-tests')
-rw-r--r--modules/mtx-tests6
1 files changed, 2 insertions, 4 deletions
diff --git a/modules/mtx-tests b/modules/mtx-tests
index 52310625a5..4a021d22fa 100644
--- a/modules/mtx-tests
+++ b/modules/mtx-tests
@@ -1,6 +1,5 @@
Files:
tests/test-mtx.c
-tests/test-call_once.c
tests/atomic-int-isoc.h
tests/macros.h
@@ -14,7 +13,6 @@ AC_CHECK_HEADERS_ONCE([semaphore.h])
AC_CHECK_DECLS_ONCE([alarm])
Makefile.am:
-TESTS += test-mtx test-call_once
-check_PROGRAMS += test-mtx test-call_once
+TESTS += test-mtx
+check_PROGRAMS += test-mtx
test_mtx_LDADD = $(LDADD) @LIBSTDTHREAD@ @LIBTHREAD@
-test_call_once_LDADD = $(LDADD) @LIBSTDTHREAD@