diff options
Diffstat (limited to 'lib/libc/gen/_pthread_stubs.c')
-rw-r--r-- | lib/libc/gen/_pthread_stubs.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/libc/gen/_pthread_stubs.c b/lib/libc/gen/_pthread_stubs.c index 87b0ad2..be6dab7 100644 --- a/lib/libc/gen/_pthread_stubs.c +++ b/lib/libc/gen/_pthread_stubs.c @@ -49,8 +49,14 @@ #pragma weak _pthread_mutexattr_destroy=_pthread_mutexattr_destroy_stub #pragma weak _pthread_mutexattr_settype=_pthread_mutexattr_settype_stub #pragma weak _pthread_once=_pthread_once_stub +#pragma weak _pthread_self=_pthread_self_stub #pragma weak _pthread_setspecific=_pthread_setspecific_stub +struct pthread { +}; + +static struct pthread main_thread; + void * _pthread_getspecific_stub(pthread_key_t key) @@ -124,6 +130,12 @@ _pthread_once_stub(pthread_once_t *once_control, void (*init_routine) (void)) return (0); } +pthread_t +_pthread_self_stub(void) +{ + return (&main_thread); +} + int _pthread_setspecific_stub(pthread_key_t key, const void *value) { |