1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- #include <resolv.h>
- #include <tls.h>
- #include <linuxthreads/internals.h>
- #include <sysdep-cancel.h>
- #if ! USE___THREAD
- # undef _res
- extern struct __res_state _res;
- #endif
- struct __res_state *
- #if ! USE___THREAD
- weak_const_function
- #endif
- __res_state (void)
- {
- #if ! USE___THREAD
- if (! SINGLE_THREAD_P)
- {
- pthread_descr self = thread_self();
- return LIBC_THREAD_GETMEM (self, p_resp);
- }
- return &_res;
- #else
- return __resp;
- #endif
- }
- libc_hidden_def (__res_state)
|