cosmopolitan/libc/thread
Justine Tunney c7a8cd21e9
Improve system call wrappers
This change improves copy_file_range(), sendfile(), splice(), openpty(),
closefrom(), close_range(), fadvise() and posix_fadvise() in addition to
writing tests that confirm things like errno and seeking behavior across
platforms. We now less aggressively polyfill behavior with some of these
functions when the platform support isn't available. Please see:

https://justine.lol/cosmopolitan/functions.html
2022-09-19 15:06:25 -07:00
..
freebsd.internal.h Fold LIBC_BITS into LIBC_INTRIN 2022-08-11 12:13:18 -07:00
mktls.c Clean up threading code some more 2022-09-13 20:17:34 -07:00
openbsd.internal.h Make fixes and improvements 2022-06-25 21:09:09 -07:00
posixthread.internal.h Add script.com and whois.com courtesy of FreeBSD 2022-09-13 20:26:13 -07:00
pthread_attr_destroy.c Tidy up the threading implementation 2022-09-10 02:56:25 -07:00
pthread_attr_getdetachstate.c Tidy up the threading implementation 2022-09-10 02:56:25 -07:00
pthread_attr_getguardsize.c Improve system call wrappers 2022-09-19 15:06:25 -07:00
pthread_attr_getinheritsched.c Tidy up the threading implementation 2022-09-10 02:56:25 -07:00
pthread_attr_getschedparam.c Tidy up the threading implementation 2022-09-10 02:56:25 -07:00
pthread_attr_getschedpolicy.c Tidy up the threading implementation 2022-09-10 02:56:25 -07:00
pthread_attr_getscope.c Tidy up the threading implementation 2022-09-10 02:56:25 -07:00
pthread_attr_getstack.c Improve system call wrappers 2022-09-19 15:06:25 -07:00
pthread_attr_getstacksize.c Improve system call wrappers 2022-09-19 15:06:25 -07:00
pthread_attr_init.c Improve system call wrappers 2022-09-19 15:06:25 -07:00
pthread_attr_setdetachstate.c Tidy up the threading implementation 2022-09-10 02:56:25 -07:00
pthread_attr_setguardsize.c Improve system call wrappers 2022-09-19 15:06:25 -07:00
pthread_attr_setinheritsched.c Improve system call wrappers 2022-09-19 15:06:25 -07:00
pthread_attr_setschedparam.c Tidy up the threading implementation 2022-09-10 02:56:25 -07:00
pthread_attr_setschedpolicy.c Rewrite recursive mutex code 2022-09-10 09:18:52 -07:00
pthread_attr_setscope.c Tidy up the threading implementation 2022-09-10 02:56:25 -07:00
pthread_attr_setstack.c Improve system call wrappers 2022-09-19 15:06:25 -07:00
pthread_attr_setstacksize.c Improve system call wrappers 2022-09-19 15:06:25 -07:00
pthread_barrier_destroy.c Use *NSYNC for POSIX threads locking APIs 2022-09-11 11:04:50 -07:00
pthread_barrier_init.c Use *NSYNC for POSIX threads locking APIs 2022-09-11 11:04:50 -07:00
pthread_barrier_wait.c Improve system call wrappers 2022-09-19 15:06:25 -07:00
pthread_barrierattr_destroy.c Tidy up the threading implementation 2022-09-10 02:56:25 -07:00
pthread_barrierattr_getpshared.c Use *NSYNC for POSIX threads locking APIs 2022-09-11 11:04:50 -07:00
pthread_barrierattr_init.c Tidy up the threading implementation 2022-09-10 02:56:25 -07:00
pthread_barrierattr_setpshared.c Use *NSYNC for POSIX threads locking APIs 2022-09-11 11:04:50 -07:00
pthread_cancel.c Tidy up the threading implementation 2022-09-10 02:56:25 -07:00
pthread_cond_broadcast.c Improve system call wrappers 2022-09-19 15:06:25 -07:00
pthread_cond_destroy.c Use *NSYNC for POSIX threads locking APIs 2022-09-11 11:04:50 -07:00
pthread_cond_init.c Use *NSYNC for POSIX threads locking APIs 2022-09-11 11:04:50 -07:00
pthread_cond_signal.c Improve system call wrappers 2022-09-19 15:06:25 -07:00
pthread_cond_timedwait.c Improve system call wrappers 2022-09-19 15:06:25 -07:00
pthread_cond_wait.c Improve system call wrappers 2022-09-19 15:06:25 -07:00
pthread_condattr_destroy.c Tidy up the threading implementation 2022-09-10 02:56:25 -07:00
pthread_condattr_getpshared.c Use *NSYNC for POSIX threads locking APIs 2022-09-11 11:04:50 -07:00
pthread_condattr_init.c Tidy up the threading implementation 2022-09-10 02:56:25 -07:00
pthread_condattr_setpshared.c Use *NSYNC for POSIX threads locking APIs 2022-09-11 11:04:50 -07:00
pthread_create.c Improve system call wrappers 2022-09-19 15:06:25 -07:00
pthread_detach.c Improve pthread_join() 2022-09-16 14:02:06 -07:00
pthread_equal.c Tidy up the threading implementation 2022-09-10 02:56:25 -07:00
pthread_exit.c Pay off more technical debt 2022-09-12 23:36:56 -07:00
pthread_getaffinity_np.c Improve system call wrappers 2022-09-19 15:06:25 -07:00
pthread_getattr_np.c Tidy up the threading implementation 2022-09-10 02:56:25 -07:00
pthread_getname_np.c Improve system call wrappers 2022-09-19 15:06:25 -07:00
pthread_getschedparam.c Tidy up the threading implementation 2022-09-10 02:56:25 -07:00
pthread_getthreadid_np.c Tidy up the threading implementation 2022-09-10 02:56:25 -07:00
pthread_getunique_np.c Tidy up the threading implementation 2022-09-10 02:56:25 -07:00
pthread_join.c Improve pthread_join() 2022-09-16 14:02:06 -07:00
pthread_mutex_destroy.c Use *NSYNC for POSIX threads locking APIs 2022-09-11 11:04:50 -07:00
pthread_mutexattr_destroy.c Tidy up the threading implementation 2022-09-10 02:56:25 -07:00
pthread_mutexattr_getpshared.c Use *NSYNC for POSIX threads locking APIs 2022-09-11 11:04:50 -07:00
pthread_mutexattr_gettype.c Use *NSYNC for POSIX threads locking APIs 2022-09-11 11:04:50 -07:00
pthread_mutexattr_init.c Tidy up the threading implementation 2022-09-10 02:56:25 -07:00
pthread_mutexattr_setpshared.c Use *NSYNC for POSIX threads locking APIs 2022-09-11 11:04:50 -07:00
pthread_mutexattr_settype.c Use *NSYNC for POSIX threads locking APIs 2022-09-11 11:04:50 -07:00
pthread_reschedule.c Tidy up the threading implementation 2022-09-10 02:56:25 -07:00
pthread_rwlock_destroy.c Use *NSYNC for POSIX threads locking APIs 2022-09-11 11:04:50 -07:00
pthread_rwlock_init.c Use *NSYNC for POSIX threads locking APIs 2022-09-11 11:04:50 -07:00
pthread_rwlock_rdlock.c Improve system call wrappers 2022-09-19 15:06:25 -07:00
pthread_rwlock_unlock.c Improve system call wrappers 2022-09-19 15:06:25 -07:00
pthread_rwlock_wrlock.c Improve system call wrappers 2022-09-19 15:06:25 -07:00
pthread_rwlockattr_destroy.c Tidy up the threading implementation 2022-09-10 02:56:25 -07:00
pthread_rwlockattr_getpshared.c Use *NSYNC for POSIX threads locking APIs 2022-09-11 11:04:50 -07:00
pthread_rwlockattr_init.c Tidy up the threading implementation 2022-09-10 02:56:25 -07:00
pthread_rwlockattr_setpshared.c Use *NSYNC for POSIX threads locking APIs 2022-09-11 11:04:50 -07:00
pthread_self.c Tidy up the threading implementation 2022-09-10 02:56:25 -07:00
pthread_setaffinity_np.c Improve system call wrappers 2022-09-19 15:06:25 -07:00
pthread_setname_np.c Improve system call wrappers 2022-09-19 15:06:25 -07:00
pthread_setschedparam.c Tidy up the threading implementation 2022-09-10 02:56:25 -07:00
pthread_setschedparam_freebsd.c Add sys_ prefix to unwrapped system calls 2022-09-13 11:20:35 -07:00
pthread_sigmask.c Tidy up the threading implementation 2022-09-10 02:56:25 -07:00
pthread_spin_destroy.c Improve system call wrappers 2022-09-19 15:06:25 -07:00
pthread_spin_init.c Improve system call wrappers 2022-09-19 15:06:25 -07:00
pthread_spin_lock.c Improve system call wrappers 2022-09-19 15:06:25 -07:00
pthread_spin_trylock.c Improve system call wrappers 2022-09-19 15:06:25 -07:00
pthread_spin_unlock.c Improve system call wrappers 2022-09-19 15:06:25 -07:00
pthread_ungarbage.c Rewrite recursive mutex code 2022-09-10 09:18:52 -07:00
pthread_zombies.c Rewrite recursive mutex code 2022-09-10 09:18:52 -07:00
README.md Use *NSYNC for POSIX threads locking APIs 2022-09-11 11:04:50 -07:00
spawn.c Clean up threading code some more 2022-09-13 20:17:34 -07:00
spawn.h Clean up threading code some more 2022-09-13 20:17:34 -07:00
thread.h Improve pthread_join() 2022-09-16 14:02:06 -07:00
thread.mk Improve pthread_join() 2022-09-16 14:02:06 -07:00
thread2.h Tidy up the threading implementation 2022-09-10 02:56:25 -07:00
tls.h Clean up threading code some more 2022-09-13 20:17:34 -07:00
tls2.h Tidy up the threading implementation 2022-09-10 02:56:25 -07:00
wait0.c Improve pthread_join() 2022-09-16 14:02:06 -07:00
wait0.internal.h Clean up threading code some more 2022-09-13 20:17:34 -07:00
xnu.internal.h Add sys_ prefix to unwrapped system calls 2022-09-13 11:20:35 -07:00

Cosmpolitan POSIX Threads Library

Cosmopolitan Libc implements threading as it is written in The Open Group Base Specifications Issue 7, 2018 edition IEEE Std 1003.1-2017 (Revision of IEEE Std 1003.1-2008) in addition to GNU extensions.