1
0
mirror of https://https.git.savannah.gnu.org/git/gnulib.git synced 2026-04-28 06:33:36 +00:00

sigprocmask: Allow single-thread optimization in a more reliable way.

* modules/sigprocmask: Revert last change.
* lib/sigprocmask.c: Test GNULIB_SIGPROCMASK_SINGLE_THREAD before
including glthread/lock.h.
* doc/multithread.texi: Document GNULIB_SIGPROCMASK_SINGLE_THREAD.
This commit is contained in:
Bruno Haible
2026-04-01 22:45:55 +02:00
parent 8a09144f2f
commit dbd5c0e936
4 changed files with 19 additions and 2 deletions

View File

@@ -1,3 +1,11 @@
2026-04-01 Bruno Haible <bruno@clisp.org>
sigprocmask: Allow single-thread optimization in a more reliable way.
* modules/sigprocmask: Revert last change.
* lib/sigprocmask.c: Test GNULIB_SIGPROCMASK_SINGLE_THREAD before
including glthread/lock.h.
* doc/multithread.texi: Document GNULIB_SIGPROCMASK_SINGLE_THREAD.
2026-04-01 Bruno Haible <bruno@clisp.org>
lock: Document backward-incompatible change from yesterday.

View File

@@ -323,6 +323,10 @@ This macro optimizes the functions @code{mbrtowc}, @code{mbrtoc32}, and
You can get this macro defined by including the Gnulib module
@code{wchar-single}.
@item
You may define the C macro @code{GNULIB_SIGPROCMASK_SINGLE_THREAD}, if all the
programs in your package invoke the functions of the @code{sigprocmask} module
only from a single thread.
@item
You may define the C macro @code{GNULIB_EXCLUDE_SINGLE_THREAD}, if all the
programs in your package invoke the functions of the @code{exclude} module
only from a single thread.

View File

@@ -24,7 +24,13 @@
#include <stdint.h>
#include <stdlib.h>
#include "glthread/lock.h"
#if GNULIB_SIGPROCMASK_SINGLE_THREAD
# include "glthread/lock.h"
#else
# define gl_lock_define_initialized(storageclass,name)
# define gl_lock_lock(lock)
# define gl_lock_unlock(lock)
#endif
#if HAVE_MSVC_INVALID_PARAMETER_HANDLER
# include "msvc-inval.h"

View File

@@ -2,7 +2,6 @@ Description:
POSIX compatible signal blocking.
Files:
lib/glthread/lock.h
lib/sigprocmask.c
m4/signalblocking.m4