1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- #define _GNU_SOURCE
- #include <features.h>
- #include <locale.h>
- #include <stdlib.h>
- #include <string.h>
- #include "internals.h"
- #include "sysdeps/pthread/pthread-functions.h"
- #if !(USE_TLS && HAVE___THREAD) && defined __UCLIBC_HAS_XLOCALE__
- extern __locale_t __uselocale (__locale_t __dataset) __THROW;
- #endif
- int __libc_multiple_threads attribute_hidden __attribute__((nocommon));
- int *
- __libc_pthread_init (functions)
- const struct pthread_functions *functions;
- {
- #ifdef SHARED
-
- __memcpy (&__libc_pthread_functions, functions,
- sizeof (__libc_pthread_functions));
- #endif
- #if !(USE_TLS && HAVE___THREAD) && defined __UCLIBC_HAS_XLOCALE__
-
- __uselocale (LC_GLOBAL_LOCALE);
- #endif
- return &__libc_multiple_threads;
- }
|