|
From: | Bruno Haible |
Subject: | Re: single-threaded optimizations |
Date: | Sun, 07 Mar 2021 11:03:27 +0100 |
User-agent: | KMail/5.1.3 (Linux/4.4.0-203-generic; KDE/5.18.0; x86_64; ; ) |
> > * We establish a new macro GNULIB_MBTOWC_SINGLE which means "assume that > > at most one thread invokes mbtowc-like functions". The mbtowc > > replacement uses this instead of using USE_UNLOCKED_IO. Tar can #define > > this new macro. > > I like this idea. The packages can then define or not define each such > macro individually. Implemented through the following series of patches. 2021-03-07 Bruno Haible <bruno@clisp.org> Rename GNULIB_WCHAR_SINGLE to GNULIB_WCHAR_SINGLE_LOCALE. * lib/lc-charset-dispatch.c: Test GNULIB_WCHAR_SINGLE_LOCALE instead of GNULIB_WCHAR_SINGLE. * lib/wcwidth.c: Likewise. * tests/test-wcwidth.c: Likewise. * doc/multithread.texi: Document GNULIB_WCHAR_SINGLE_LOCALE instead of GNULIB_WCHAR_SINGLE. * NEWS: Document the change. 2021-03-06 Bruno Haible <bruno@clisp.org> mbrtowc: Allow locking optimization independently of 'unlocked-io'. * lib/mbtowc-lock.h: Test GNULIB_MBRTOWC_SINGLE_THREAD instead of USE_UNLOCKED_IO. * doc/multithread.texi: Document GNULIB_MBRTOWC_SINGLE_THREAD. 2021-03-06 Bruno Haible <bruno@clisp.org> 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. 2021-03-06 Bruno Haible <bruno@clisp.org> exclude: Allow stdio optimization independently of 'unlocked-io'. * lib/exclude.c: Test GNULIB_EXCLUDE_SINGLE_THREAD instead of USE_UNLOCKED_IO. * modules/exclude (Depends-on): Add unlocked-io-internal. * doc/multithread.texi: Document GNULIB_EXCLUDE_SINGLE_THREAD. 2021-03-06 Bruno Haible <bruno@clisp.org> readutmp: Optimize stdio accesses. * lib/readutmp.c: Include unlocked-io.h unconditionally. * modules/readutmp (Depends-on): Add unlocked-io-internal. 2021-03-06 Bruno Haible <bruno@clisp.org> mountlist: Optimize stdio accesses. * lib/mountlist.c: Include unlocked-io.h unconditionally. * modules/mountlist (Depends-on): Add unlocked-io-internal. 2021-03-06 Bruno Haible <bruno@clisp.org> getusershell: Optimize stdio accesses when possible. * lib/getusershell.c: Test GNULIB_GETUSERSHELL_SINGLE_THREAD instead of USE_UNLOCKED_IO. * modules/getusershell (Depends-on): Add unlocked-io-internal. * doc/multithread.texi: Document GNULIB_GETUSERSHELL_SINGLE_THREAD. 2021-03-06 Bruno Haible <bruno@clisp.org> unlocked-io-internal: New module. * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO): Don't define USE_UNLOCKED_IO here. * modules/unlocked-io-internal: New file, based on modules/unlocked-io. * modules/unlocked-io (Description): Clarify. (Files, Depends-on): Just use the unlocked-io-internal module. (configure.ac): Define GNULIB_STDIO_SINGLE_THREAD and USE_UNLOCKED_IO here. * doc/multithread.texi: Clarify when the 'unlocked-io' module can be used. 2021-03-06 Bruno Haible <bruno@clisp.org> posixtm: Remove unused includes. * lib/posixtm.c: Don't include <stdio.h>, <sys/types.h>, unlocked-io.h.
0001-posixtm-Remove-unused-includes.patch
Description: Text Data
0002-unlocked-io-internal-New-module.patch
Description: Text Data
0003-getusershell-Optimize-stdio-accesses-when-possible.patch
Description: Text Data
0004-mountlist-Optimize-stdio-accesses.patch
Description: Text Data
0005-readutmp-Optimize-stdio-accesses.patch
Description: Text Data
0006-exclude-Allow-stdio-optimization-independently-of-un.patch
Description: Text Data
0007-regex-Allow-locking-optimization-independently-of-un.patch
Description: Text Data
0008-mbrtowc-Allow-locking-optimization-independently-of-.patch
Description: Text Data
0009-Rename-GNULIB_WCHAR_SINGLE-to-GNULIB_WCHAR_SINGLE_LO.patch
Description: Text Data
[Prev in Thread] | Current Thread | [Next in Thread] |