about summary refs log tree commit diff
Commit message (Collapse)AuthorAgeFilesLines
...
* fix errors in sigqueue (potential information leak, wrong behavior)Rich Felker2011-03-101-5/+7
| | | | | | | | 1. any padding in the siginfo struct was not necessarily zero-filled, so it might have contained private data off the caller's stack. 2. the uid and pid must be filled in from userspace. the previous rsyscall fix broke rsyscalls because the values were always incorrect.
* security fix: check that cancel/rsyscall signal was sent by the process itselfRich Felker2011-03-101-0/+3
|
* more cancellation points: tcdrain, clock_nanosleepRich Felker2011-03-102-2/+12
|
* remove useless return value checks for functions that cannot failRich Felker2011-03-101-3/+2
|
* make sigsuspend a cancellation pointRich Felker2011-03-101-1/+6
|
* make sigtimedwait a cancellation pointRich Felker2011-03-101-0/+3
|
* don't fail with EINTR in sigtimedwaitRich Felker2011-03-101-6/+6
| | | | | POSIX allows either behavior, but sigwait is not allowed to fail with EINTR, so the retry loop would have to be in one or the other anyway.
* fix sigsuspend syscallRich Felker2011-03-101-1/+1
|
* make sigaltstack work (missing macros in signal.h, error conditions)Rich Felker2011-03-103-1/+15
|
* fix errno behavior in clock_* functionsRich Felker2011-03-103-3/+0
| | | | | | these functions are specified inconsistent in whether they're specified to return an error value, or return -1 and set errno. hopefully now they all match what POSIX requires.
* fix error handling for pthread_sigmaskRich Felker2011-03-092-1/+15
| | | | it must return errno, not -1, and should reject invalud values for how.
* make fork properly initialize the main thread in the child processRich Felker2011-03-091-0/+7
|
* optimize pthread initializationRich Felker2011-03-091-2/+2
| | | | | | the set_tid_address returns the tid (which is also the pid when called from the initial thread) so there is no need to make a separate syscall to get pid/tid.
* fix race condition in raise - just mask signalsRich Felker2011-03-091-9/+9
| | | | | | | | a signal handler could fork after the pid/tid were read, causing the wrong process to be signalled. i'm not sure if this is supposed to have UB or not, but raise is async-signal-safe, so it probably is allowed. the current solution is slightly expensive so this implementation is likely to be changed in the future.
* fix raise semantics with threads.Rich Felker2011-03-091-1/+12
|
* fix typos in dirent.hRich Felker2011-03-081-2/+2
|
* fcntl.h should make availabel the mode constants from sys/stat.hRich Felker2011-03-082-8/+20
| | | | also remove some legacy nonsense that crept in.
* simplify and optimize pthread_mutex_trylockRich Felker2011-03-081-17/+16
|
* rwlock trylock functions were wrongly returning EAGAIN instead of EBUSYRich Felker2011-03-082-3/+3
|
* fix major breakage in pthread_once (it was always deadlocking)Rich Felker2011-03-081-8/+7
| | | | | | the issue was a break statement that was breaking only from the switch, not the enclosing for loop, and a failure to set the final success state.
* fix and optimize non-default-type mutex behaviorRich Felker2011-03-084-25/+19
| | | | | | | | | problem 1: mutex type from the attribute was being ignored by pthread_mutex_init, so recursive/errorchecking mutexes were never being used at all. problem 2: ownership of recursive mutexes was not being enforced at unlock time.
* implement pthread_mutexattr_[gs]etpshared functionsRich Felker2011-03-082-0/+16
|
* disallow cpu time clocks as condattr clock valuesRich Felker2011-03-081-1/+1
|
* add macros for use with d_type extension field in direntRich Felker2011-03-071-0/+14
|
* fix off-by-one error in sem_(timed)wait (using old sem value instead of new)Rich Felker2011-03-071-1/+1
|
* use the selected clock from the condattr for pthread_cond_timedwaitRich Felker2011-03-073-1/+3
|
* add prototypes for pthread_condattr_* and pthread_rwlockattr_*Rich Felker2011-03-071-0/+12
|
* implement pthread_rwlockattr_* (essentially no-ops)Rich Felker2011-03-074-0/+28
|
* implement pthread_condattr_* interfacesRich Felker2011-03-076-0/+45
| | | | | note that, while the attributes are stored, they are not used in pthread_cond_init yet.
* reject invalid attribute settingsRich Felker2011-03-072-0/+2
| | | | | note that this is a pedantic conformance issue and waste of code. it only affects broken code or code that is probing for conformance.
* implement barrier attribute functions (essentially no-ops)Rich Felker2011-03-074-0/+27
|
* enforce stack size min in pthread_attr_setstacksizeRich Felker2011-03-041-1/+1
|
* implement POSIX semaphoresRich Felker2011-03-0410-0/+201
|
* preliminaries to adding POSIX semaphoresRich Felker2011-03-032-1/+8
|
* optimize POSIX TSD for fast pthread_getspecificRich Felker2011-03-034-9/+14
|
* namespace cleanup in sys/mman.hRich Felker2011-03-031-1/+3
|
* implement POSIX shared memoryRich Felker2011-03-032-0/+42
|
* use -L/...../ -lgcc instead of /...../libgcc.a in musl-gcc wrapperRich Felker2011-03-011-1/+2
| | | | | | this should avoid warnings about unused libs when not linking, and might fix some other obscure issues too. i might replace this approach with a completely different one soon though.
* depends on settimeofday which needs _GNU_SOURCE feature testRich Felker2011-03-011-0/+1
|
* implement futimens and utimensatRich Felker2011-02-273-0/+16
|
* cleanup namespace in sys/time.hRich Felker2011-02-271-4/+5
|
* implement fexecveRich Felker2011-02-272-0/+11
|
* cleanup utf-8 multibyte code, use visibility if possibleRich Felker2011-02-273-84/+5
| | | | | | | | | | | | | this code was written independently of musl, with support for a the backwards, nonstandard "31-bit unicode" some libraries/apps might want. unfortunately the extra code (inside #ifdef) makes the source harder to read and makes code that should be simple look complex, so i'm removing it. anyone who wants to use the old code can find it in the history or from elsewhere. also, change the visibility of the __fsmu8 state machine table to hidden, if supported. this should improve performance slightly in shared-library builds.
* fix missing prototype for strsignalRich Felker2011-02-262-0/+2
|
* various changes in preparation for dynamic linking supportRich Felker2011-02-244-8/+24
| | | | | | | | | | | | | | | | | prefer using visibility=hidden for __libc internal data, rather than an accessor function, if the compiler has visibility. optimize with -O3 for PIC targets (shared library). without heavy inlining, reloading the GOT register in small functions kills performance. 20-30% size increase for a single libc.so is not a big deal, compared to comparaible size increase in every static binaries. use -Bsymbolic-functions, not -Bsymbolic. global variables are subject to COPY relocations, and thus binding their addresses in the library at link time will cause library functions to read the wrong (original) copies instead of the copies made in the main program's bss section. add entry point, _start, for dynamic linker.
* apply feature test protection to memccpyRich Felker2011-02-241-1/+4
|
* add implementation of memccpy functionRich Felker2011-02-241-0/+32
|
* fix backwards conditional in stpncpyRich Felker2011-02-241-1/+1
| | | | | | this only made the function unnecessarily slow on systems with unaligned access, but would of course crash on systems that can't do unaligned accesses (none of which have ports yet).
* rewind must clear the error indicator in addition to seekingRich Felker2011-02-221-2/+5
|
* change errno to static linkage (improves PIC code generation)Rich Felker2011-02-211-4/+2
|