Hash :
ad29a277
Author :
Date :
2024-01-21T15:59:32
asyncsafe-spin: Fix link error on various platforms. * m4/atomic-cas.m4: New file. * lib/asyncsafe-spin.c: Test HAVE_ATOMIC_COMPARE_AND_SWAP_GCC41 instead of a condition that considers only __sparc__, __ANDROID__, __ibmxl__. * lib/pthread-spin.c: Likewise. * lib/simple-atomic.c: Likewise. * modules/asyncsafe-spin (Files): Add m4/atomic-cas.m4. (configure.ac): Require gl_ATOMIC_COMPARE_AND_SWAP. * modules/pthread-spin: Likewise. * modules/simple-atomic: Likewise.
Description:
POSIX spin locks.
Files:
lib/pthread-spin.c
m4/pthread-spin.m4
m4/atomic-cas.m4
Depends-on:
pthread-h
stdbool [test $HAVE_PTHREAD_SPIN_INIT = 0 || test $REPLACE_PTHREAD_SPIN_INIT = 1]
windows-spin [test $gl_threads_api = windows]
configure.ac:
gl_PTHREAD_SPIN
gl_CONDITIONAL([GL_COND_OBJ_PTHREAD_SPIN],
[test $HAVE_PTHREAD_SPIN_INIT = 0 || test $REPLACE_PTHREAD_SPIN_INIT = 1])
gl_PTHREAD_MODULE_INDICATOR([pthread-spin])
AC_REQUIRE([gl_ATOMIC_COMPARE_AND_SWAP])
Makefile.am:
if GL_COND_OBJ_PTHREAD_SPIN
lib_SOURCES += pthread-spin.c
endif
Include:
<pthread.h>
Link:
$(LIBPMULTITHREAD)
License:
LGPLv2+
Maintainer:
all