Hash :
53370c23
Author :
Date :
2023-03-25T20:54:29
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.
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 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83
Description:
An ISO C 11 compatible <threads.h>.
Files:
lib/threads.in.h
lib/windows-thread.h
lib/windows-mutex.h
lib/windows-recmutex.h
lib/windows-timedmutex.h
lib/windows-timedrecmutex.h
lib/windows-once.h
lib/windows-cond.h
lib/windows-tls.h
lib/windows-initguard.h
m4/threads_h.m4
m4/threadlib.m4
build-aux/config.rpath
Depends-on:
gen-header
include_next
snippet/c++defs
snippet/_Noreturn
snippet/arg-nonnull
snippet/warn-on-use
time-h
havelib
configure.ac-early:
gl_ANYTHREADLIB_EARLY
configure.ac:
gl_THREADS_H
gl_THREADS_H_REQUIRE_DEFAULTS
AC_PROG_MKDIR_P
Makefile.am:
BUILT_SOURCES += threads.h
# We need the following in order to create <threads.h> when the system
# doesn't have one.
threads.h: threads.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(_NORETURN_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
@NMD@ $(AM_V_GEN)$(MKDIR_P) '%reldir%'
$(gl_V_at)$(SED_HEADER_STDOUT) \
-e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \
-e 's|@''INCLUDE_NEXT_AS_FIRST_DIRECTIVE''@|$(INCLUDE_NEXT_AS_FIRST_DIRECTIVE)|g' \
-e 's|@''HAVE_THREADS_H''@|$(HAVE_THREADS_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_AS_FIRST_DIRECTIVE_THREADS_H''@|$(NEXT_AS_FIRST_DIRECTIVE_THREADS_H)|g' \
-e 's|@''NEXT_THREADS_H''@|$(NEXT_THREADS_H)|g' \
-e 's/@''GNULIB_CALL_ONCE''@/$(GNULIB_CALL_ONCE)/g' \
-e 's/@''GNULIB_CND''@/$(GNULIB_CND)/g' \
-e 's/@''GNULIB_MTX''@/$(GNULIB_MTX)/g' \
-e 's/@''GNULIB_THRD''@/$(GNULIB_THRD)/g' \
-e 's/@''GNULIB_TSS''@/$(GNULIB_TSS)/g' \
-e 's|@''HAVE_THREAD_LOCAL''@|$(HAVE_THREAD_LOCAL)|g' \
-e 's|@''BROKEN_THRD_START_T''@|$(BROKEN_THRD_START_T)|g' \
-e 's|@''REPLACE_THRD_CREATE''@|$(REPLACE_THRD_CREATE)|g' \
-e 's|@''REPLACE_THRD_CURRENT''@|$(REPLACE_THRD_CURRENT)|g' \
-e 's|@''REPLACE_THRD_DETACH''@|$(REPLACE_THRD_DETACH)|g' \
-e 's|@''REPLACE_THRD_EQUAL''@|$(REPLACE_THRD_EQUAL)|g' \
-e 's|@''REPLACE_THRD_JOIN''@|$(REPLACE_THRD_JOIN)|g' \
-e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
-e '/definition of _Noreturn/r $(_NORETURN_H)' \
-e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
-e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
$(srcdir)/threads.in.h > $@-t
$(AM_V_at)mv $@-t $@
MOSTLYCLEANFILES += threads.h threads.h-t
Include:
<threads.h>
Link:
$(LIBTHREADLOCAL) if you use the thread_local macro
License:
LGPLv2+
Maintainer:
all