Hash :
145e16d8
Author :
Date :
2019-06-20T04:02:52
pthread_mutex_timedlock: New module. * lib/pthread.in.h (pthread_mutex_timedlock): New dummy function and new declaration. * lib/pthread_mutex_timedlock.c: New file. * m4/pthread_mutex_timedlock.m4: New file. * m4/pthread.m4 (gl_PTHREAD_CHECK): Don't call AC_LIBOBJ here. Test whether pthread_mutex_timedlock is declared. (gl_PTHREAD_MODULE_INDICATOR): New macro. (gl_PTHREAD_DEFAULTS): Initialize GNULIB_PTHREAD_MUTEX_TIMEDLOCK, HAVE_PTHREAD_MUTEX_TIMEDLOCK. * modules/pthread (configure.ac): Call AC_LIBOBJ here. (Makefile.am): Substitute GNULIB_PTHREAD_MUTEX_TIMEDLOCK, HAVE_PTHREAD_MUTEX_TIMEDLOCK. * modules/pthread_mutex_timedlock: New file. * doc/posix-functions/pthread_mutex_timedlock.texi: Mention the new module.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
Description:
Implement a trivial subset of the pthreads library.
Files:
lib/pthread.c
lib/pthread.in.h
m4/pthread.m4
Depends-on:
extensions
extern-inline
sched
time
configure.ac-early:
AC_DEFINE([_REENTRANT], 1, [For thread-safety on OSF/1, Solaris.])
AC_DEFINE([_THREAD_SAFE], 1, [For thread-safety on AIX, FreeBSD.])
configure.ac:
gl_PTHREAD_CHECK
if test $HAVE_PTHREAD_H = 0 || test $HAVE_PTHREAD_T = 0 || test $HAVE_PTHREAD_SPINLOCK_T = 0; then
AC_LIBOBJ([pthread])
fi
gl_MODULE_INDICATOR([pthread])
Makefile.am:
BUILT_SOURCES += $(PTHREAD_H)
# We need the following in order to create <pthread.h> when the system
# doesn't have one that works with the given compiler.
if GL_GENERATE_PTHREAD_H
pthread.h: pthread.in.h $(top_builddir)/config.status
$(AM_V_GEN)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
sed -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \
-e 's|@''HAVE_PTHREAD_H''@|$(HAVE_PTHREAD_H)|g' \
-e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
-e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
-e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
-e 's|@''NEXT_PTHREAD_H''@|$(NEXT_PTHREAD_H)|g' \
-e 's/@''GNULIB_PTHREAD_MUTEX_TIMEDLOCK''@/$(GNULIB_PTHREAD_MUTEX_TIMEDLOCK)/g' \
-e 's|@''HAVE_PTHREAD_T''@|$(HAVE_PTHREAD_T)|g' \
-e 's|@''HAVE_PTHREAD_SPINLOCK_T''@|$(HAVE_PTHREAD_SPINLOCK_T)|g' \
-e 's|@''HAVE_PTHREAD_MUTEX_TIMEDLOCK''@|$(HAVE_PTHREAD_MUTEX_TIMEDLOCK)|g' \
< $(srcdir)/pthread.in.h; \
} > $@-t && \
mv $@-t $@
else
pthread.h: $(top_builddir)/config.status
rm -f $@
endif
MOSTLYCLEANFILES += pthread.h pthread.h-t
Include:
<pthread.h>
Link:
$(LIB_PTHREAD)
License:
LGPLv2+
Maintainer:
Glen Lenker and Paul Eggert