cosmopolitan/test/posix
Justine Tunney e939659b70
Fix ordering of pthread_create(pthread_t *thread)
This change fixes a bug where signal_latency_async_test would flake less
than 1/1000 of the time. What was happening was pthread_kill(sender_thr)
would return EFAULT. This was because pthread_create() was not returning
the thread object pointer until after clone() had been called. So it was
actually possible for the main thread to stall after calling clone() and
during that time the receiver would launch and receive a signal from the
sender thread, and then fail when it tried to send a pong. I thought I'd
use a barrier at first, in the test, to synchronize thread creation, but
I firmly believe that pthread_create() was to blame and now that's fixed
2025-01-03 17:34:29 -08:00
..
accept4_nonblock_test.c Rewrite Windows accept() 2024-09-12 04:23:38 -07:00
accept_inherit_nonblock_test.c Rewrite Windows accept() 2024-09-12 04:23:38 -07:00
accept_poll_test.c Rewrite Windows accept() 2024-09-12 04:23:38 -07:00
atoi_test.c Apply clang-format update to repo (#1154) 2024-04-25 10:38:00 -07:00
BUILD.mk Rewrite Windows accept() 2024-09-12 04:23:38 -07:00
connect_nonblock_test.c Rewrite Windows connect() 2024-09-12 23:07:52 -07:00
cyclic_mutex_test.c Eliminate cyclic locks in runtime 2024-12-16 22:25:12 -08:00
exit_async_signal_safety_test.c Demonstrate signal safety of recursive mutexes 2024-07-04 02:47:52 -07:00
file_offset_exec_prog.c Share file offset across execve() on Windows 2024-08-03 17:48:00 -07:00
file_offset_exec_test.c Make fork() go 30% faster 2025-01-01 04:59:38 -08:00
file_offset_fork_test.c Share file offset across execve() on Windows 2024-08-03 17:48:00 -07:00
forjustine_test.c Remove leaf attribute where appropriate 2025-01-02 08:07:15 -08:00
fork_bench_test.c Make threads faster and more reliable 2024-12-21 22:13:00 -08:00
fread3gb_test.c Add some noexcept annotations 2024-06-01 03:19:53 -07:00
iconv_utf8_utf16_test.c Update Musl Libc code 2024-07-30 22:51:29 -07:00
iconv_utf8_utf32_test.c Update Musl Libc code 2024-07-30 22:51:29 -07:00
interprocess_signaling_test.c Introduce interprocess signaling on Windows 2024-09-19 03:02:13 -07:00
listen_timeout_test.c Rewrite Windows connect() 2024-09-12 23:07:52 -07:00
lowest_fd_test.c Fix file descriptor assignment issues on Windows 2024-09-15 22:16:38 -07:00
mask_test.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
msg_nosignal_test.c Make more Windows socket fixes and improvements 2024-09-18 20:29:42 -07:00
msg_waitall_test.c Make more Windows socket fixes and improvements 2024-09-18 20:29:42 -07:00
nonblock_pipe2_test.c Rewrite Windows accept() 2024-09-12 04:23:38 -07:00
nonblock_pipe_test.c Rewrite Windows accept() 2024-09-12 04:23:38 -07:00
pending_signal_execve_test.c Eliminate cyclic locks in runtime 2024-12-16 22:25:12 -08:00
pipe_write_eagain_test.c Write more tests attempting to break windows 2024-09-22 01:21:10 -07:00
printf_return_test.c Make more fixups and quality assurance 2024-10-07 15:29:53 -07:00
pthread_process_shared_test.c Add unit test for process shared conditions 2024-07-22 18:48:54 -07:00
reentrant_signal_test.c Apply clang-format update to repo (#1154) 2024-04-25 10:38:00 -07:00
sa_resethand2_test.c Unblock stalled i/o signals on windows 2024-12-29 00:22:41 -08:00
sa_resethand_test.c Write more tests attempting to break windows 2024-09-22 01:21:10 -07:00
sigchld_test.c Apply clang-format update to repo (#1154) 2024-04-25 10:38:00 -07:00
signal_fight_test.c Write more tests for signal handling 2024-09-21 05:24:56 -07:00
signal_latency_async_test.c Fix ordering of pthread_create(pthread_t *thread) 2025-01-03 17:34:29 -08:00
signal_latency_test.c Unblock stalled i/o signals on windows 2024-12-29 00:22:41 -08:00
signal_test.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
signal_torture_read_test.c Make read() and write() signal handling atomic 2024-09-15 01:18:27 -07:00
socket_fionread_test.c Fix ioctl() and FIONREAD for sockets on Windows 2024-09-13 01:47:33 -07:00
socket_timeout_signal_test.c Reveal another Qemu bug 2024-09-17 01:31:55 -07:00
strtol_test.c Apply clang-format update to repo (#1154) 2024-04-25 10:38:00 -07:00
unnamed_semaphore_test.c Speed up unnamed POSIX semaphores 2024-09-13 06:25:27 -07:00
wait2x_test.c Fix ECHILD with WNOHANG on Windows 2024-09-18 23:26:02 -07:00
writev_test.c Slightly optimize iovec on Windows 2024-09-16 21:36:22 -07:00