]> git.ipfire.org Git - thirdparty/gnulib.git/commitdiff
doc: be more like POSIX in threading terms
authorPaul Eggert <eggert@cs.ucla.edu>
Sat, 11 Apr 2026 20:19:43 +0000 (13:19 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Sat, 11 Apr 2026 20:21:19 +0000 (13:21 -0700)
In documentation and comments, be more like POSIX in terminology
involving multithreading.  Explain the distinction between
multithreaded process vs multithreaded program.  Change “program”
to “process” when the latter wording is more accurate or informative.
Simplify the wording for the constraints on processes that use
unlocked I/O.  Change “multithread-safe” to “thread-safe”.
Change “thread-safety” to “thread safety”.
However, do not change “multithreaded” to “multi-threaded” even
though there are some uses of both spellinga, as there are a whole
bunch of uses of “multithreaded”, also in identifier names;
perhaps Gnulib should even standardize on “multithreaded”
(not “multi-threaded”), contra POSIX.

106 files changed:
ChangeLog
doc/c-strtod.texi
doc/multithread.texi
doc/parse-datetime.texi
doc/posix-functions/accept4.texi
doc/posix-functions/alarm.texi
doc/posix-functions/faccessat.texi
doc/posix-functions/fchdir.texi
doc/posix-functions/fchmodat.texi
doc/posix-functions/fchownat.texi
doc/posix-functions/fdopendir.texi
doc/posix-functions/fstatat.texi
doc/posix-functions/linkat.texi
doc/posix-functions/mkdirat.texi
doc/posix-functions/mkfifoat.texi
doc/posix-functions/mknodat.texi
doc/posix-functions/nl_langinfo.texi
doc/posix-functions/openat.texi
doc/posix-functions/pipe2.texi
doc/posix-functions/rand.texi
doc/posix-functions/random.texi
doc/posix-functions/readlinkat.texi
doc/posix-functions/renameat.texi
doc/posix-functions/setlocale.texi
doc/posix-functions/sigprocmask.texi
doc/posix-functions/strerror_r.texi
doc/posix-functions/symlinkat.texi
doc/posix-functions/unlinkat.texi
doc/posix-functions/utimensat.texi
doc/posix-headers/time.texi
doc/quote.texi
lib/boot-time.h
lib/c-stack.c
lib/c-strtod.c
lib/chdir-long.c
lib/clean-temp-private.h
lib/clean-temp.h
lib/ctime.c
lib/fatal-signal.c
lib/fclose.c
lib/file-remote.c
lib/fstrcmp.c
lib/getcwd.c
lib/getlogin_r.c
lib/getumask.c
lib/glthread/cond.h
lib/glthread/once.h
lib/glthread/thread.h
lib/idpriv.h
lib/localcharset.c
lib/localcharset.h
lib/localtime.c
lib/mbrtowc-impl.h
lib/msvc-inval.h
lib/nl_langinfo.c
lib/pagealign_alloc.h
lib/pread.c
lib/pwrite.c
lib/readutmp.h
lib/scandir.c
lib/setlocale-fixes.c
lib/setlocale-fixes.h
lib/setlocale.c
lib/setlocale_null.c
lib/setlocale_null.h
lib/sigpipe-die.h
lib/sigprocmask.c
lib/sockets.c
lib/stackvma.c
lib/strerror.c
lib/striconveha.c
lib/string.in.h
lib/strtod.c
lib/thread-optim.h
lib/time_r.c
lib/time_rz.c
lib/ttyname_r.c
lib/tzset.c
lib/vasnprintf.c
lib/vma-iter.c
lib/wcrtomb.c
lib/wcsftime.c
lib/xstrerror.h
m4/gnulib-common.m4
m4/nl_langinfo.m4
m4/pthread_sigmask.m4
m4/random.m4
m4/setlocale.m4
m4/setlocale_null.m4
m4/threadlib.m4
modules/getumask
modules/sigsegv
modules/unlocked-io
modules/xstrerror
tests/test-c-strtod-mt.c
tests/test-c-strtof-mt.c
tests/test-c-strtold-mt.c
tests/test-gmtime_r-mt.c
tests/test-localeconv-mt.c
tests/test-localtime_r-mt.c
tests/test-nl_langinfo-mt.c
tests/test-pthread_sigmask2.c
tests/test-random-mt.c
tests/test-setlocale_null-mt-all.c
tests/test-setlocale_null-mt-one.c
tests/test-thread_self.c

index 29ab05d4a34d5e03ce8e8bf2a0bba568b03abdf0..dc67199a1edc02605efc43c1740cc045db3c769b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,19 @@
+2026-04-11  Paul Eggert  <eggert@cs.ucla.edu>
+
+       doc: be more like POSIX in threading terms
+       In documentation and comments, be more like POSIX in terminology
+       involving multithreading.  Explain the distinction between
+       multithreaded process vs multithreaded program.  Change “program”
+       to “process” when the latter wording is more accurate or informative.
+       Simplify the wording for the constraints on processes that use
+       unlocked I/O.  Change “multithread-safe” to “thread-safe”.
+       Change “thread-safety” to “thread safety”.
+       However, do not change “multithreaded” to “multi-threaded” even
+       though there are some uses of both spellinga, as there are a whole
+       bunch of uses of “multithreaded”, also in identifier names;
+       perhaps Gnulib should even standardize on “multithreaded”
+       (not “multi-threaded”), contra POSIX.
+
 2026-04-10  Bruno Haible  <bruno@clisp.org>
 
        fenv-exceptions-trapping tests: Make test more debugging friendly.
index 284f4d912c1aa57e23971684b40b9ff6997b8e1c..2d9e90700ef3507c478a5a0943ec58651cd87197 100644 (file)
@@ -24,4 +24,4 @@ when the current locale's notion of decimal point is a comma @samp{,},
 and no characters outside the basic character set are accepted.
 
 On platforms without @code{strtod_l}, this function is not safe for use in
-multi-threaded applications since it calls @code{setlocale}.
+multi-threaded processes since it calls @code{setlocale}.
index 8771e4a6748c21fe5335cf328790b6792ff9f7ee..f8176d995f7efe304d56afe0935e85bbb2853608 100644 (file)
@@ -1,9 +1,14 @@
 @node Multithreading
 @chapter Multithreading
 
-Multithreading is a programming paradigm.  In a multithreaded program,
-multiple threads execute concurrently (or quasi concurrently) at different
-places in the program.
+Multithreading is a programming paradigm.  In a @dfn{multithreaded
+process}, multiple threads execute concurrently (or quasi
+concurrently) at different places in the program, and a
+@dfn{multithreaded program} is one that contains primitives that can
+create threads.  In contrast, a @dfn{single-threaded process} has just
+one thread, and a @dfn{single-threaded program} contains no
+multithreading primitives and so executes entirely in its process's
+main thread.
 
 There are three motivations for using multithreading in a program:
 @itemize @bullet
@@ -290,10 +295,8 @@ if (mt) gl_lock_unlock (some_lock);
 You may use the @code{unlocked-io} module if you want the @code{FILE} stream
 functions @code{getc}, @code{putc}, etc.@: to use unlocked I/O if available,
 throughout the package.  Unlocked I/O can improve performance, sometimes
-dramatically.  But unlocked I/O is safe only in single-threaded programs,
-as well as in multithreaded programs for which you can guarantee that
-every @code{FILE} stream, including @code{stdin}, @code{stdout}, @code{stderr},
-is used only in a single thread.
+dramatically.  But unlocked I/O is safe only in processes in which
+two threads never simultaneously access the same @code{FILE} stream.
 
 You need extra code for this optimization to be effective: include the
 @code{"unlocked-io.h"} header file.  Some Gnulib modules that do operations
index bbf645ae9a6eab37a5959cef8e4c288762e87356..9f26269602215d6f5dde2e4b2fb83997401962c6 100644 (file)
@@ -620,7 +620,7 @@ avoid a conflict with the alternative Posix function @code{getdate},
 and a later rename to @code{parse_datetime}.  The Posix function
 @code{getdate} can parse more locale-specific dates using
 @code{strptime}, but relies on an environment variable and external
-file, and lacks the thread-safety of @code{parse_datetime}.
+file, and lacks the thread safety of @code{parse_datetime}.
 
 @cindex Pinard, F.
 @cindex Berry, K.
index 61204c1ab9e38ab28078ff0766e6554a43d99e5c..56dd855f137d8c5d15c6dc1ddd469d18ce112fd6 100644 (file)
@@ -15,7 +15,7 @@ Portability problems fixed by Gnulib:
 This function is missing on many non-glibc platforms:
 glibc 2.9, macOS 14, FreeBSD 6.0, NetBSD 7.1, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, Solaris 11.3, Cygwin 1.7.1, mingw, MSVC 14, Android 4.4.
 But the replacement function is not atomic; this matters in multi-threaded
-programs that spawn child processes.
+processes that spawn child processes.
 @end itemize
 
 Portability problems not fixed by Gnulib:
index 39de5f25a96a60c5c6bfe35cfa7f423102df9bd1..cbfab5fe7aae092f4df0f06bd8dbc807832895c2 100644 (file)
@@ -17,7 +17,7 @@ This function has no impact if @code{SIGALRM} is inherited as
 ignored; programs should use @code{signal (SIGALRM, SIG_DFL)} if
 it is important to ensure the alarm will fire.
 @item
-Use of this function in multi-threaded applications is not advised.
+Use of this function in multi-threaded programs is not advised.
 @item
 This function is missing on some platforms:
 mingw (2011), MSVC 14.
index 072601c684f50db79c139c6e9616f4b1605571d7..4f32235f9e7a1c01e583b01ab149c714284c073f 100644 (file)
@@ -25,7 +25,7 @@ The replacement does not always take ACLs into account.
 @item
 The replacement is not safe to be used in libraries.
 @item
-The replacement is not multithread-safe.
+The replacement is not thread-safe.
 @item
 The replacement does not support the @code{AT_SYMLINK_NOFOLLOW} flag,
 which is supported by GNU @code{faccessat}.
index 890c18f5f9a0fe3326d3ae019a879330303e495c..7080fb91865ce9060dedeb9e1ed145b2eed22e1f 100644 (file)
@@ -12,7 +12,8 @@ Portability problems fixed by Gnulib:
 @item
 This function is missing on some platforms:
 mingw, MSVC 14.
-But the replacement function is not safe to be used in libraries and is not multithread-safe.
+But the replacement function is not safe to be used in libraries and is not
+thread-safe.
 @end itemize
 
 Portability problems not fixed by Gnulib:
index d705c1d1fd3a5012b2c3cb88575e764bd3622d33..2b81e807e4515fec54ff4618c379ce661c49acb3 100644 (file)
@@ -13,7 +13,8 @@ Portability problems fixed by Gnulib:
 This function is missing on some platforms:
 glibc 2.3.6, Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8,
 AIX 5.1, HP-UX 11, Solaris 10, Cygwin 1.5.x, mingw, MSVC 14.
-But the replacement function is not safe to be used in libraries and is not multithread-safe.
+But the replacement function is not safe to be used in libraries and is not
+thread-safe.
 @item
 This function does not fail when the file name argument ends in a slash
 and (without the slash) names a non-directory, on some platforms:
index 34c1d724f142192829f2f9f43723a14d88f8514c..884bc0a8bae2f8a32c8bd7902c4b9d2ef45279c1 100644 (file)
@@ -14,7 +14,7 @@ This function is missing on some platforms:
 glibc 2.3.6, Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8,
 AIX 5.1, HP-UX 11, Cygwin 1.5.x, mingw, MSVC 14.
 But the replacement function is not safe to be used in libraries and
-is not multithread-safe.  Also, the replacement may fail to change
+is not thread-safe.  Also, the replacement may fail to change
 symlinks if @code{lchown} is unsupported, or fail altogether if
 @code{chown} is unsupported.
 @item
index c0909c3e8c21360699b5e15541edaa330bb6a008..c576cc9a67c0086e4d3fcfb3eb64bdb08da5b6f7 100644 (file)
@@ -14,7 +14,7 @@ This function is missing on some platforms:
 glibc 2.3.6, Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8,
 AIX 5.1, HP-UX 11, Cygwin 1.5.x, mingw, MSVC 14.
 But the replacement function is not safe to be used in libraries and
-is not multithread-safe.  Also, the replacement does not guarantee
+is not thread-safe.  Also, the replacement does not guarantee
 that @samp{dirfd(fdopendir(n))==n} (dirfd might fail, or return a
 different file descriptor than n).
 @item
index 0ea8e8a4d62b342663833ac8a69d6f0b61d5daa3..ee3b0752325722b7756e4134b1948bf3e19072ba 100644 (file)
@@ -13,7 +13,8 @@ Portability problems fixed by Gnulib:
 This function is missing on some platforms:
 glibc 2.3.6, Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8,
 AIX 5.1, HP-UX 11, Cygwin 1.5.x, mingw, MSVC 14.
-But the replacement function is not safe to be used in libraries and is not multithread-safe.
+But the replacement function is not safe to be used in libraries and is not
+thread-safe.
 @item
 On platforms where @code{off_t} is a 32-bit type, @code{fstatat} may
 not correctly report the size of files or block devices larger than 2
index 8820b657e5e9d3405d0ea3c50b1c8f9a58a049f8..944052fca3709c4b0f9f0d851fbcd4998819aed0 100644 (file)
@@ -12,7 +12,8 @@ Portability problems fixed by Gnulib:
 @item
 This function is missing on some platforms:
 glibc 2.3.6, Mac OS X 10.9, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, Solaris 10, Cygwin 1.5.x, mingw, MSVC 14, Android 4.4.
-But the replacement function is not safe to be used in libraries and is not multithread-safe.
+But the replacement function is not safe to be used in libraries and
+is not thread-safe.
 @item
 This function fails to directly hardlink symlinks on some platforms:
 Mac OS X 10.10.
index e7a713ca038e0d7ce8f47b35874817ac240b1c5e..f42222f2836add9f90dc3643c4114efd0d196c11 100644 (file)
@@ -13,7 +13,8 @@ Portability problems fixed by Gnulib:
 This function is missing on some platforms:
 glibc 2.3.6, Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8,
 AIX 5.1, HP-UX 11, Solaris 10, Cygwin 1.5.x, mingw, MSVC 14.
-But the replacement function is not safe to be used in libraries and is not multithread-safe.
+But the replacement function is not safe to be used in libraries and
+is not thread-safe.
 @end itemize
 
 Portability problems not fixed by Gnulib:
index 3e96a1e4323a1f19851ec6f1c2b40e4e3b483ac2..11486a6ff9b5f3d2186dc7e0b08fce163c45c587 100644 (file)
@@ -12,7 +12,8 @@ Portability problems fixed by Gnulib:
 @item
 This function is missing on some platforms:
 glibc 2.3.6, macOS 12, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, Solaris 10, Cygwin 1.5.x, mingw, MSVC 14, Android 5.1.
-But the replacement function is not safe to be used in libraries and is not multithread-safe.
+But the replacement function is not safe to be used in libraries and
+is not thread-safe.
 @item
 This function does not fail when the file name argument ends in a slash
 and (without the slash) names a nonexistent file, on some platforms:
index ea656b54feb2c38e8d8b2b755f70f08bee0e8e84..57a4751a823b1ef73948b586c5d7865fb0a14fdb 100644 (file)
@@ -12,7 +12,8 @@ Portability problems fixed by Gnulib:
 @item
 This function is missing on some platforms:
 glibc 2.3.6, macOS 12, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, Solaris 10, Cygwin 1.5.x, mingw, MSVC 14, Android 4.4.
-But the replacement function is not safe to be used in libraries and is not multithread-safe.
+But the replacement function is not safe to be used in libraries and
+is not thread-safe.
 @item
 This function does not fail when the file name argument ends in a slash
 and (without the slash) names a nonexistent file, on some platforms:
index 02ff6ebbe091bbf6824abd3bb70628ad0bff47c2..fbba96af83f19c27bf1ab87684396c2e8401018a 100644 (file)
@@ -28,7 +28,7 @@ The constants @code{ERA}, @code{ERA_D_FMT}, @code{ERA_D_T_FMT},
 @code{ERA_T_FMT}, @code{ALT_DIGITS} are not supported on some platforms:
 OpenBSD 7.5.
 @item
-This function is not multithread-safe on some platforms:
+This function is not thread-safe on some platforms:
 macOS 26, Solaris 11.3.
 @end itemize
 
index 1e5fc7e7220e481e35f0c164b6b5061ffcaf5e50..2fdb81719b3edade28a8efcd5854aedbd35614ba 100644 (file)
@@ -13,7 +13,8 @@ Portability problems fixed by Gnulib:
 This function is missing on some platforms:
 glibc 2.3.6, Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8,
 AIX 5.1, HP-UX 11, Cygwin 1.5.x, mingw, MSVC 14.
-But the replacement function is not safe to be used in libraries and is not multithread-safe.
+But the replacement function is not safe to be used in libraries and
+is not thread-safe.
 @item
 Some platforms do not support @code{O_CLOEXEC}:
 AIX 7.1, Solaris 10.
index 32040a030b64224cb381bdc569b70ac103886a0d..fcb9a751e27d27aff26624501594e01546c2d811 100644 (file)
@@ -15,7 +15,7 @@ Portability problems fixed by Gnulib:
 This function is missing on many non-glibc platforms:
 glibc 2.8, macOS 14, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, Solaris 11.3, Cygwin 1.7.1, mingw, MSVC 14, Android 2.2.
 But the replacement function is not atomic; this matters in multi-threaded
-programs that spawn child processes.
+processes that spawn child processes.
 @end itemize
 
 Portability problems not fixed by Gnulib:
index 6d725b7a8213c73dfde04c2836bfda354fed2e7e..0f0d41671863bbb36676cbf2982938981a63b419 100644 (file)
@@ -10,7 +10,7 @@ Gnulib module: rand
 Portability problems fixed by Gnulib:
 @itemize
 @item
-This function crashes when used in multithreaded programs on some platforms:
+This function crashes when used in multithreaded processes on some platforms:
 CheriBSD.
 @end itemize
 
@@ -20,6 +20,6 @@ Portability problems not fixed by Gnulib:
 This function is only defined as an inline function on some platforms:
 Android 4.4.
 @item
-This function is not multithread-safe on some platforms:
+This function is not thread-safe on some platforms:
 musl libc, macOS 14, FreeBSD 13.2, NetBSD 10.0, AIX 7.1, Solaris 11.4.
 @end itemize
index d10b4ad5e82bbdd974b7610202c05d36747dde75..16a4fa4b747e2fb6edbe8cd3d9a967dbd4187727 100644 (file)
@@ -16,7 +16,7 @@ mingw, MSVC 14.
 This function is only defined as an inline function on some platforms:
 Android 4.4.
 @item
-This function is not multithread-safe on some platforms:
+This function is not thread-safe on some platforms:
 macOS 14, FreeBSD 13.2, Solaris 11.4, Cygwin 3.4.6, Haiku.
 @end itemize
 
index 2d1dfe9fe4a24c63dd016a5cf2f5d1985e200558..0d664437a56645c20ac3df23f3b05290766b590c 100644 (file)
@@ -12,7 +12,8 @@ Portability problems fixed by Gnulib:
 @item
 This function is missing on some platforms:
 glibc 2.3.6, Mac OS X 10.9, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, Solaris 10, Cygwin 1.5.x, mingw, MSVC 14, Android 4.4.
-But the replacement function is not safe to be used in libraries and is not multithread-safe.
+But the replacement function is not safe to be used in libraries and
+is not thread-safe.
 @item
 Some platforms mistakenly succeed on file names ending in @file{/}:
 macOS 14.
index ad06184c56486bbad4749f94c7299470c2956fc0..84bac35939b5eb1ee416c25f5bef7653dc70800e 100644 (file)
@@ -13,7 +13,7 @@ Portability problems fixed by Gnulib:
 This function is missing on some platforms:
 glibc 2.3.6, Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, Cygwin 1.5.x, mingw, MSVC 14.
 But the replacement function is not safe to be used in libraries and is not
-multithread-safe.
+thread-safe.
 @item
 This function is declared in @code{<unistd.h>}, not in @code{<stdio.h>},
 on some platforms:
index 48ea614ad596e1f5a40fbef96a819c404f4f2e4c..ecc342a47602b298f7af923b55b2ca1bcdbf813a 100644 (file)
@@ -34,10 +34,10 @@ always fails.  The replacement, however, supports only the locale names
 Portability problems fixed by Gnulib module @code{setlocale} or @code{setlocale-null}:
 @itemize
 @item
-Invocations of @code{setlocale (..., NULL)} are not multithread-safe on some
+Invocations of @code{setlocale (..., NULL)} are not thread-safe on some
 platforms:
 musl libc, macOS, FreeBSD, NetBSD, OpenBSD, AIX, Haiku, Cygwin.
-To make these invocations multithread-safe, you need the Gnulib module
+To make these invocations thread-safe, you need the Gnulib module
 @code{setlocale}, or you need to change the code to invoke @code{setlocale_null}
 or @code{setlocale_null_r} instead.
 @end itemize
index 3f976c9876cea6c1160f7b7be26b90dc33da0b76..a4ad854c53dd66e1996ee8e602b06e42729b0ccc 100644 (file)
@@ -22,7 +22,7 @@ In case of failure, the return value is wrong on some platforms:
 NetBSD 10.0 when libpthread is in use.
 
 @item
-POSIX says that in multi-threaded programs @code{sigprocmask} has
+POSIX says that in multi-threaded processes @code{sigprocmask} has
 unspecified behavior so @code{pthread_sigmask} should be used instead.
 On most platforms, @code{sigprocmask} is essentially equivalent to
 @code{pthread_sigmask}, with only a difference regarding the error
@@ -38,7 +38,7 @@ The Gnulib replacement on native MS-Windows is not async-signal-safe
 POSIX section ``Signal Actions''}).
 @end itemize
 
