]> Savannah Git Hosting - gnulib.git/commit
New options --enable-threads=isoc and --enable-threads=isoc+posix.
authorBruno Haible <bruno@clisp.org>
Wed, 27 Nov 2019 05:03:21 +0000 (06:03 +0100)
committerBruno Haible <bruno@clisp.org>
Wed, 27 Nov 2019 05:03:21 +0000 (06:03 +0100)
commit721d00b4505054875aa5530c230ca9ede5452d96
treeb540f6c499f77f67ccd084610ad321c44409f855
parent42a045242f9d156becfb4d3fb63dcc607230369a
New options --enable-threads=isoc and --enable-threads=isoc+posix.

* m4/threadlib.m4 (gl_THREADLIB_EARLY_BODY): Accept the options
--enable-threads=isoc and --enable-threads=isoc+posix.
(gl_THREADLIB_BODY): Test whether the ISO C threads API is available.
When both the ISO C and the POSIX threads API are available, choose
USE_ISOC_AND_POSIX_THREADS instead of USE_POSIX_THREADS if
--enable-threads=isoc+posix was specified. When only the ISO C threads
API is available and --enable-threads=iso was specified, choose
USE_ISOC_THREADS.
* lib/glthread/lock.h: Add new code for USE_ISOC_THREADS ||
USE_ISOC_AND_POSIX_THREADS.
* lib/glthread/lock.c: Likewise.
* lib/glthread/cond.h: Likewise.
* lib/glthread/cond.c: Likewise.
* lib/glthread/tls.h: Likewise.
* lib/glthread/tls.c: Likewise.
* lib/glthread/yield.h: Likewise.
* lib/glthread/thread.h: Add new code for USE_ISOC_THREADS. Treat
USE_ISOC_AND_POSIX_THREADS like USE_POSIX_THREADS.
* lib/glthread/thread.c: Likewise.
* lib/glthread/threadlib.c: Likewise.
* tests/test-lock.c: Save and restore the values of USE_ISOC_THREADS and
USE_ISOC_AND_POSIX_THREADS.
* tests/test-cond.c: Consider USE_ISOC_THREADS and
USE_ISOC_AND_POSIX_THREADS.
* tests/test-tls.c: Likewise.
* tests/test-thread_create.c (main): Likewise.
* tests/test-pthread-cond.c: Likewise.
* tests/test-pthread-mutex.c: Likewise.
* tests/test-pthread-once2.c: Likewise.
* tests/test-pthread-rwlock.c: Likewise.
* tests/test-pthread-tss.c: Likewise.
* tests/test-pthread_sigmask2.c: Treat USE_ISOC_AND_POSIX_THREADS like
USE_POSIX_THREADS.
22 files changed:
ChangeLog
lib/glthread/cond.c
lib/glthread/cond.h
lib/glthread/lock.c
lib/glthread/lock.h
lib/glthread/thread.c
lib/glthread/thread.h
lib/glthread/threadlib.c
lib/glthread/tls.c
lib/glthread/tls.h
lib/glthread/yield.h
m4/threadlib.m4
tests/test-cond.c
tests/test-lock.c
tests/test-pthread-cond.c
tests/test-pthread-mutex.c
tests/test-pthread-once2.c
tests/test-pthread-rwlock.c
tests/test-pthread-tss.c
tests/test-pthread_sigmask2.c
tests/test-thread_create.c
tests/test-tls.c