From b2486a8922bf4977bd82c8190258e39de28c053b Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Wed, 6 Apr 2011 20:27:07 -0400 Subject: move rsyscall out of pthread_create module this is something of a tradeoff, as now set*id() functions, rather than pthread_create, are what pull in the code overhead for dealing with linux's refusal to implement proper POSIX thread-vs-process semantics. my motivations are: 1. it's cleaner this way, especially cleaner to optimize out the rsyscall locking overhead from pthread_create when it's not needed. 2. it's expected that only a tiny number of core system programs will ever use set*id() functions, whereas many programs may want to use threads, and making thread overhead tiny is an incentive for "light" programs to try threads. --- src/internal/pthread_impl.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/internal/pthread_impl.h') diff --git a/src/internal/pthread_impl.h b/src/internal/pthread_impl.h index 7ab6243d..0bcc54cc 100644 --- a/src/internal/pthread_impl.h +++ b/src/internal/pthread_impl.h @@ -86,6 +86,9 @@ int __timedwait(volatile int *, int, clockid_t, const struct timespec *, int); void __wait(volatile int *, volatile int *, int, int); void __wake(volatile int *, int, int); +void __rsyscall_lock(); +void __rsyscall_unlock(); + #define DEFAULT_STACK_SIZE (16384-PAGE_SIZE) #define DEFAULT_GUARD_SIZE PAGE_SIZE -- cgit v1.2.1