-Note: In single-threaded applications it's simpler to use
+Note: In single-threaded programs it's simpler to use
 @code{sigprocmask}, since it does not require compiling with
 @code{-pthread} and/or linking with @code{-lpthread} on some platforms:
 AIX.
index d7098db2c9c9e901643f3b1e863db6399ee3770f..4319545d083c5344e2727174620b854e00e435d5 100644 (file)
@@ -93,4 +93,4 @@ Portability problems not fixed by Gnulib:
 Note: Gnulib has a module @code{xstrerror}, with the property that
 @code{xstrerror (NULL, errnum)} returns the value of @code{strerror_r}
 as a freshly allocated string.
-(Recall that the expression @code{strerror (errnum)} is not multithread-safe.)
+(Recall that the expression @code{strerror (errnum)} is not thread-safe.)
index 7ec8dd5172ddc8762657b497c5a19ae78d2a7f04..5928c585e59293ed04678524f3bd5ac36e082d78 100644 (file)
@@ -12,7 +12,8 @@ Portability problems fixed by Gnulib:
 @item
 This function is missing on some platforms:
 glibc 2.3.6, Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, Solaris 10, Cygwin 1.5.x, mingw, MSVC 14, Android 4.4.
-But the replacement function is not safe to be used in libraries and is not multithread-safe.
+But the replacement function is not safe to be used in libraries and
+is not thread-safe.
 @item
 Some platforms declare this function in @code{stdio.h} instead of
 @code{unistd.h}:
