summaryrefslogtreecommitdiff
path: root/libpthread/linuxthreads/pthread.c
diff options
context:
space:
mode:
Diffstat (limited to 'libpthread/linuxthreads/pthread.c')
-rw-r--r--libpthread/linuxthreads/pthread.c12
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;