diff options
author | Eric Andersen <andersen@codepoet.org> | 2002-08-19 10:05:03 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2002-08-19 10:05:03 +0000 |
commit | 3358b761b15daa480ca0ca788b3fe077ac967674 (patch) | |
tree | d1cea37dd0fbc86a85259b025e62f3e672d68368 /libpthread/linuxthreads/pthread.c | |
parent | c8b3ccaedb7e08a2d25ce4485ff7e13ddc6e92a5 (diff) |
Based on work by Stefan Allius, arrange for early initialization of
pthread stuff. Also, don't bother building libthread_db unless we
are debugging.
-Erik
Diffstat (limited to 'libpthread/linuxthreads/pthread.c')
-rw-r--r-- | libpthread/linuxthreads/pthread.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/libpthread/linuxthreads/pthread.c b/libpthread/linuxthreads/pthread.c index 548f83a5f..5142d4c13 100644 --- a/libpthread/linuxthreads/pthread.c +++ b/libpthread/linuxthreads/pthread.c @@ -236,6 +236,18 @@ void (*__pthread_suspend)(pthread_descr) = __pthread_suspend_old; static void pthread_initialize(void) __attribute__((constructor)); + /* Do some minimal initialization which has to be done during the + startup of the C library. */ +void __pthread_initialize_minimal(void) +{ + /* If we have special thread_self processing, initialize + * that for the main thread now. */ +#ifdef INIT_THREAD_SELF + INIT_THREAD_SELF(&__pthread_initial_thread, 0); +#endif +} + + static void pthread_initialize(void) { struct sigaction sa; |