index 7d81826e0155cd1cee35ad33ba7422fb0151bc3f..1609888136acade8b5fbfaa83fcdea25ac1bd620 100644 (file)
@@ -13,7 +13,8 @@ Portability problems fixed by Gnulib:
 This function is missing on some platforms:
 glibc 2.3.6, Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8,
 AIX 5.1, HP-UX 11, Cygwin 1.5.x, mingw, MSVC 14.
-But the replacement function is not safe to be used in libraries and is not multithread-safe.
+But the replacement function is not safe to be used in libraries and
+is not thread-safe.
 @item
 This function is declared in @code{<fcntl.h>}, not in @code{<unistd.h>},
 on some platforms:
index fcea06423e01ba33b74544379f5b9cce21851228..ccac6c97f41621da877a1a7906404a13aca7c60e 100644 (file)
@@ -15,7 +15,7 @@ glibc 2.5, Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX
 However, the replacement function may end up truncating timestamps to
 worse resolution than supported by the file system.  Furthermore, the
 replacement function is not safe to be used in libraries and is not
-multithread-safe.
+thread-safe.
 @item
 This function returns a bogus value instead of failing with
 @code{ENOSYS} on some platforms:
index a730366ff4f369de127b143fcef6b5bf4dbdf15f..799aed655b724bdb5e5ac3df6f0a6160a63c2143 100644 (file)
@@ -43,7 +43,7 @@ AIX 7.3, HP-UX 11, Solaris 11.4, mingw, MSVC 14.
 On some platforms the global state variables @code{daylight},
 @code{timezone} and @code{tzname} are not available.  Even on
 platforms where they are available, their contents are often unreliable,
-even in single-threaded programs.
+even in single-threaded processes.
 Portable code can instead use @code{struct tm}'s @code{tm_gmtoff} and
 @code{tm_zone} members when available, and the @code{strftime} function
 with @code{%z} or @code{%Z} conversion specifiers otherwise.
index 385bda19ef7011bb51921eb2742ff469fdb64067..825da0c230469be215714e4d55da5d278453104c 100644 (file)
@@ -40,6 +40,6 @@ Hence if you need more than one thing quoted at the same time, you
 need to use @code{quote_n}.
 
 @findex quotearg_alloc
-Also, the @code{quote} module is not suited for multithreaded applications.
+Also, the @code{quote} module is not suited for multithreaded processes.
 In that case, you have to use @code{quotearg_alloc}, defined in the
 @samp{quotearg} module, which is decidedly less convenient.
