aboutsummaryrefslogtreecommitdiff
path: root/lib/libsys/_once_stub.c
Commit message (Collapse)AuthorAgeFilesLines
* libsys: remove usage of pthread_once and _once_stubKonstantin Belousov2024-02-211-63/+0
| | | | | | | | | | | | that existed in auxv.c, use simple bool gate instead. This leaves a small window if two threads try to call _elf_aux_info(3) simultaneously. The situation is safe because auxv parsing is really idempotent. The parsed data is the same, and we store atomic types (int/long/ptr) so double-init does not matter. Reviewed by: brooks, imp Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D43985
* libc: compile _once in libsysBrooks Davis2024-02-051-0/+63
auxv support requires _once(), but we don't want the libsys version stomping on the libc version should they diverge in the future. We could rename it entierly, but for now just hook it in via Makefile.sys. Reviewed by: kib, emaste, imp Pull Request: https://github.com/freebsd/freebsd-src/pull/908