summaryrefslogtreecommitdiff
path: root/pthread
diff options
context:
space:
mode:
Diffstat (limited to 'pthread')
-rw-r--r--pthread/pt-create.c2
-rw-r--r--pthread/pt-internal.h4
2 files changed, 6 insertions, 0 deletions
diff --git a/pthread/pt-create.c b/pthread/pt-create.c
index 4f8d043f..5bb9f1f9 100644
--- a/pthread/pt-create.c
+++ b/pthread/pt-create.c
@@ -45,6 +45,8 @@ entry_point (void *(*start_routine)(void *), void *arg)
uselocale (LC_GLOBAL_LOCALE);
#endif
+ __pthread_startup ();
+
pthread_exit (start_routine (arg));
}
diff --git a/pthread/pt-internal.h b/pthread/pt-internal.h
index 0dd4e9a8..6d34be13 100644
--- a/pthread/pt-internal.h
+++ b/pthread/pt-internal.h
@@ -218,6 +218,10 @@ extern void __pthread_thread_halt (struct __pthread *thread,
int need_dealloc);
+/* Called by a thread just before it calls the provided start
+ routine. */
+extern void __pthread_startup (void);
+
/* Block THREAD. */
extern void __pthread_block (struct __pthread *thread);