Lines Matching refs:rt
61 _res_thread* rt = calloc(1, sizeof(*rt)); in _res_thread_alloc() local
63 if (rt) { in _res_thread_alloc()
64 rt->_h_errno = 0; in _res_thread_alloc()
65 memset(rt->_rstatic, 0, sizeof rt->_rstatic); in _res_thread_alloc()
67 return rt; in _res_thread_alloc()
87 _res_thread* rt = _rt; in _res_thread_free() local
89 D("%s: rt=%p for thread=%d", __FUNCTION__, rt, gettid()); in _res_thread_free()
91 _res_static_done(rt->_rstatic); in _res_thread_free()
92 res_ndestroy(rt->_nres); in _res_thread_free()
93 free(rt); in _res_thread_free()
105 _res_thread* rt; in _res_thread_get() local
106 rt = pthread_getspecific( _res_key ); in _res_thread_get()
108 if (rt != NULL) { in _res_thread_get()
109 return rt; in _res_thread_get()
114 rt = _res_thread_alloc(); in _res_thread_get()
115 if (rt == NULL) { in _res_thread_get()
118 pthread_setspecific( _res_key, rt ); in _res_thread_get()
120 __FUNCTION__, gettid(), rt); in _res_thread_get()
126 __FUNCTION__, gettid(), rt, (rt->_nres->options & RES_INIT) != 0); in _res_thread_get()
127 if ( res_ninit( rt->_nres ) < 0 ) { in _res_thread_get()
130 __FUNCTION__, gettid(), rt); in _res_thread_get()
131 _res_thread_free(rt); in _res_thread_get()
135 return rt; in _res_thread_get()
145 _res_thread* rt = _res_thread_get();
147 if (!rt)
150 if (!rt->_cache) {
151 rt->_cache = _resolv_cache_create();
153 return rt->_cache;
160 _res_thread* rt = _res_thread_get(); in __get_h_errno() local
163 return rt ? &rt->_h_errno : &panic; in __get_h_errno()
169 _res_thread* rt = _res_thread_get(); in __res_get_state() local
171 return rt ? rt->_nres : NULL; in __res_get_state()
183 _res_thread* rt = _res_thread_get(); in __res_get_static() local
185 return rt ? rt->_rstatic : NULL; in __res_get_static()