]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
maint: avoid sigaction lock overhead
authorPaul Eggert <eggert@cs.ucla.edu>
Wed, 1 Apr 2026 21:43:40 +0000 (14:43 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Wed, 1 Apr 2026 21:48:25 +0000 (14:48 -0700)
* configure.ac (GNULIB_SIGACTION_SINGLE_THREAD):
Define to avoid unnecessary locking in Gnulib sigaction.  See:
https://lists.gnu.org/r/bug-gnulib/2026-04/msg00008.html

configure.ac

index 5e72ed153a6289a8a5061ce00c2f64be92e3f626..2741dc81b25e0e73ed32e2c50851a135e85fc47f 100644 (file)
@@ -64,11 +64,13 @@ gl_INIT
 coreutils_MACROS
 
 # These are safe, since 'sort', coreutils's only multithreaded app,
-# does not use the relevant modules.
+# does not use the relevant modules, or calls their code from one thread.
 AC_DEFINE([GNULIB_EXCLUDE_SINGLE_THREAD], [1],
   [Define to 1 if apps call 'exclude' functions from a single thread.])
 AC_DEFINE([GNULIB_REGEX_SINGLE_THREAD], [1],
   [Define to 1 if apps call 'regex' functions from a single thread.])
+AC_DEFINE([GNULIB_SIGACTION_SINGLE_THREAD], [1],
+  [Define to 1 if programs call 'sigaction' functions from a single thread.])
 # Although 'sort' is multithreaded and can use these functions,
 # it uses them only from the main thread.
 AC_DEFINE([GNULIB_MBRTOWC_SINGLE_THREAD], [1],