Commit Graph

7 Commits

Author SHA1 Message Date
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
6c16d3e98a use bss instead of mmap for main thread's pthread thread-specific data
this simplifies code and removes a failure case
2011-04-01 22:07:59 -04:00
aa398f56fa global cleanup to use the new syscall interface 2011-03-20 00:16:43 -04:00
6dc05fbe19 optimize pthread initialization
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.
2011-03-09 20:21:23 -05:00
b480808a6a optimize POSIX TSD for fast pthread_getspecific 2011-03-03 18:30:44 -05:00
7b2dd2235d finish unifying thread register handling in preparation for porting 2011-02-15 03:56:52 -05:00
0b44a0315b initial check-in, version 0.5.0 2011-02-12 00:22:29 -05:00