]> git.ipfire.org Git - thirdparty/gnulib.git/commit
sigprocmask: Support multithreaded applications on native Windows. master
authorBruno Haible <bruno@clisp.org>
Fri, 10 Apr 2026 15:22:07 +0000 (17:22 +0200)
committerBruno Haible <bruno@clisp.org>
Fri, 10 Apr 2026 15:22:07 +0000 (17:22 +0200)
commit91b5ffbdd95d1c573932856f1c2e27ddaca148ae
treed793f82b71170ec2253d15d611aee62e328ebb58
parent1039a5f2cee3cda1c11f64a5eb3a15b2e87cd2f0
sigprocmask: Support multithreaded applications on native Windows.

* lib/signal.in.h (WIN_PTHREADS_SIGNAL_H): New macro.
* lib/sigprocmask.c: Include windows-spin.h.
(thread_local): New macro.
(blocked_set, pending_array): Mark as thread-local.
(blocked_handler): Remove function.
(struct override): New type.
(overrides, overrides_lock): New variables.
(override_handler): New function.
(pthread_sigmask): New function, borrowing from the previous sigprocmask
definition.
(sigprocmask): Now a wrapper around pthread_sigmask.
(rpl_signal): Use the overrides_lock to make it multithread-safe.
(_gl_raise_SIGPIPE): Add comments.
* modules/sigprocmask (Depends-on): Add windows-spin.
* lib/pthread_sigmask.c: Revert last change. On native Windows, don't
define pthread_sigmask here.
* modules/pthread_sigmask (Depends-on): Remove lock.
* NEWS: Remove the last entry.
ChangeLog
NEWS
lib/pthread_sigmask.c
lib/signal.in.h
lib/sigprocmask.c
modules/pthread_sigmask
modules/sigprocmask