123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- #include <errno.h>
- #include <linuxthreads/internals.h>
- #include <sysdep-cancel.h>
- #if ! USE___THREAD && !RTLD_PRIVATE_ERRNO
- #undef errno
- extern int errno;
- #endif
- int *
- #if ! USE___THREAD
- weak_const_function
- #endif
- __errno_location (void)
- {
- #if ! USE___THREAD && !defined NOT_IN_libc
- if (! SINGLE_THREAD_P)
- {
- pthread_descr self = thread_self();
- return LIBC_THREAD_GETMEM (self, p_errnop);
- }
- #endif
- return &errno;
- }
- libc_hidden_def (__errno_location)
|