From 3358b761b15daa480ca0ca788b3fe077ac967674 Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Mon, 19 Aug 2002 10:05:03 +0000 Subject: 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 --- libpthread/linuxthreads/pthread.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'libpthread/linuxthreads/pthread.c') 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; -- cgit v1.2.3