index 82969272ffe7ed6dff283d76b1b4d80889189ccf..79129924884276b550120798bf994285395da438 100644 (file)
@@ -34,7 +34,7 @@ extern "C" {
    The difference can matter in GNU/Linux, where times in /proc/stat
    might be relative to boot time of the host, not the container.
 
-   This function is not multithread-safe, since on many platforms it
+   This function is not thread-safe, since on many platforms it
    invokes the functions setutxent, getutxent, endutxent.
    These functions may lock a file like /var/log/wtmp (so that we
    don't read garbage when a concurrent process writes to that file),
index dbc82bb3f5d66f4bf0775608bc4be1e41c00d1a4..54aa583f634b27410e06915047920436f58a9afb 100644 (file)
@@ -31,7 +31,7 @@
    (e.g., with malloc).  Yes, this is a pain, but we don't know of any
    better solution that is portable.
 
-   No attempt has been made to deal with multithreaded applications.  */
+   No attempt has been made to deal with multithreaded processes.  */
 
 #include <config.h>
 
index 93f21ac93c0ddc54a08da8f2953a93a7aa8c17c1..832f6cc63fdf14249cdffaf4274659057da9e0b4 100644 (file)
@@ -79,10 +79,10 @@ static char
 decimal_point_char (void)
 {
   const char *point;
-  /* Determine it in a multithread-safe way.  We know nl_langinfo is
-     multithread-safe on glibc systems and Mac OS X systems, but is not required
-     to be multithread-safe by POSIX.  sprintf(), however, is multithread-safe.
-     localeconv() is rarely multithread-safe.  */
+  /* Determine it in a thread-safe way.  We know nl_langinfo is
+     thread-safe on glibc systems and Mac OS X systems, but is not required
+     to be thread-safe by POSIX.  sprintf(), however, is thread-safe.
+     localeconv() is rarely thread-safe.  */
 # if HAVE_NL_LANGINFO && (__GLIBC__ || defined __UCLIBC__ || (defined __APPLE__ && defined __MACH__))
   point = nl_langinfo (RADIXCHAR);
 # elif 1
index aa5791b9b28135136f390a2f71e6e2e25592b3fa..54ff34e82df747e237c784dff44bc4cbca7cd886 100644 (file)
@@ -34,7 +34,7 @@
 
 /* The results of openat() in this file are not leaked to any
    single-threaded code that could use stdio.
-   FIXME - if the kernel ever adds support for multi-thread safety for
+   FIXME - if the kernel ever adds support for thread safety for
    avoiding standard fds, then we should use openat_safer.  */
 
 struct cd_buf
index b5f0604a55b714d0480e27be3508cebd0f1ebddb..a7de0143bdf9e0fec7ebc312c8fb14017321c769 100644 (file)
@@ -51,7 +51,7 @@ struct all_tempdirs
 extern struct all_tempdirs dir_cleanup_list;
 
 /* A file descriptor to be closed.
-   In multithreaded programs, it is forbidden to close the same fd twice,
+   In multithreaded processes, it is forbidden to close the same fd twice,
    because you never know what unrelated open() calls are being executed in
    other threads. So, the 'close (fd)' must be guarded by a once-only guard.  */
 struct closeable_fd
index d70ca358817276f651b6b1743f7dc9450a08b0e3..6d91ac889847670a3f30c50cd07baf1b0a00a1fe 100644 (file)
@@ -59,8 +59,8 @@ extern "C" {
    Limitations: Files or directories can still be left over if
      - the program dies from a fatal signal such as SIGQUIT, SIGKILL, or
        SIGABRT, SIGSEGV, SIGBUS, SIGILL, SIGFPE, or
-     - in a multithreaded program, the fatal signal handler is already running
-       while another thread of the program creates a new temporary directory
+     - in a multithreaded process, the fatal signal handler is already running
+       while another thread of the process creates a new temporary directory
        or temporary file, or
      - on native Windows, some temporary files are used by a subprocess while
        the fatal signal interrupts the program.
index e01e1c1e70d40e738c7f1d74f29d84ac5eae9955..5587e299ec2674150ab1705549869135e1dea296 100644 (file)
@@ -56,7 +56,7 @@ rpl_ctime (const time_t *tp)
   const char *tz = getenv ("TZ");
   if (tz != NULL && strchr (tz, '/') != NULL)
     {
-      /* Neutralize it, in a way that is multithread-safe.
+      /* Neutralize it, in a way that is thread-safe.
          (If we were to use _putenv ("TZ="), it would free the memory allocated
          for the environment variable "TZ", and thus other threads that are
          using the previously fetched value of getenv ("TZ") could crash.)  */
index fcfde052538c7f22ea60e85f5da4feff86a99954..33c99d5b8c5fd83a868fedd0c44c4233b655586b 100644 (file)
@@ -85,7 +85,7 @@ static int fatal_signals[] =
 static void
 init_fatal_signals (void)
 {
-  /* This function is multithread-safe even without synchronization, because
+  /* This function is thread-safe even without synchronization, because
      if two threads execute it simultaneously, the fatal_signals[] array will
      not change any more after the first of the threads has completed this
      function.  */
@@ -199,7 +199,7 @@ install_handlers (void)
 }
 
 
-/* Lock that makes at_fatal_signal multi-thread safe.  */
+/* Lock that makes at_fatal_signal thread-safe.  */
 gl_lock_define_initialized (static, at_fatal_signal_lock)
 
 /* Register a cleanup function to be executed when a catchable fatal signal
index f57f41a69ea9ed0b3e2620bbaa01ca46d757169f..ab7453e576af125f4cea31f20a5afb45239a1f6b 100644 (file)
@@ -77,7 +77,7 @@ rpl_fclose (FILE *fp)
      overridden close() function invokes.  See lib/close.c.  */
 #if WINDOWS_SOCKETS
   /* Call the overridden close(), then the original fclose().
-     Note about multithread-safety: There is a race condition where some
+     Note about thread safety: There is a race condition where some
      other thread could open fd between our close and fclose.  */
   if (close (fd) < 0 && saved_errno == 0)
     saved_errno = errno;
@@ -89,7 +89,7 @@ rpl_fclose (FILE *fp)
   /* Call fclose() and invoke all hooks of the overridden close().  */
 
 # if REPLACE_FCHDIR
-  /* Note about multithread-safety: There is a race condition here as well.
+  /* Note about thread safety: There is a race condition here as well.
      Some other thread could open fd between our calls to fclose and
      _gl_unregister_fd.  */
   result = fclose_nothrow (fp);
index 8fe6bc78a79455856ce6256d2ab0f85e7de95196..16d8a90f4191c31be69054ef3a6fc0f42a809ae5 100644 (file)
@@ -258,7 +258,7 @@ file_is_remote (const char *file)
 #else                                                       /* Unknown OS */
 # if defined SLOW_AND_OVERKILL
   /* This makes many system calls, is therefore slow, and
-     is also not multithread-safe.  */
+     is also not thread-safe.  */
   struct stat statbuf;
   if (stat (file, &statbuf) < 0)
     return -1;
index c63f52a2ff2c0144aaf762cf0b050a83cd95008e..2ddafabe7cede10d745d9920bfae2ea1474c5dcb 100644 (file)
@@ -56,7 +56,7 @@
 /* Because fstrcmp is typically called multiple times, attempt to minimize
    the number of memory allocations performed.  Thus, let a call reuse the
    memory already allocated by the previous call, if it is sufficient.
-   To make it multithread-safe, without need for a lock that protects the
+   To make it thread-safe, without need for a lock that protects the
    already allocated memory, store the allocated memory per thread.  Free
    it only when the thread exits.  */
 
index e9d9548cdb02dddfd031a27022fbbfa51062e504..85136c331a47b06fc8730246b3a2153ab37471fb 100644 (file)
 /* The results of opendir() in this file are not used with dirfd and fchdir,
    and we do not leak fds to any single-threaded code that could use stdio,
    therefore save some unnecessary recursion in fchdir.c.
-   FIXME - if the kernel ever adds support for multi-thread safety for
+   FIXME - if the kernel ever adds support for thread safety for
    avoiding standard fds, then we should use opendir_safer and
    openat_safer.  */
 #ifdef GNULIB_defined_DIR
index a17cb0c00448bd982b855daeded8f07c3f252ec9..e7cfaa42618850b7f0148ace0eb6de217d5fa9d5 100644 (file)
@@ -111,7 +111,7 @@ getlogin_r (char *name, size_t size)
     char tty[1024];
     if (ttyname_r (STDIN_FILENO, tty, sizeof (tty)) == 0)
       {
-        /* We cannot use read_utmp here, since it is not multithread-safe.  */
+        /* We cannot use read_utmp here, since it is not thread-safe.  */
         /* Fallback for systems which don't maintain an utmp database
            or for ttys that are not recorded in that the utmp database:
            Look at the owner of that tty.  */
index 09b10b0ddbfe81ffa060d6b2f95cdf384a4d5d27..ed3a87b77e1b366c5a839dd394e52bf2c80c26bb 100644 (file)
@@ -1,4 +1,4 @@
-/* Retrieve the umask of the process (multithread-safe).
+/* Retrieve the umask of the process (thread-safe).
    Copyright (C) 2020-2026 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
@@ -26,7 +26,7 @@
    Each has its drawbacks:
      (a) Causes additional system calls. May fail in some rare cases.
      (b) Causes globally visible code complexity / maintainer effort.
-     (c) Is not multithread-safe: open() calls in other threads may
+     (c) Is not thread-safe: open() calls in other threads may
          create files with wrong access permissions.
 
    Here we implement (a), as the least evil.  */
@@ -51,7 +51,7 @@ mode_t
 getumask (void)
 {
 #if 0
-  /* This is not multithread-safe!  */
+  /* This is not thread-safe!  */
   mode_t mask = umask (0);
   umask (mask);
   return mask;
index bbc253e574f70d248b5749fd8cf3cace39774cbd..3b5e0c16400f6babfd3d5cb61154610d49c1cdd6 100644 (file)
@@ -157,7 +157,7 @@ extern int glthread_in_use (void);
    that libpthread would not be loaded after libintl; i.e. if libintl is
    loaded first, by an executable that does not depend on libpthread, and
    then a module is dynamically loaded that depends on libpthread, libintl
-   will not be multithread-safe.  */
+   will not be thread-safe.  */
 
 /* The way to test at runtime whether libpthread is present is to test
    whether a function pointer's value, such as &pthread_mutex_init, is
index ac20b64cca3a713efd7f98178ba3a96e0422e0b4..d80534c7944afc52fab3dc9613ac87374bb9549f 100644 (file)
@@ -110,7 +110,7 @@ extern int glthread_in_use (void);
    that libpthread would not be loaded after libintl; i.e. if libintl is
    loaded first, by an executable that does not depend on libpthread, and
    then a module is dynamically loaded that depends on libpthread, libintl
-   will not be multithread-safe.  */
+   will not be thread-safe.  */
 
 /* The way to test at runtime whether libpthread is present is to test
    whether a function pointer's value, such as &pthread_mutex_init, is
index c8cb28a2060420e8f77276a300d5e00491f40781..f881f2ce00f7cf458a007d4e80cae388c284ca1c 100644 (file)
@@ -162,7 +162,7 @@ extern int glthread_in_use (void);
    that libpthread would not be loaded after libintl; i.e. if libintl is
    loaded first, by an executable that does not depend on libpthread, and
    then a module is dynamically loaded that depends on libpthread, libintl
-   will not be multithread-safe.  */
+   will not be thread-safe.  */
 
 /* The way to test at runtime whether libpthread is present is to test
    whether a function pointer's value, such as &pthread_mutex_init, is
index 8fa6c0e69988c21713473e36b6cd3a1171496dcc..68ca4413894a0d8b4d65e815a6d78c76762edea0 100644 (file)
@@ -62,7 +62,7 @@ extern "C" {
       As explained above, this approach has uncontrollable dangers for
       security.
 
-      This approach is normally not usable in multithreaded programs, because
+      This approach is normally not usable in multithreaded processes, because
       you cannot know what kind of system calls the other threads could be
       doing during the time the privileges are enabled.
 
index 22dc38d34dc615b0f2002d9509fb0cf398b9bb19..48409137f4f230678425e97d7b3867ba0d1fcb55 100644 (file)
@@ -781,7 +781,7 @@ static const struct table_entry locale_table[] =
    The result must not be freed; it is statically allocated.  The result
    becomes invalid when setlocale() is used to change the global locale, or
    when the value of one of the environment variables LC_ALL, LC_CTYPE, LANG
-   is changed; threads in multithreaded programs should not do this.
+   is changed; threads in multithreaded processes should not do this.
    If the canonical name cannot be determined, the result is a non-canonical
    name.  */
 
@@ -793,7 +793,7 @@ locale_charset (void)
 {
   const char *codeset;
 
-  /* This function must be multithread-safe.  To achieve this without using
+  /* This function must be thread-safe.  To achieve this without using
      thread-local storage, we use a simple strcpy or memcpy to fill this static
      buffer.  Filling it through, for example, strcpy + strcat would not be
      guaranteed to leave the buffer's contents intact if another thread is
@@ -839,7 +839,7 @@ locale_charset (void)
                 return dot;
               if (modifier - dot < sizeof (resultbuf))
                 {
-                  /* This way of filling resultbuf is multithread-safe.  */
+                  /* This way of filling resultbuf is thread-safe.  */
                   memcpy (resultbuf, dot, modifier - dot);
                   resultbuf [modifier - dot] = '\0';
                   return resultbuf;
@@ -940,7 +940,7 @@ locale_charset (void)
             return dot;
           if (modifier - dot < sizeof (resultbuf))
             {
-              /* This way of filling resultbuf is multithread-safe.  */
+              /* This way of filling resultbuf is thread-safe.  */
               memcpy (resultbuf, dot, modifier - dot);
               resultbuf [modifier - dot] = '\0';
               return resultbuf;
index 59f748d7b7087c450fd827bcc2b8a024ed256545..43c65113ce552d2977f67b568e7cf65b2d26817b 100644 (file)
@@ -29,7 +29,7 @@ extern "C" {
    The result must not be freed; it is statically allocated.  The result
    becomes invalid when setlocale() is used to change the global locale, or
    when the value of one of the environment variables LC_ALL, LC_CTYPE, LANG
-   is changed; threads in multithreaded programs should not do this.
+   is changed; threads in multithreaded processes should not do this.
    If the canonical name cannot be determined, the result is a non-canonical
    name.  */
 extern const char * locale_charset (void);
index cf6976f31941d332ff9c9676c9a76ed9b98b3e13..6c24742c9e72bcbbc8bb5a11b81e7af8b2034e21 100644 (file)
@@ -56,7 +56,7 @@ rpl_localtime (const time_t *tp)
   const char *tz = getenv ("TZ");
   if (tz != NULL && strchr (tz, '/') != NULL)
     {
-      /* Neutralize it, in a way that is multithread-safe.
+      /* Neutralize it, in a way that is thread-safe.
          (If we were to use _putenv ("TZ="), it would free the memory allocated
          for the environment variable "TZ", and thus other threads that are
          using the previously fetched value of getenv ("TZ") could crash.)  */
index 21a3998cd3ae026f42fad91e0944b24975a86a88..d90e535eb52751d396a829119dcbc130e6a77074 100644 (file)
@@ -79,7 +79,7 @@
     if (enc == enc_utf8) /* UTF-8 */
       {
         /* Achieve
-             - multi-thread safety and
+             - thread safety and
              - the ability to produce wide character values > WCHAR_MAX
            by not calling mbtowc() at all.  */
 #include "mbrtowc-impl-utf8.h"
@@ -87,7 +87,7 @@
     else
       {
         /* The hidden internal state of mbtowc would make this function not
-           multi-thread safe.  Achieve multi-thread safety through a lock.  */
+           thread-safe.  Achieve thread safety through a lock.  */
         {
           wchar_t wc;
           res = mbtowc_with_lock (&wc, p, m);
index 7b5f3998948d76a45cde21aa91eef64280f40d02..714e26081d9bab81a2753d2a355026c653b1c9ae 100644 (file)
@@ -75,7 +75,7 @@ extern "C" {
 
 /* Ensure that the invalid parameter handler in installed that just returns.
    Because we assume no other part of the program installs a different
-   invalid parameter handler, this solution is multithread-safe.  */
+   invalid parameter handler, this solution is thread-safe.  */
 extern void gl_msvc_inval_ensure_handler (void);
 
 #  ifdef __cplusplus
@@ -112,7 +112,7 @@ extern void gl_msvc_inval_ensure_handler (void);
 /* A compiler that supports __try/__except, as described in the page
    "try-except statement" on microsoft.com
    <https://docs.microsoft.com/en-us/cpp/cpp/try-except-statement>.
-   With __try/__except, we can use the multithread-safe exception handling.  */
+   With __try/__except, we can use the thread-safe exception handling.  */
 
 #   ifdef __cplusplus
 extern "C" {
@@ -121,7 +121,7 @@ extern "C" {
 /* Ensure that the invalid parameter handler in installed that raises a
    software exception with code STATUS_GNULIB_INVALID_PARAMETER.
    Because we assume no other part of the program installs a different
-   invalid parameter handler, this solution is multithread-safe.  */
+   invalid parameter handler, this solution is thread-safe.  */
 extern void gl_msvc_inval_ensure_handler (void);
 
 #   ifdef __cplusplus
@@ -166,7 +166,7 @@ struct gl_msvc_inval_per_thread
    control to the gl_msvc_inval_restart if it is valid, or raises a
    software exception with code STATUS_GNULIB_INVALID_PARAMETER otherwise.
    Because we assume no other part of the program installs a different
-   invalid parameter handler, this solution is multithread-safe.  */
+   invalid parameter handler, this solution is thread-safe.  */
 extern void gl_msvc_inval_ensure_handler (void);
 
 /* Return a pointer to the per-thread data for the current thread.  */
index ff8fd89efe4d230b26d0abfcd991dc0cf66b30ff..a3954fca2f8f1cccbd481d30420db5fa11e4536a 100644 (file)
@@ -59,7 +59,7 @@
 
 #endif
 
-/* nl_langinfo() must be multithread-safe.  To achieve this without using
+/* nl_langinfo() must be thread-safe.  To achieve this without using
    thread-local storage:
      1. We use a specific static buffer for each possible argument.
         So that different threads can call nl_langinfo with different arguments,
index c8b825469630ee0c427a614004b62c4930e57d82..7be34fa0d8a5d37c42d76a027f527523056355e3 100644 (file)
@@ -32,7 +32,7 @@ extern "C" {
 #endif
 
 
-/* Note: The functions declared in this file are NOT multithread-safe.  */
+/* Note: The functions declared in this file are NOT thread-safe.  */
 
 
 /* Free a memory block.
index 1ad2c5a98f2b7eb46145422d7f6187507babeddd..021e8741ea3dff16505c9a8748117455c9e4e531 100644 (file)
@@ -29,7 +29,7 @@
 /* The following is identical to the function from glibc's
    sysdeps/posix/pread.c */
 
-/* Note: This implementation of pread is not multithread-safe.  */
+/* Note: This implementation of pread is not thread-safe.  */
 
 ssize_t
 pread (int fd, void *buf, size_t nbyte, off_t offset)
index 50f8de26e40b8f0570d3781e32b304b39044b0d9..5c361541c7697565ef0cfcba62e24d8c1d7cdd1b 100644 (file)
@@ -28,7 +28,7 @@
 #define __set_errno(Val) errno = (Val)
 #define __libc_write(f,b,n) write (f, b, n)
 
-/* Note: This implementation of pwrite is not multithread-safe.  */
+/* Note: This implementation of pwrite is not thread-safe.  */
 
 ssize_t
 pwrite (int fd, const void *buf, size_t nbyte, off_t offset)
index 7b6af7eb554638294299dd96ea054edb8b54e486..badbbc4331e4c61713893e763db878408488fd9a 100644 (file)
@@ -330,7 +330,7 @@ char *extract_trimmed_name (const STRUCT_UTMP *ut)
    If OPTIONS & READ_UTMP_NO_BOOT_TIME is nonzero, omit the boot time
    entries.
 
-   This function is not multithread-safe, since on many platforms it
+   This function is not thread-safe, since on many platforms it
    invokes the functions setutxent, getutxent, endutxent.  These
    functions are needed because they may lock FILE (so that we don't
    read garbage when a concurrent process writes to FILE), but their
index f3b36a49e420f72e74f11c954116f668db86cc9b..ce5f45a3530dc8b24af32a546c0906ff7fbc3192 100644 (file)
@@ -60,7 +60,7 @@
 /* The results of opendir() in this file are not used with dirfd and fchdir,
    and we do not leak fds to any single-threaded code that could use stdio,
    therefore save some unnecessary recursion in fchdir.c and opendir_safer.c.
-   FIXME - if the kernel ever adds support for multi-thread safety for
+   FIXME - if the kernel ever adds support for thread safety for
    avoiding standard fds, then we should use opendir_safer.  */
 # ifdef GNULIB_defined_DIR
 #  undef DIR
index 1ca15f76adaf3907c261376eba94d4c6d9c83ad0..780ace53a8d54ccec9c666de7ba31286000027c2 100644 (file)
@@ -42,7 +42,7 @@ setlocale_messages (const char *name)
 const char *
 setlocale_messages_null (void)
 {
-  /* This implementation is multithread-safe, assuming no other thread changes
+  /* This implementation is thread-safe, assuming no other thread changes
      the LC_MESSAGES locale category.  */
   return lc_messages_name;
 }
@@ -227,7 +227,7 @@ setlocale_fixed (int category, const char *name)
 const char *
 setlocale_fixed_null (int category)
 {
-  /* This implementation is multithread-safe, assuming no other thread changes
+  /* This implementation is thread-safe, assuming no other thread changes
      any locale category.  */
   if (category == LC_ALL)
     return lc_all_name;
index d46a30dbe52827419fa4a7bbdf45296d4f032988..b95ae4452ad3a6e84c8bcc861daaf153570fe7ad 100644 (file)
@@ -33,7 +33,7 @@ extern "C" {
 extern const char *setlocale_messages (const char *name);
 
 /* setlocale_messages_null () is like setlocale (LC_MESSAGES, NULL), except that
-   it is guaranteed to be multithread-safe.  */
+   it is guaranteed to be thread-safe.  */
 extern const char *setlocale_messages_null (void);
 
 #endif
index 3871a3fa1635967fd34dbf2bb0f7c855f3c853d0..022105050ffa8407b7ac07378acebc11b514f39c 100644 (file)
@@ -66,7 +66,7 @@ extern void gl_locale_name_canonicalize (char *name);
 #  error "This file should only be compiled if NEED_SETLOCALE_IMPROVED || NEED_SETLOCALE_MTSAFE."
 # endif
 
-/* Like setlocale, but guaranteed to be multithread-safe if LOCALE == NULL.  */
+/* Like setlocale, but guaranteed to be thread-safe if LOCALE == NULL.  */
 # if !SETLOCALE_NULL_ALL_MTSAFE || !SETLOCALE_NULL_ONE_MTSAFE /* i.e. if NEED_SETLOCALE_MTSAFE */
 
 #  if NEED_SETLOCALE_IMPROVED
index 39b6766cb083bee108230ca79e5e145779abf9a0..0230ffc52184974675f044e112977445ac33264b 100644 (file)
@@ -189,7 +189,7 @@ setlocale_null (int category)
   return setlocale_null_unlocked (category);
 #else
 
-  /* This call must be multithread-safe.  To achieve this without using
+  /* This call must be thread-safe.  To achieve this without using
      thread-local storage:
        1. We use a specific static buffer for each possible CATEGORY
           argument.  So that different threads can call setlocale_mtsafe
index dbd646b319f229d0e557a0411c4766a1aabdf28b..a4e753fc96b639a60e33f783646549f3f680e3a7 100644 (file)
@@ -55,7 +55,7 @@ extern "C" {
    CATEGORY is invalid, or ERANGE if BUFSIZE is smaller than the length needed
    size (including the trailing NUL byte).  In the latter case, a truncated
    result is returned in BUF, but still NUL-terminated if BUFSIZE > 0.
-   This call is guaranteed to be multithread-safe only if
+   This call is guaranteed to be thread-safe only if
      - CATEGORY != LC_ALL and SETLOCALE_NULL_ONE_MTSAFE is true, or
      - CATEGORY == LC_ALL and SETLOCALE_NULL_ALL_MTSAFE is true,
    and the other threads must not make other setlocale invocations (since
@@ -65,7 +65,7 @@ extern int setlocale_null_r_unlocked (int category, char *buf, size_t bufsize)
 
 /* setlocale_null_unlocked (CATEGORY) is like setlocale (CATEGORY, NULL).
    The return value is NULL if CATEGORY is invalid.
-   This call is guaranteed to be multithread-safe only if
+   This call is guaranteed to be thread-safe only if
      - CATEGORY != LC_ALL and SETLOCALE_NULL_ONE_MTSAFE is true, or
      - CATEGORY == LC_ALL and SETLOCALE_NULL_ALL_MTSAFE is true,
    and the other threads must not make other setlocale invocations (since
@@ -74,7 +74,7 @@ extern const char *setlocale_null_unlocked (int category);
 
 /* setlocale_null_r (CATEGORY, BUF, BUFSIZE) is like setlocale (CATEGORY, NULL),
    except that
-     - it is guaranteed to be multithread-safe,
+     - it is guaranteed to be thread-safe,
      - it returns the resulting locale category name or locale name in the
        user-supplied buffer BUF, which must be BUFSIZE bytes long.
    The recommended minimum buffer size is
@@ -84,7 +84,7 @@ extern const char *setlocale_null_unlocked (int category);
    CATEGORY is invalid, or ERANGE if BUFSIZE is smaller than the length needed
    size (including the trailing NUL byte).  In the latter case, a truncated
    result is returned in BUF, but still NUL-terminated if BUFSIZE > 0.
-   For this call to be multithread-safe, *all* calls to
+   For this call to be thread-safe, *all* calls to
    setlocale (CATEGORY, NULL) in all other threads must have been converted
    to use setlocale_null_r or setlocale_null as well, and the other threads
    must not make other setlocale invocations (since changing the global locale
@@ -93,9 +93,9 @@ extern int setlocale_null_r (int category, char *buf, size_t bufsize)
   _GL_ARG_NONNULL ((2));
 
 /* setlocale_null (CATEGORY) is like setlocale (CATEGORY, NULL), except that
-   it is guaranteed to be multithread-safe.
+   it is guaranteed to be thread-safe.
    The return value is NULL if CATEGORY is invalid.
-   For this call to be multithread-safe, *all* calls to
+   For this call to be thread-safe, *all* calls to
    setlocale (CATEGORY, NULL) in all other threads must have been converted
    to use setlocale_null_r or setlocale_null as well, and the other threads
    must not make other setlocale invocations (since changing the global locale
index 76c871d7be689ba37b5dfff797f72d4a3ed5daa9..964dae4320560c5cd26094c778642babf519b239 100644 (file)
@@ -57,8 +57,9 @@ extern "C" {
 
 /* Install a SIGPIPE handler that invokes PREPARE_DIE and then emits an
    error message and exits.  PREPARE_DIE may be NULL, meaning a no-op.
-   In a multithreaded program, this function must be called in the main thread,
-   before any other thread gets created.  */
+   This function should be called only in single-threaded processes.
+   In a multithreaded process, this function is typically called early
+   in the main thread while the process is still single-threaded.  */
 extern void install_sigpipe_die_handler (void (*prepare_die) (void));
 
 
index 25b698d869ba40c759be0627f7cfd7c1b004d5ff..2c5ad72ab211ab086a3972ff20d7f31f4e64bf57 100644 (file)
@@ -364,8 +364,8 @@ pthread_sigmask (int operation, const sigset_t *set, sigset_t *old_set)
   return 0;
 }
 
-/* sigprocmask is like pthread_sigmask, except that it has undefined behaviour
-   in multithreaded applications and a different return value convention.  */
+/* sigprocmask is like pthread_sigmask, but has unspecified behaviour
+   in multithreaded processes and a different return value convention.  */
 int
 sigprocmask (int operation, const sigset_t *set, sigset_t *old_set)
 {
index ce98698dbd2e90c2f1ba244c2e7ac7aaab607e67..beffa7d148feaa744e026138883d3ff70f85c09a 100644 (file)
@@ -42,7 +42,7 @@ close_fd_maybe_socket (const struct fd_hook *remaining_list,
                        gl_close_fn primary,
                        int fd)
 {
-  /* Note about multithread-safety: There is a race condition where, between
+  /* Note about thread safety: There is a race condition where, between
      our calls to closesocket() and the primary close(), some other thread
      could make system calls that allocate precisely the same HANDLE value
      as sock; then the primary close() would call CloseHandle() on it.  */
index 810bb79b53a26526ad67ddf64bf3b386a2b7bed9..63fcbe96091f34a9f2381151f1bc51a064755e1f 100644 (file)
@@ -480,7 +480,7 @@ vma_iterate_bsd (struct callback_locals *locals)
   size_t len = 0;
   if (sysctl (info_path, 4, NULL, &len, NULL, 0) < 0)
     return -1;
-  /* Allow for small variations over time.  In a multithreaded program
+  /* Allow for small variations over time.  In a multithreaded process
      new VMAs can be allocated at any moment.  */
   len = 2 * len + 200;
   /* Allocate memneed bytes of memory.
index c451f055622efae0cabb2600ae2e34d3d7a4c709..9d8554f2cf3b2ff4b6f180c0fec72bebdbf1b89d 100644 (file)
@@ -55,7 +55,7 @@ strerror (int n)
      buffer, so all other clients of strerror have to see the error
      copied into a buffer that we manage.  This is not thread-safe,
      even if the system strerror is, but portable programs shouldn't
-     be using strerror if they care about thread-safety.  */
+     be using strerror if they care about thread safety.  */
   if (!msg || !*msg)
     {
       static char const fmt[] = "Unknown error %d";
index 4846a2e724afd860fdf9216a3a3682311d67479a..8b6f080e3539e09992a8c53c3b6aa357612d91c9 100644 (file)
@@ -131,7 +131,7 @@ uniconv_register_autodetect (const char *name,
       new_alias->name = new_name;
       new_alias->encodings_to_try = new_try_in_order;
       new_alias->next = NULL;
-      /* FIXME: Not multithread-safe.  */
+      /* FIXME: Not thread-safe.  */
       *autodetect_list_end = new_alias;
       autodetect_list_end = &new_alias->next;
       return 0;
index 93614de91f96336be6b5b758b94f9ed79b97a9f5..f04bbc6514ae3bd2ef3f94e66e7eed345247361d 100644 (file)
@@ -1041,7 +1041,7 @@ _GL_WARN_ON_USE_CXX (strrchr,
    If *STRINGP was already NULL, nothing happens.
    Return the old value of *STRINGP.
 
-   This is a variant of strtok() that is multithread-safe and supports
+   This is a variant of strtok() that is thread-safe and supports
    empty fields.
 
    Caveat: It modifies the original string.
@@ -1179,7 +1179,7 @@ _GL_WARN_ON_USE (strcasestr, "strcasestr does work correctly on character "
         x = strtok_r(NULL, "=", &sp);   // x = NULL
                 // s = "abc\0-def\0"
 
-   This is a variant of strtok() that is multithread-safe.
+   This is a variant of strtok() that is thread-safe.
 
    For the POSIX documentation for this function, see:
    https://pubs.opengroup.org/onlinepubs/9699919799/functions/strtok.html
@@ -1655,7 +1655,7 @@ _GL_WARN_ON_USE (strerror, "strerror is unportable - "
                  "use gnulib module strerror to guarantee non-NULL result");
 #endif
 
-/* Map any int, typically from errno, into an error message.  Multithread-safe.
+/* Map any int, typically from errno, into an error message.  Thread-safe.
    Uses the POSIX declaration, not the glibc declaration.  */
 #if @GNULIB_STRERROR_R@
 # if @REPLACE_STRERROR_R@
@@ -1711,7 +1711,7 @@ _GL_WARN_ON_USE (strerror_l, "strerror_l is unportable - "
 # endif
 #endif
 
-/* Map any int, typically from errno, into an error message.  Multithread-safe,
+/* Map any int, typically from errno, into an error message.  Thread-safe,
    with locale_t argument.
    Not portable! Only provided by gnulib.  */
 #if @GNULIB_STRERROR_L@
index f1fe394bd5e4cf31cec72717420ba3847e50c063..438b65c1a81a79c65ef8a9c96911c585b5bafd57 100644 (file)
@@ -125,10 +125,10 @@ static char
 decimal_point_char (void)
 {
   const char *point;
-  /* Determine it in a multithread-safe way.  We know nl_langinfo is
-     multithread-safe on glibc systems and Mac OS X systems, but is not required
-     to be multithread-safe by POSIX.  sprintf(), however, is multithread-safe.
-     localeconv() is rarely multithread-safe.  */
+  /* Determine it in a thread-safe way.  We know nl_langinfo is
+     thread-safe on glibc systems and Mac OS X systems, but is not required
+     to be thread-safe by POSIX.  sprintf(), however, is thread-safe.
+     localeconv() is rarely thread-safe.  */
 #if HAVE_NL_LANGINFO && (__GLIBC__ || defined __UCLIBC__ || (defined __APPLE__ && defined __MACH__))
   point = nl_langinfo (RADIXCHAR);
 #elif 1
index dbfc030c7b45b35f6831f6f6618192f6fee9aa36..104fd90fc9f9b234ff07cc3876300e91de78d645 100644 (file)
@@ -20,9 +20,9 @@
 #ifndef _THREAD_OPTIM_H
 #define _THREAD_OPTIM_H
 
-/* This file defines a way to optimize multithreaded code for the single-thread
-   case, based on the variable '__libc_single_threaded', defined in
-   glibc >= 2.32.  */
+/* This file defines a way to optimize multithreaded code for the
+   single-threaded case, based on the variable '__libc_single_threaded',
+   defined in glibc >= 2.32.  */
 
 /* Typical use: In a block or function, use
 
      if (mt)
        if (pthread_mutex_unlock (&lock)) abort ();
 
-   The gl_multithreaded () invocation determines whether the program currently
-   is multithreaded.
+   gl_multithreaded () returns true if the process might be multithreaded,
+   and false if the process is definitely single-threaded.
 
-   if (mt) STATEMENT executes STATEMENT in the multithreaded case, and skips
-   it in the single-threaded case.
+   if (mt) STATEMENT executes STATEMENT in the possibly-multithreaded case,
+   and skips it in the single-threaded case.
 
    The code between the gl_multithreaded () invocation and any use of the
    variable 'mt' must not create threads or invoke functions that may
index dfc427f66793c7228b0975bc91ccc23632c8c02b..9da4ffa9297cc2452fdfda13bc3b0a1bc82a37a0 100644 (file)
@@ -22,7 +22,7 @@
 #include <time.h>
 
 /* The replacement functions in this file are only used on native Windows.
-   They are multithread-safe, because the gmtime() and localtime() functions
+   They are thread-safe, because the gmtime() and localtime() functions
    on native Windows — both in the ucrt and in the older MSVCRT — return a
    pointer to a 'struct tm' in thread-local memory.  */
 
index 0e8ea47e7916b9a46acab6c7a31c84c2c98c9ad2..0e27b2d2716ac449c3c0dfeb0c906d1d3e7f5924 100644 (file)
@@ -18,7 +18,7 @@
 /* Written by Paul Eggert.  */
 
 /* Although this module is not thread-safe, any races should be fairly
-   rare and reasonably benign.  For complete thread-safety, use a C
+   rare and reasonably benign.  For complete thread safety, use a C
    library with a working timezone_t type, so that this module is not
    needed.  */
 
index be6604bd17a70a3ee7b6ec8a4b43b2949b96c0e8..3915ea9a0d934e0056f4369d7e35efc46e319db5 100644 (file)
@@ -59,7 +59,7 @@ ttyname_r (int fd, char *buf, size_t buflen)
     }
 #elif HAVE_TTYNAME_R
   /* When ttyname_r exists, use it.  */
-  /* This code is multithread-safe.  */
+  /* This code is thread-safe.  */
   /* On Solaris, ttyname_r always fails if buflen < 128.
      So provide a buffer that is large enough.  */
   char largerbuf[512];
@@ -94,7 +94,7 @@ ttyname_r (int fd, char *buf, size_t buflen)
 # endif
   return 0;
 #elif HAVE_TTYNAME
-  /* Note: This is not multithread-safe.  */
+  /* Note: This is not thread-safe.  */
   char *name = ttyname (fd);
   if (name == NULL)
     return errno;
index 2f2932c068013839905336ac7f06f493333e47a6..564465687848214e9279cb9e8aca8c8660766177 100644 (file)
@@ -58,7 +58,7 @@ rpl_tzset (void)
   const char *tz = getenv ("TZ");
   if (tz != NULL && strchr (tz, '/') != NULL)
     {
-      /* Neutralize it, in a way that is multithread-safe.
+      /* Neutralize it, in a way that is thread-safe.
          (If we were to use _putenv ("TZ="), it would free the memory allocated
          for the environment variable "TZ", and thus other threads that are
          using the previously fetched value of getenv ("TZ") could crash.)  */
index 12bdd45ba1371061c458d5e297cc7dc19e0fa67a..b7c1cfc880dcbb6ca630e8b22bcc37daa66e47d7 100644 (file)
@@ -402,10 +402,10 @@ static char
 decimal_point_char (void)
 {
   const char *point;
-  /* Determine it in a multithread-safe way.  We know nl_langinfo is
-     multithread-safe on glibc systems and Mac OS X systems, but is not required
-     to be multithread-safe by POSIX.  sprintf(), however, is multithread-safe.
-     localeconv() is rarely multithread-safe.  */
+  /* Determine it in a thread-safe way.  We know nl_langinfo is
+     thread-safe on glibc systems and Mac OS X systems, but is not required
+     to be thread-safe by POSIX.  sprintf(), however, is thread-safe.
+     localeconv() is rarely thread-safe.  */
 #  if HAVE_NL_LANGINFO && (__GLIBC__ || defined __UCLIBC__ || (defined __APPLE__ && defined __MACH__))
   point = nl_langinfo (RADIXCHAR);
 #  elif 1
@@ -432,13 +432,13 @@ decimal_point_char (void)
 static const char *
 thousands_separator_char (char stackbuf[10])
 {
-  /* Determine it in a multithread-safe way.
-     We know nl_langinfo is multithread-safe on glibc systems, on Mac OS X
-     systems, and on NetBSD, but is not required to be multithread-safe by
+  /* Determine it in a thread-safe way.
+     We know nl_langinfo is thread-safe on glibc systems, on Mac OS X
+     systems, and on NetBSD, but is not required to be thread-safe by
      POSIX.
-     localeconv() is not guaranteed to be multithread-safe by POSIX either;
+     localeconv() is not guaranteed to be thread-safe by POSIX either;
      however, on native Windows it is (cf. test-localeconv-mt).
-     sprintf(), however, is multithread-safe.  */
+     sprintf(), however, is thread-safe.  */
 #  if HAVE_NL_LANGINFO && (__GLIBC__ || defined __UCLIBC__ || (defined __APPLE__ && defined __MACH__) || defined __NetBSD__)
   return nl_langinfo (THOUSEP);
 #  elif defined _WIN32 && !defined __CYGWIN__
@@ -466,7 +466,7 @@ thousands_separator_char (char stackbuf[10])
 static const DCHAR_T *
 thousands_separator_DCHAR (DCHAR_T stackbuf[10])
 {
-  /* Determine it in a multithread-safe way.  */
+  /* Determine it in a thread-safe way.  */
   char tmpbuf[10];
   const char *tmp = thousands_separator_char (tmpbuf);
   if (*tmp != '\0')
@@ -589,9 +589,9 @@ thousands_separator_wchar (wchar_t stackbuf[10])
 static const signed char *
 grouping_rule (void)
 {
-  /* We know nl_langinfo is multithread-safe on glibc systems and on Cygwin,
-     but is not required to be multithread-safe by POSIX.
-     localeconv() is not guaranteed to be multithread-safe by POSIX either;
+  /* We know nl_langinfo is thread-safe on glibc systems and on Cygwin,
+     but is not required to be thread-safe by POSIX.
+     localeconv() is not guaranteed to be thread-safe by POSIX either;
      however, on all known systems it is (cf. test-localeconv-mt).  */
 #  if __GLIBC__ >= 2
   return (const signed char *) nl_langinfo (GROUPING);
index 310cf00a5bf71e83fbc165d037990285a09d7767..85838060e14eb12366f6b264aea57a57bc1ecfda 100644 (file)
@@ -614,7 +614,7 @@ vma_iterate_bsd (vma_iterate_callback_fn callback, void *data)
   size_t len = 0;
   if (sysctl (info_path, 4, NULL, &len, NULL, 0) < 0)
     return -1;
-  /* Allow for small variations over time.  In a multithreaded program
+  /* Allow for small variations over time.  In a multithreaded process
      new VMAs can be allocated at any moment.  */
   len = 2 * len + 200;
   /* Allocate memneed bytes of memory.
@@ -690,7 +690,7 @@ vma_iterate_bsd (vma_iterate_callback_fn callback, void *data)
   size_t len = 0;
   if (sysctl (info_path, 5, NULL, &len, NULL, 0) < 0)
     return -1;
-  /* Allow for small variations over time.  In a multithreaded program
+  /* Allow for small variations over time.  In a multithreaded process
      new VMAs can be allocated at any moment.  */
   len = 2 * len + 10 * entry_size;
   /* But the system call rejects lengths > 1 MB.  */
@@ -769,7 +769,7 @@ vma_iterate_bsd (vma_iterate_callback_fn callback, void *data)
   size_t len = 0;
   if (sysctl (info_path, 3, NULL, &len, NULL, 0) < 0)
     return -1;
-  /* Allow for small variations over time.  In a multithreaded program
+  /* Allow for small variations over time.  In a multithreaded process
      new VMAs can be allocated at any moment.  */
   len = 2 * len + 10 * sizeof (struct kinfo_vmentry);
   /* But the system call rejects lengths > 64 KB.  */
index a9b8de789a7d2b72cb4c799c38867859bda58c39..e472731e59556cc85fbc9d783c7d9b1b37299bb2 100644 (file)
@@ -65,7 +65,7 @@ wcrtomb (char *s, wchar_t wc, mbstate_t *ps)
 #else                                   /* HP-UX 11.00, mingw */
       /* Fallback for platforms that don't have wcrtomb().
          Implement on top of wctomb().
-         This code is not multithread-safe.  */
+         This code is not thread-safe.  */
       int ret = wctomb (s, wc);
 
       if (ret >= 0)
index 8a8b516485ce7387297092ca722f47ea150c82a0..843e648177f8c64ec7fb0c7220ad31b619fcf009 100644 (file)
@@ -54,7 +54,7 @@ rpl_wcsftime (wchar_t *buf, size_t bufsize, const wchar_t *format, const struct
   const char *tz = getenv ("TZ");
   if (tz != NULL && strchr (tz, '/') != NULL)
     {
-      /* Neutralize it, in a way that is multithread-safe.
+      /* Neutralize it, in a way that is thread-safe.
          (If we were to use _putenv ("TZ="), it would free the memory allocated
          for the environment variable "TZ", and thus other threads that are
          using the previously fetched value of getenv ("TZ") could crash.)  */
index 23fbe700d97f15938020f9bfcbcbb4206b2f1e53..62e71d2af718ec393860e8847570e2ee7d8d1723 100644 (file)
@@ -33,7 +33,7 @@ extern "C" {
    MESSAGE and the (internationalized) description of the error code ERRNUM.
    Upon [ENOMEM] memory allocation error, call xalloc_die.
 
-   This function is multithread-safe.  */
+   This function is thread-safe.  */
 extern char *xstrerror (const char *message, int errnum)
        _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE
        _GL_ATTRIBUTE_RETURNS_NONNULL;
index 8fba00da279e4188d7a67dfd4d86e0a9d674c9f2..56189a7d7879bda80f758e415a1faf8f7a6e137a 100644 (file)
@@ -892,7 +892,7 @@ AC_DEFUN([gl_COMMON_BODY], [
 # endif
 #endif
 
-/* The following attributes enable detection of multithread-safety problems
+/* The following attributes enable detection of thread safety problems
    and resource leaks at compile-time, by clang ≥ 15, when the warning option
    -Wthread-safety is enabled.  For usage, see
    <https://clang.llvm.org/docs/ThreadSafetyAnalysis.html>.  */
index a3ec57f76682ad4fb9d255932a6122a465fed121..b669fc1f940546931da9da313a38a5879a0e2694 100644 (file)
@@ -17,13 +17,13 @@ AC_DEFUN([gl_FUNC_NL_LANGINFO],
   AC_CHECK_HEADERS_ONCE([threads.h])
   if test $ac_cv_func_nl_langinfo = yes; then
     # On macOS 26, Solaris 10, and Solaris 11.3, nl_langinfo is not
-    # multithread-safe.
+    # thread-safe.
     case "$host_os" in
       darwin* | solaris*) NL_LANGINFO_MTSAFE=0 ;;
       *)                  NL_LANGINFO_MTSAFE=1 ;;
     esac
     AC_DEFINE_UNQUOTED([NL_LANGINFO_MTSAFE], [$NL_LANGINFO_MTSAFE],
-      [Define to 1 if nl_langinfo is multithread-safe.])
+      [Define to 1 if nl_langinfo is thread-safe.])
     if test $HAVE_LANGINFO_CODESET = 1 \
        && test $HAVE_LANGINFO_ALTMON = 1 \
        && test $HAVE_LANGINFO_ABALTMON = 1 \
index 0fd0a740101fb557b51ba868ba9b71c9482f19a1..b9c5414d7209a838e12dc8276fdd83b3050faed2 100644 (file)
@@ -103,14 +103,14 @@ AC_DEFUN([gl_FUNC_PTHREAD_SIGMASK],
     ])
   fi
 
-  dnl We want to be able to use pthread_sigmask as a multithread-safe
+  dnl We want to be able to use pthread_sigmask as a thread-safe
   dnl replacement of sigprocmask, in both single-threaded and multithreaded
-  dnl programs. Therefore enforce PTHREAD_SIGMASK_LIB to be empty, whenever
+  dnl processes. Therefore enforce PTHREAD_SIGMASK_LIB to be empty, whenever
   dnl possible.
   if test -n "$PTHREAD_SIGMASK_LIB"; then
     dnl We get here on glibc ≤ 2.31, NetBSD, OpenBSD ≤ 5.8, AIX.
     dnl Except on AIX, pthread_sigmask and sigprocmask are equivalent.
-    dnl Whereas on AIX, sigprocmask is not allowed in multithreaded programs
+    dnl Whereas on AIX, sigprocmask is not allowed in multithreaded processes
     dnl <https://www.ibm.com/docs/en/aix/7.2.0?topic=s-sigprocmask-sigsetmask-sigblock-subroutine>.
     AC_REQUIRE([AC_CANONICAL_HOST])
     case "$host_os" in
index 9a646f3b8657bf9fd9ea48f6a14403ee68a60ba1..d4b5364f997ef556af55bbe7974c28b0d603a521 100644 (file)
@@ -46,7 +46,7 @@ AC_DEFUN([gl_FUNC_RANDOM],
       future*) REPLACE_SETSTATE=1 ;;
     esac
   fi
-  dnl On several platforms, random() is not multithread-safe.
+  dnl On several platforms, random() is not thread-safe.
   if test $ac_cv_func_initstate = no || test $ac_cv_func_setstate = no \
      || case "$host_os" in \
           darwin* | freebsd* | solaris* | cygwin* | haiku*) true ;; \
index 8a8841b8701c105ac6d54e2c26b8e00687f4d20c..0b6b91c100078771d302978d86838a5bb8542ac7 100644 (file)
@@ -32,13 +32,13 @@ AC_DEFUN([gl_FUNC_SETLOCALE],
   AC_DEFINE_UNQUOTED([NEED_SETLOCALE_IMPROVED], [$NEED_SETLOCALE_IMPROVED],
     [Define to 1 to enable general improvements of setlocale.])
 
-  dnl Test whether we need a multithread-safe setlocale(category,NULL).
+  dnl Test whether we need a thread-safe setlocale(category,NULL).
   NEED_SETLOCALE_MTSAFE=0
   if test $SETLOCALE_NULL_ALL_MTSAFE = 0 || test $SETLOCALE_NULL_ONE_MTSAFE = 0; then
     NEED_SETLOCALE_MTSAFE=1
   fi
   AC_DEFINE_UNQUOTED([NEED_SETLOCALE_MTSAFE], [$NEED_SETLOCALE_MTSAFE],
-    [Define to 1 to enable a multithread-safety fix of setlocale.])
+    [Define to 1 to enable a thread safety fix of setlocale.])
 
   if test $NEED_SETLOCALE_IMPROVED = 1 || test $NEED_SETLOCALE_MTSAFE = 1; then
     REPLACE_SETLOCALE=1
index b67272455399789da23589f01fd35986abd4f18f..b5a6c1c6100c9eb45a77a38832199fc9060474f8 100644 (file)
@@ -12,7 +12,7 @@ AC_DEFUN_ONCE([gl_FUNC_SETLOCALE_NULL],
   AC_REQUIRE([gl_PTHREADLIB])
   AC_CHECK_HEADERS_ONCE([threads.h])
 
-  AC_CACHE_CHECK([whether setlocale (LC_ALL, NULL) is multithread-safe],
+  AC_CACHE_CHECK([whether setlocale (LC_ALL, NULL) is thread-safe],
     [gl_cv_func_setlocale_null_all_mtsafe],
     [case "$host_os" in
        # Guess no on musl libc, macOS, FreeBSD, NetBSD, OpenBSD, AIX, Haiku.
@@ -54,10 +54,10 @@ AC_DEFUN_ONCE([gl_FUNC_SETLOCALE_NULL],
     *)    SETLOCALE_NULL_ALL_MTSAFE=0 ;;
   esac
   AC_DEFINE_UNQUOTED([SETLOCALE_NULL_ALL_MTSAFE], [$SETLOCALE_NULL_ALL_MTSAFE],
-    [Define to 1 if setlocale (LC_ALL, NULL) is multithread-safe.])
+    [Define to 1 if setlocale (LC_ALL, NULL) is thread-safe.])
 
   dnl This is about a single category (not LC_ALL).
-  AC_CACHE_CHECK([whether setlocale (category, NULL) is multithread-safe],
+  AC_CACHE_CHECK([whether setlocale (category, NULL) is thread-safe],
     [gl_cv_func_setlocale_null_one_mtsafe],
     [case "$host_os" in
        # Guess no on OpenBSD, AIX.
@@ -85,7 +85,7 @@ AC_DEFUN_ONCE([gl_FUNC_SETLOCALE_NULL],
     *)    SETLOCALE_NULL_ONE_MTSAFE=0 ;;
   esac
   AC_DEFINE_UNQUOTED([SETLOCALE_NULL_ONE_MTSAFE], [$SETLOCALE_NULL_ONE_MTSAFE],
-    [Define to 1 if setlocale (category, NULL) is multithread-safe.])
+    [Define to 1 if setlocale (category, NULL) is thread-safe.])
 
   dnl Determine link dependencies of lib/setlocale_null.c and lib/setlocale-lock.c.
   if test $SETLOCALE_NULL_ALL_MTSAFE = 0 || test $SETLOCALE_NULL_ONE_MTSAFE = 0; then
index bdea4b9782d474624fb0fe4762c97b433d5ea000..a16d62623be32888bc84b271b5bfb658442d3568 100644 (file)
@@ -161,13 +161,13 @@ dnl -------------
 dnl Tests for the libraries needs for using the POSIX threads API.
 dnl Sets the variable LIBPTHREAD to the linker options for use in a Makefile.
 dnl Sets the variable LIBPMULTITHREAD, for programs that really need
-dnl multithread functionality. The difference between LIBPTHREAD and
+dnl multithreading.  The difference between LIBPTHREAD and
 dnl LIBPMULTITHREAD is that on platforms supporting weak symbols, typically
 dnl LIBPTHREAD is empty whereas LIBPMULTITHREAD is not.
 dnl Sets the variable SCHED_YIELD_LIB to the linker options needed to use the
 dnl sched_yield() function.
 dnl Adds to CPPFLAGS the flag -D_REENTRANT or -D_THREAD_SAFE if needed for
-dnl multithread-safe programs.
+dnl thread-safe programs.
 dnl Defines the C macro HAVE_PTHREAD_API if (at least parts of) the POSIX
 dnl threads API is available.
 
@@ -321,7 +321,7 @@ dnl ---------------
 dnl Tests for the libraries needs for using the ISO C threads API.
 dnl Sets the variable LIBSTDTHREAD to the linker options for use in a Makefile.
 dnl Adds to CPPFLAGS the flag -D_REENTRANT or -D_THREAD_SAFE if needed for
-dnl multithread-safe programs.
+dnl thread-safe programs.
 dnl Defines the C macro HAVE_THREADS_H if (at least parts of) the ISO C threads
 dnl API is available.
 
@@ -400,11 +400,11 @@ dnl Sets the variables LIBTHREAD and LTLIBTHREAD to the linker options for use
 dnl in a Makefile (LIBTHREAD for use without libtool, LTLIBTHREAD for use with
 dnl libtool).
 dnl Sets the variables LIBMULTITHREAD and LTLIBMULTITHREAD similarly, for
-dnl programs that really need multithread functionality. The difference
+dnl programs that really need multithreading.  The difference
 dnl between LIBTHREAD and LIBMULTITHREAD is that on platforms supporting weak
 dnl symbols, typically LIBTHREAD is empty whereas LIBMULTITHREAD is not.
 dnl Adds to CPPFLAGS the flag -D_REENTRANT or -D_THREAD_SAFE if needed for
-dnl multithread-safe programs.
+dnl thread-safe programs.
 dnl Since support for GNU pth was removed, $LTLIBTHREAD and $LIBTHREAD have the
 dnl same value, and similarly $LTLIBMULTITHREAD and $LIBMULTITHREAD have the
 dnl same value. Only system libraries are needed.
@@ -436,12 +436,12 @@ AC_DEFUN([gl_THREADLIB_EARLY_BODY],
   m4_divert_text([DEFAULTS], [gl_use_winpthreads_default=no])
   dnl Don't display the --disable-threads option
   dnl   - if the package builds one or more libraries, because libraries must
-  dnl     always be multithread-safe (as far as possible),
+  dnl     always be thread-safe (as far as possible),
   dnl   - if the package defines gl_THREADLIB_DEFAULT_NO, because the option
   dnl     would then be a no-op.
   AC_ARG_ENABLE([threads],
 AS_HELP_STRING([[--enable-threads={isoc|posix|isoc+posix|windows}]], [specify multithreading API])m4_ifdef([LT_INIT], [], [m4_ifdef([gl_THREADLIB_DEFAULT_NO], [], [
-AS_HELP_STRING([[--disable-threads]], [build without multithread safety])])]),
+AS_HELP_STRING([[--disable-threads]], [build without thread safety])])]),
     [gl_use_threads=$enableval],
     [if test -n "$gl_use_threads_default"; then
        gl_use_threads="$gl_use_threads_default"
@@ -485,7 +485,7 @@ AC_DEFUN([gl_THREADLIB_BODY],
   LTLIBMULTITHREAD=
   AS_IF([test "$gl_use_threads" = no],
    [AC_DEFINE([AVOID_ANY_THREADS], [1],
-      [Define if no multithread safety and no multithreading is desired.])],
+      [Define if neither thread safety nor multithreading is desired.])],
    [
     dnl Check whether the compiler and linker support weak declarations.
     gl_WEAK_SYMBOLS
@@ -572,7 +572,7 @@ AC_DEFUN([gl_THREADLIB_BODY],
          ])
     ])
    ])
-  AC_MSG_CHECKING([for multithread API to use])
+  AC_MSG_CHECKING([for multithreading API to use])
   AC_MSG_RESULT([$gl_threads_api])
   AC_SUBST([LIBTHREAD])
   AC_SUBST([LTLIBTHREAD])
index 525a1efaa3853257851eadcfefdab4328f019b75..cf968079bb80e66401a800152f1b61a9309828a8 100644 (file)
@@ -1,5 +1,5 @@
 Description:
-getumask() function: retrieve the umask of the process (multithread-safe)
+getumask() function: retrieve the umask of the process (thread-safe)
 
 Files:
 lib/getumask.c
index 62b17a4efa61af96194a0f1f9769129eb5f971cf..3f8527b41cb26450a35800e00f0e6f3126a27c84 100644 (file)
@@ -2,7 +2,7 @@ Description:
 A simplified variant of GNU libsigsegv.
 It implements the most important features of GNU libsigsegv: catching SIGSEGV
 and catching stack overflow. It does *not* implement the 'sigsegv_dispatcher'
-type (which is not multithread-safe).
+type (which is not thread-safe).
 It supports all modern Unix-like platforms: Linux, Hurd, FreeBSD, NetBSD,
 OpenBSD, macOS, AIX, Solaris, Cygwin, Haiku. It does *not* support HP-UX, Minix,
 native Windows; on these platforms the module compiles and provides a
index 2ed3417e6881caa1e50189522ba5632eaa4fc891..0700ffbff04781341e5c7bbfabe160cb993ddcfb 100644 (file)
@@ -12,10 +12,8 @@ AC_DEFINE([GNULIB_STDIO_SINGLE_THREAD], [1],
   [Define to 1 if you want the FILE stream functions getc, putc, etc.
    to use unlocked I/O if available, throughout the package.
    Unlocked I/O can improve performance, sometimes dramatically.
-   But unlocked I/O is safe only in single-threaded programs,
-   as well as in multithreaded programs for which you can guarantee that
-   every FILE stream, including stdin, stdout, stderr, is used only
-   in a single thread.])
+   But unlocked I/O is safe only in processes in which two threads
+   never simultaneously access the same FILE stream.])
 
 AC_DEFINE([USE_UNLOCKED_IO], [GNULIB_STDIO_SINGLE_THREAD],
   [An alias of GNULIB_STDIO_SINGLE_THREAD.])
index a1c5c35a3b95dab728e636456e0ca24a113c2933..b26c05264a18729ff0742df90fd714a54ed8e7c0 100644 (file)
@@ -1,6 +1,6 @@
 Description:
 xstrerror() function: return diagnostic string based on error code.
-Multithread-safe. With out-of-memory checking.
+thread-safe. With out-of-memory checking.
 
 Files:
 lib/xstrerror.h
index 1c67837bf77c4b0c196747614e1573b7b56914ac..f898a839e4d35a328f60cd01bd603cedd7f0ad42 100644 (file)
@@ -1,4 +1,4 @@
-/* Multithread-safety test for c_strtod().
+/* Thread safety test for c_strtod().
    Copyright (C) 2024-2026 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
index 009d6bc0640e898de5db71ddf8f9045038ad2969..f0145a43bb204392e626c847ceb362882300e212 100644 (file)
@@ -1,4 +1,4 @@
-/* Multithread-safety test for c_strtof().
+/* Thread safety test for c_strtof().
    Copyright (C) 2024-2026 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
index 68e0997aea4faa0e7146cf5c4de1d13fc643ede8..110ea35af3aba3718bc02b671fd6ba793826db73 100644 (file)
@@ -1,4 +1,4 @@
-/* Multithread-safety test for c_strtold().
+/* Thread safety test for c_strtold().
    Copyright (C) 2024-2026 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
index 251043535e93a4b08caf4822493c6bb9f2e92ed2..7d9490b26d2b0652352d7b04b18ec5e180d9b3c9 100644 (file)
@@ -1,4 +1,4 @@
-/* Multithread-safety test for gmtime_r().
+/* Thread safety test for gmtime_r().
    Copyright (C) 2024-2026 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
index 46a74fd52308444c0612ae588874aaf28139cd8a..0b4ef6758394b6a8e75b6b814a928a08777d580e 100644 (file)
@@ -1,4 +1,4 @@
-/* Multithread-safety test for localeconv()
+/* Thread safety test for localeconv()
    (in the absence of setlocale() or uselocale() calls).
    Copyright (C) 2019-2026 Free Software Foundation, Inc.
 
index 8dfab345f1af951965d390b7fc6038ff160b82d3..3c28511702630d83179340777c18eef08e4192e1 100644 (file)
@@ -1,4 +1,4 @@
-/* Multithread-safety test for localtime_r().
+/* Thread safety test for localtime_r().
    Copyright (C) 2024-2026 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
index 58efb01a0aa90bc1a2db003e634eb087dbff8dab..83ea7e73c034c32d0a46b4f709474b5889d14bc7 100644 (file)
@@ -1,4 +1,4 @@
-/* Multithread-safety test for nl_langinfo().
+/* Thread safety test for nl_langinfo().
    Copyright (C) 2019-2026 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
index 13a9c8a0834cd59e3d31499270442bdffe6a65c6..7c71984ac62e8c90d6a6bd7dc974fd5f7dff33f0 100644 (file)
@@ -1,4 +1,4 @@
-/* Test of pthread_sigmask in a multi-threaded program.
+/* Test of pthread_sigmask in a multi-threaded process.
    Copyright (C) 2011-2026 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
index 04c4a7cfbe50a9b4d22b61ca20480f4819cbd557..63385548cffa382a36588d89e2b8c6e0df8ff1ea 100644 (file)
@@ -1,4 +1,4 @@
-/* Multithread-safety test for random().
+/* Thread safety test for random().
    Copyright (C) 2023-2026 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
@@ -29,7 +29,7 @@
 
 /* Number of random() invocations operations performed in each thread.
    This value is chosen so that the unit test terminates quickly.
-   To reliably determine whether a random() implementation is multithread-safe,
+   To reliably determine whether a random() implementation is thread-safe,
    set REPEAT_COUNT to 1000000 and run the test 100 times:
      $ for i in `seq 100`; do ./test-random-mt; done
  */
index e3ca6685c0fb278733120451ceb09dd92926cba2..d94942dfe231304dda6433349561f269f2b9ae0b 100644 (file)
@@ -1,4 +1,4 @@
-/* Multithread-safety test for setlocale_null_r (LC_ALL, ...).
+/* Thread safety test for setlocale_null_r (LC_ALL, ...).
    Copyright (C) 2019-2026 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
index 85ab8bf5f798aa1d73b582b4f29456ac97e85cd0..72c7b748115b8968efa8dc91a07600710c8ff937 100644 (file)
@@ -1,4 +1,4 @@
-/* Multithread-safety test for setlocale_null_r (LC_xxx, ...).
+/* Thread safety test for setlocale_null_r (LC_xxx, ...).
    Copyright (C) 2019-2026 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
index 98043357105503eed6a199f9798e1684d1e922a6..5efa3b115e9382155604650c2a429157919649ab 100644 (file)
@@ -26,7 +26,7 @@ int
 main ()
 {
   /* Check that gl_thread_self () can be used with just $(LIBTHREAD), not
-     $(LIBMULTITHREAD), i.e. in libraries that are multithread-safe but don't
+     $(LIBMULTITHREAD), i.e. in libraries that are thread-safe but don't
      create threads themselves.  */
   /* This is not the case on AIX with --enable-threads=isoc+posix, because in
      this case, $(LIBTHREAD) is empty whereas $(LIBMULTITHREAD) is '-lpthread'.