mirror of
https://github.com/opnsense/src.git
synced 2026-02-26 19:30:29 -05:00
Compiler memory barriers do not prevent the CPU from executing the code out of order. Switch to C11 atomics. This also lets us get rid of the mutex; instead, loop until the compare_exchange succeeds. While here, change the return value of at_quick_exit() on failure to the more traditional -1, matching atexit(). Sponsored by: Klara, Inc. Reviewed by: Olivier Certner, kevans, kib Differential Revision: https://reviews.freebsd.org/D41936 (cherry picked from commit 1dc3abb052430279e47c8922d22b30922adcf0f6) libc: Add a rudimentary test for quick_exit(3). Sponsored by: Klara, Inc. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D41937 (cherry picked from commit c7dd4601aeebbc1bbe131cbe6747476c124b47fe) |
||
|---|---|---|
| .. | ||
| dynthr_mod | ||
| clearenv_test.c | ||
| cxa_thread_atexit_nothr_test.cc | ||
| cxa_thread_atexit_test.cc | ||
| dynthr_test.c | ||
| heapsort_test.c | ||
| Makefile | ||
| Makefile.depend | ||
| mergesort_test.c | ||
| qsort_b_test.c | ||
| qsort_r_compat_test.c | ||
| qsort_r_test.c | ||
| qsort_s_test.c | ||
| qsort_test.c | ||
| quick_exit_test.c | ||
| set_constraint_handler_s_test.c | ||
| strfmon_test.c | ||
| test-sort.h | ||
| tsearch_test.c | ||