- 13 3月, 2011 1 次提交
-
-
由 Rich Felker 提交于
actually it gets this from time.h if _POSIX_C_SOURCE or any other feature test macros are defined, but it breaks if they're not.
-
- 12 3月, 2011 2 次提交
-
-
由 Rich Felker 提交于
-
由 Rich Felker 提交于
-
- 11 3月, 2011 16 次提交
-
-
由 Rich Felker 提交于
-
由 Rich Felker 提交于
for some reason these functions are not shaded by the PS/TPS option in POSIX, so presumably they are mandatory, even though the functionality they offer is optional. for now, provide them in case any programs depend on their existence, but disallow any priority except the default.
-
由 Rich Felker 提交于
-
由 Rich Felker 提交于
-
由 Rich Felker 提交于
-
由 Rich Felker 提交于
-
由 Rich Felker 提交于
-
由 Rich Felker 提交于
-
由 Rich Felker 提交于
-
由 Rich Felker 提交于
multiple opens of the same named semaphore must return the same pointer, and only the last close can unmap it. thus the ugly global state keeping track of mappings. the maximum number of distinct named semaphores that can be opened is limited sufficiently small that the linear searches take trivial time, especially compared to the syscall overhead of these functions.
-
由 Rich Felker 提交于
we can avoid blocking signals by simply using a flag to mark that the thread has exited and prevent it from getting counted in the rsyscall signal-pingpong. this restores the original pthread create/join throughput from before the sigprocmask call was added.
-
由 Rich Felker 提交于
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.
-
由 Rich Felker 提交于
-
由 Rich Felker 提交于
-
由 Rich Felker 提交于
-
由 Rich Felker 提交于
-
- 10 3月, 2011 10 次提交
-
-
由 Rich Felker 提交于
-
由 Rich Felker 提交于
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.
-
由 Rich Felker 提交于
-
由 Rich Felker 提交于
-
由 Rich Felker 提交于
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.
-
由 Rich Felker 提交于
it must return errno, not -1, and should reject invalud values for how.
-
由 Rich Felker 提交于
-
由 Rich Felker 提交于
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.
-
由 Rich Felker 提交于
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.
-
由 Rich Felker 提交于
-
- 09 3月, 2011 5 次提交
-
-
由 Rich Felker 提交于
-
由 Rich Felker 提交于
also remove some legacy nonsense that crept in.
-
由 Rich Felker 提交于
-
由 Rich Felker 提交于
-
由 Rich Felker 提交于
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.
-
- 08 3月, 2011 6 次提交
-
-
由 Rich Felker 提交于
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.
-
由 Rich Felker 提交于
-
由 Rich Felker 提交于
-
由 Rich Felker 提交于
-
由 Rich Felker 提交于
-
由 Rich Felker 提交于
-