cosmopolitan/libc/testlib
Justine Tunney 60cb435cb4
Implement pthread_atfork()
If threads are being used, then fork() will now acquire and release and
runtime locks so that fork() may be safely used from threads. This also
makes vfork() thread safe, because pthread mutexes will do nothing when
the process is a child of vfork(). More torture tests have been written
to confirm this all works like a charm. Additionally:

- Invent hexpcpy() api
- Rename nsync_malloc_() to kmalloc()
- Complete posix named semaphore implementation
- Make pthread_create() asynchronous signal safe
- Add rm, rmdir, and touch to command interpreter builtins
- Invent sigisprecious() and modify sigset functions to use it
- Add unit tests for posix_spawn() attributes and fix its bugs

One unresolved problem is the reclaiming of *NSYNC waiter memory in the
forked child processes, within apps which have threads waiting on locks
2022-10-16 12:25:13 -07:00
..
thunks Clean old .source directive out of asm code 2022-03-18 12:43:21 -07:00
almostequal.c Change license 2020-12-27 17:18:44 -08:00
almostequalf.c Change license 2020-12-27 17:18:44 -08:00
almostequallongdouble.c Remove testonly keyword 2022-09-05 08:41:43 -07:00
bench.h Fold LIBC_BITS into LIBC_INTRIN 2022-08-11 12:13:18 -07:00
bench.S Add ASAN guards to some asm data structures 2022-03-18 13:02:57 -07:00
benchrunner.c Make some foss compatibility improvements 2022-10-14 13:59:34 -07:00
binequals.c Make important improvements 2022-09-14 22:39:08 -07:00
blocktronics.h Improve performance of bitscanning intrinsics 2021-06-15 06:29:51 -07:00
blocktronics.S Add ASAN guards to some asm data structures 2022-03-18 13:02:57 -07:00
blocktronics.txt Remove trailing whitespace from all files (#497) 2022-07-20 20:31:16 -07:00
clearxmmregisters.c Change license 2020-12-27 17:18:44 -08:00
combo.S Add ASAN guards to some asm data structures 2022-03-18 13:02:57 -07:00
comborunner.c Remove testonly keyword 2022-09-05 08:41:43 -07:00
contains.c Remove testonly keyword 2022-09-05 08:41:43 -07:00
endswith.c Pay off more technical debt 2022-09-12 23:36:56 -07:00
extract.c Introduce testlib_extract() helper 2022-10-02 09:15:46 -07:00
ezbench.h Clean up threading code some more 2022-09-13 20:17:34 -07:00
ezbenchcontrol.c Make numerous improvements 2021-09-28 01:52:34 -07:00
ezbenchreport.c Make more fixes and improvements 2022-06-13 11:02:13 -07:00
ezbenchwarn.c Make numerous improvements 2021-09-28 01:52:34 -07:00
fastrandomstring.h Improve Python tree-shaking 2021-09-06 19:24:10 -07:00
fixture.S Add ASAN guards to some asm data structures 2022-03-18 13:02:57 -07:00
fixturerunner.c Remove testonly keyword 2022-09-05 08:41:43 -07:00
formatbinaryasglyphs.c Pay off more technical debt 2022-09-12 23:36:56 -07:00
formatbinaryashex.c Remove testonly keyword 2022-09-05 08:41:43 -07:00
formatbool.c Change license 2020-12-27 17:18:44 -08:00
formatfloat.c Pay off more technical debt 2022-09-12 23:36:56 -07:00
formatint.c Remove testonly keyword 2022-09-05 08:41:43 -07:00
formatrange.c Pay off more technical debt 2022-09-12 23:36:56 -07:00
formatstr.c Pay off more technical debt 2022-09-12 23:36:56 -07:00
getcore.c Make numerous improvements 2021-09-28 01:52:34 -07:00
geterrno.c Unbloat the build 2022-08-11 00:15:29 -07:00
getinterrupts.c Make numerous improvements 2021-09-28 01:52:34 -07:00
globals.c Use *NSYNC for POSIX threads locking APIs 2022-09-11 11:04:50 -07:00
hexequals.c Remove testonly keyword 2022-09-05 08:41:43 -07:00
hyperion.h Make improvements to redbean 2021-07-10 15:19:37 -07:00
hyperion.S Add ASAN guards to some asm data structures 2022-03-18 13:02:57 -07:00
hyperion.txt Initial import 2020-06-15 07:18:57 -07:00
incrementfailed.c Change license 2020-12-27 17:18:44 -08:00
memoryexists.c Rewrite brk() and sbrk() 2022-10-01 23:11:56 -07:00
moby.h Make improvements to redbean 2021-07-10 15:19:37 -07:00
moby.S Add ASAN guards to some asm data structures 2022-03-18 13:02:57 -07:00
moby.txt Make improvements to redbean 2021-07-10 15:19:37 -07:00
polluteregisters.S Improve redbean 2022-04-25 08:30:14 -07:00
quota.c Pay off more technical debt 2022-09-12 23:36:56 -07:00
runner.c Remove testonly keyword 2022-09-05 08:41:43 -07:00
seterrno.c Unbloat the build 2022-08-11 00:15:29 -07:00
shoulddebugbreak.c Change license 2020-12-27 17:18:44 -08:00
showerror.c Remove testonly keyword 2022-09-05 08:41:43 -07:00
startswith.c Pay off more technical debt 2022-09-12 23:36:56 -07:00
strcaseequals.c Get repository to build with GCC 11 2022-09-13 04:14:55 -07:00
strequals.c Get repository to build with GCC 11 2022-09-13 04:14:55 -07:00
strerror.c Unbloat the build 2022-08-11 00:15:29 -07:00
subprocess.h Greatly expand system() shell code features 2022-10-11 21:30:31 -07:00
testcase.S Add ASAN guards to some asm data structures 2022-03-18 13:02:57 -07:00
testlib.h Introduce testlib_extract() helper 2022-10-02 09:15:46 -07:00
testlib.mk Introduce testlib_extract() helper 2022-10-02 09:15:46 -07:00
testmain.c Pay off more technical debt 2022-09-12 23:36:56 -07:00
testrunner.c Implement pthread_atfork() 2022-10-16 12:25:13 -07:00
thrashcodecache.S Clean old .source directive out of asm code 2022-03-18 12:43:21 -07:00
viewables.h Do some string library work 2022-08-20 22:17:14 -07:00
viewables.S Do some string library work 2022-08-20 22:17:14 -07:00
viewables.txt Do some string library work 2022-08-20 22:17:14 -07:00
waitforexit.c Create unit test framework for subprocesses 2022-09-03 18:02:01 -07:00
waitforterm.c Create unit test framework for subprocesses 2022-09-03 18:02:01 -07:00
yield.c Make numerous improvements 2021-09-28 01:52:34 -07:00