summaryrefslogtreecommitdiff
path: root/modules/pthread-spin-tests
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2020-07-01 22:06:45 +0200
committerBruno Haible <bruno@clisp.org>2020-07-01 22:06:45 +0200
commitab0284709c3fafeb51679a309d61b37d7d52dc1d (patch)
tree77e6776c79a309ec0e7de769e5ad0ca42be7a3f3 /modules/pthread-spin-tests
parent6b9216ed0b43b2777d8d12f865e32edb5b30d945 (diff)
downloadgnulib-ab0284709c3fafeb51679a309d61b37d7d52dc1d.tar.gz
pthread-spin: Add tests.
* tests/test-pthread-spin.c: New file, based on tests/test-lock.c. * modules/pthread-spin-tests: New file.
Diffstat (limited to 'modules/pthread-spin-tests')
-rw-r--r--modules/pthread-spin-tests20
1 files changed, 20 insertions, 0 deletions
diff --git a/modules/pthread-spin-tests b/modules/pthread-spin-tests
new file mode 100644
index 0000000000..aafe8c7bcd
--- /dev/null
+++ b/modules/pthread-spin-tests
@@ -0,0 +1,20 @@
+Files:
+tests/test-pthread-spin.c
+tests/atomic-int-posix.h
+tests/macros.h
+m4/semaphore.m4
+
+Depends-on:
+pthread-thread
+pthread-mutex
+sched_yield
+
+configure.ac:
+AC_CHECK_HEADERS_ONCE([semaphore.h])
+AC_CHECK_DECLS_ONCE([alarm])
+AC_REQUIRE([gl_SEMAPHORE])
+
+Makefile.am:
+TESTS += test-pthread-spin
+check_PROGRAMS += test-pthread-spin
+test_pthread_spin_LDADD = $(LDADD) @LIBPMULTITHREAD@ @LIB_SCHED_YIELD@ @LIB_SEMAPHORE@