opnsense-src/lib/libc
Mark Johnston 19419d36cf libc: Give __thr_jtable protected visibility
This function pointer table is overwritten by libthr when it's loaded.
libc's pthread stubs are implemented by looking up an entry in this
table and invoking the function pointer contained in the entry.

pthread calls are fairly expensive even when libthr is not loaded: each
call involves indirection through the PLT, then through the GOT to look
up __thr_jtable, then the function pointer itself.  We can however
eliminate one level of indirection by disallowing preemption of the
__thr_jtable symbol, and since the existence table is an internal
implementation detail, disabling preemption is unlikely to break
anything.  This gives a modest improvement in some microbenchmarks which
call libc's pthread stubs.

Reviewed by:	kib
MFC after:	1 month
Sponsored by:	Innovate UK
Differential Revision:	https://reviews.freebsd.org/D50354
2025-05-19 14:29:12 +00:00
..
aarch64 libc: fix _FORTIFY_SOURCE build on aarch64 2025-03-04 13:53:34 -06:00
amd64 lib/libc/amd64/string: fix overread condition in memccpy 2024-07-29 21:36:10 +02:00
arm libgcc_s: export integer and floating point __aeabi_ symbols 2025-05-04 13:48:32 +02:00
capability cap_rights_is_empty: add MLINK 2024-12-02 15:35:40 -05:00
compat-43 Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
csu libc/csu: Unify INIT_RELOCS across architectures 2024-10-19 00:48:52 +01:00
db Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
gdtoa Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
gen libc: Give __thr_jtable protected visibility 2025-05-19 14:29:12 +00:00
gmon Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
i386 Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
iconv Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
include libc: treat execvpe as a week symbol 2025-04-22 14:12:26 -04:00
inet Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
isc Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
locale libc: locale: fix EUC shift check 2025-04-20 13:29:45 -05:00
md libmd, kern, stand: consolidate md5 implementations (NFC) 2024-09-29 22:34:18 -05:00
nameser Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
net link_addr: be more strict about address formats 2025-05-15 01:02:52 +01:00
nls libc: remove some XXX for russian translations of errnos 2024-11-03 18:59:16 +02:00
posix1e manuals: Fix "missing end of block" errors 2024-10-07 15:40:58 -03:00
powerpc Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
powerpc64 Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
powerpcspe Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
quad Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
regex Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
resolv Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
riscv Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
rpc rpc: limited multithread support for svc_nl 2025-02-01 01:00:28 -08:00
secure libmd, kern, stand: consolidate md5 implementations (NFC) 2024-09-29 22:34:18 -05:00
softfloat libc/softfloat: we don't export _fp[gs]et* symbols 2024-03-13 20:35:41 +00:00
stdio fgets.3: document gets_s() __STDC_WANT_LIB_EXT1__ 2024-12-06 13:20:19 -05:00
stdlib getopt_long.3: Use "optstring" consistently 2025-04-29 15:12:37 -04:00
stdtime strptime: Fix day-of-week calculation. 2024-12-09 13:38:22 +01:00
string swab: Fix implementation to support overlapping copies 2025-01-06 16:46:05 -07:00
sys libc: switch to __weak_symbol for fortified interpose stubs 2024-07-16 00:12:28 -05:00
tests libc: Improve scanfloat test. 2025-05-16 17:44:10 +02:00
uuid Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
x86/gen Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
xdr libc/xdr: remove bogus lseek(2) for xdr streams 2025-01-06 08:22:14 -08:00
yp Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libc.ldscript Remove $FreeBSD$: one-line .c comment pattern 2023-08-16 11:54:29 -06:00
libc_nossp.ldscript Remove $FreeBSD$: one-line .c comment pattern 2023-08-16 11:54:29 -06:00
Makefile libmd, kern, stand: consolidate md5 implementations (NFC) 2024-09-29 22:34:18 -05:00
Makefile.depend Update Makefile.depend files 2024-10-14 10:26:17 -07:00
Makefile.depend.options Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
Versions.def Create namespace for the symbols added during 15-CURRENT cycle 2023-09-22 10:16:29 +02:00