cosmopolitan/test/libc/thread
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
..
nsync_test.c Use *NSYNC for POSIX threads locking APIs 2022-09-11 11:04:50 -07:00
pthread_barrier_wait_test.c Perform some code cleanup 2022-10-04 23:32:16 -07:00
pthread_cond_signal_test.c Use *NSYNC for POSIX threads locking APIs 2022-09-11 11:04:50 -07:00
pthread_create_test.c Implement pthread_atfork() 2022-10-16 12:25:13 -07:00
pthread_detach_test.c Implement pthread_atfork() 2022-10-16 12:25:13 -07:00
pthread_key_create_test.c Tidy up the threading implementation 2022-09-10 02:56:25 -07:00
pthread_kill_test.c Elevate Windows production worthiness 2022-10-13 13:44:41 -07:00
pthread_rwlock_rdlock_test.c Pay off more technical debt 2022-09-12 23:36:56 -07:00
pthread_setname_np_test.c Use *NSYNC for POSIX threads locking APIs 2022-09-11 11:04:50 -07:00
sem_open_test.c Implement pthread_atfork() 2022-10-16 12:25:13 -07:00
sem_timedwait_test.c Implement pthread_atfork() 2022-10-16 12:25:13 -07:00
spawn_test.c Pay off more technical debt 2022-09-12 23:36:56 -07:00
test.mk Add posix semaphores support 2022-10-14 09:21:02 -07:00