diff options
author | Bruno Haible <bruno@clisp.org> | 2021-03-07 02:47:03 +0100 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2021-03-07 11:01:59 +0100 |
commit | ede75ad3eeeafe72d1af9de84897905edf76bd70 (patch) | |
tree | 169e545e9c79ca1e8b7dee730fc06e20179bf87c /doc/multithread.texi | |
parent | f4bf3936b988eb65361e04b0ca3898681b787c58 (diff) | |
download | gnulib-ede75ad3eeeafe72d1af9de84897905edf76bd70.tar.gz |
regex: Allow locking optimization independently of 'unlocked-io'.
* lib/regex_internal.h: Test GNULIB_REGEX_SINGLE_THREAD instead of
USE_UNLOCKED_IO.
* doc/multithread.texi: Document GNULIB_REGEX_SINGLE_THREAD.
Diffstat (limited to 'doc/multithread.texi')
-rw-r--r-- | doc/multithread.texi | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/doc/multithread.texi b/doc/multithread.texi index 082ccb05b5..cb0c620ff9 100644 --- a/doc/multithread.texi +++ b/doc/multithread.texi @@ -270,6 +270,10 @@ You need extra code for this optimization to be effective: include the @code{"unlocked-io.h"} header file. Some Gnulib modules that do operations on @code{FILE} streams have these preparations already included. @item +You may define the C macro @code{GNULIB_REGEX_SINGLE_THREAD}, if all the +programs in your package invoke the functions of the @code{regex} module +only from a single thread. +@item You may define the C macro @code{GNULIB_WCHAR_SINGLE}, if all the programs in your package are single-threaded and won't change the locale after it has been initialized. This macro optimizes the functions @code{mbrtowc} and |