musl/src
Rich Felker ebf82447be optimize cancellation enable/disable code
the goal is to be able to use pthread_setcancelstate internally in
the implementation, whenever a function might want to use functions
which are cancellation points but avoid becoming a cancellation point
itself. i could have just used a separate internal function for
temporarily inhibiting cancellation, but the solution in this commit
is better because (1) it's one less implementation-specific detail in
functions that need to use it, and (2) application code can also get
the same benefit.

previously, pthread_setcancelstate dependend on pthread_self, which
would pull in unwanted thread setup overhead for non-threaded
programs. now, it temporarily stores the state in the global libc
struct if threads have not been initialized, and later moves it if
needed. this way we can instead use __pthread_self, which has no
dependencies and assumes that the thread register is already valid.
2011-04-17 13:21:13 -04:00
..
conf better fix sysconf pthread stack min 2011-04-08 12:16:24 -04:00
ctype more header fixes, minor warning fix 2011-02-14 19:33:11 -05:00
dirent fix errno handling in scandir: 2011-04-11 01:58:14 -04:00
env add startup abi functions, dummy for now. eventually needed for c++ support. 2011-04-06 16:40:19 -04:00
errno change errno to static linkage (improves PIC code generation) 2011-02-21 23:00:52 -05:00
exit consistency: change all remaining syscalls to use SYS_ rather than __NR_ prefix 2011-04-06 20:32:53 -04:00
fcntl overhaul pthread cancellation 2011-04-17 11:43:03 -04:00
internal optimize cancellation enable/disable code 2011-04-17 13:21:13 -04:00
ipc overhaul pthread cancellation 2011-04-17 11:43:03 -04:00
ldso various changes in preparation for dynamic linking support 2011-02-24 16:37:21 -05:00
linux add syscall wrapper for flock 2011-04-13 14:55:26 -04:00
locale fix breakage due to converting a return type to size_t in iconv... 2011-04-07 16:10:44 -04:00
malloc fix rare but nasty under-allocation bug in malloc with large requests 2011-04-04 17:26:41 -04:00
math Port musl to x86-64. One giant commit! 2011-02-15 07:32:09 -05:00
misc remove stupid debug code in wordexp 2011-04-15 12:07:26 -04:00
mman consistency: change all remaining syscalls to use SYS_ rather than __NR_ prefix 2011-04-06 20:32:53 -04:00
multibyte fix all implicit conversion between signed/unsigned pointers 2011-03-25 16:34:03 -04:00
network overhaul pthread cancellation 2011-04-17 11:43:03 -04:00
passwd guard against hard links to non-ordinary-files when reading tcb shadow 2011-02-14 21:15:07 -05:00
prng initial check-in, version 0.5.0 2011-02-12 00:22:29 -05:00
process overhaul pthread cancellation 2011-04-17 11:43:03 -04:00
regex fix bug in TRE found by clang (typo && instead of &) 2011-04-07 23:13:47 -04:00
select overhaul pthread cancellation 2011-04-17 11:43:03 -04:00
setjmp Port musl to x86-64. One giant commit! 2011-02-15 07:32:09 -05:00
signal overhaul pthread cancellation 2011-04-17 11:43:03 -04:00
stat fix (hopefully) statvfs breakage on x86_64 that resulted from fixing i386... 2011-04-05 23:58:36 -04:00
stdio avoid setting errno when checking for tty 2011-04-15 12:04:13 -04:00
stdlib fix broken unsigned comparison in wcstoumax 2011-04-07 16:13:47 -04:00
string implement memrchr (nonstandard) and optimize strrchr in terms of it 2011-04-13 08:36:29 -04:00
stub various legacy and linux-specific stuff 2011-03-18 21:52:26 -04:00
temp make mktemp match the historic behavior, and update functions that use it 2011-02-19 09:40:07 -05:00
termios overhaul pthread cancellation 2011-04-17 11:43:03 -04:00
thread optimize cancellation enable/disable code 2011-04-17 13:21:13 -04:00
time overhaul pthread cancellation 2011-04-17 11:43:03 -04:00
unistd overhaul pthread cancellation 2011-04-17 11:43:03 -04:00