Lines Matching refs:curthread

59 	struct pthread *curthread;  in _thr_key_create()  local
64 curthread = _get_curthread(); in _thr_key_create()
66 THR_LOCK_ACQUIRE(curthread, &_keytable_lock); in _thr_key_create()
74 THR_LOCK_RELEASE(curthread, &_keytable_lock); in _thr_key_create()
80 THR_LOCK_RELEASE(curthread, &_keytable_lock); in _thr_key_create()
87 struct pthread *curthread; in _thr_key_delete() local
93 curthread = _get_curthread(); in _thr_key_delete()
94 THR_LOCK_ACQUIRE(curthread, &_keytable_lock); in _thr_key_delete()
101 THR_LOCK_RELEASE(curthread, &_keytable_lock); in _thr_key_delete()
108 struct pthread *curthread; in _thread_cleanupspecific() local
113 curthread = _get_curthread(); in _thread_cleanupspecific()
114 if (curthread->specific == NULL) in _thread_cleanupspecific()
116 THR_LOCK_ACQUIRE(curthread, &_keytable_lock); in _thread_cleanupspecific()
118 curthread->specific_data_count > 0; i++) { in _thread_cleanupspecific()
120 curthread->specific_data_count > 0; key++) { in _thread_cleanupspecific()
124 (curthread->specific[key].data != NULL)) { in _thread_cleanupspecific()
125 if (curthread->specific[key].seqno == in _thread_cleanupspecific()
127 data = curthread->specific[key].data; in _thread_cleanupspecific()
131 curthread->specific[key].data = NULL; in _thread_cleanupspecific()
132 curthread->specific_data_count--; in _thread_cleanupspecific()
133 } else if (curthread->specific[key].data != NULL) { in _thread_cleanupspecific()
142 curthread->specific[key].data = NULL; in _thread_cleanupspecific()
143 curthread->specific_data_count--; in _thread_cleanupspecific()
151 THR_LOCK_RELEASE(curthread, &_keytable_lock); in _thread_cleanupspecific()
153 THR_LOCK_ACQUIRE(curthread, &_keytable_lock); in _thread_cleanupspecific()
157 THR_LOCK_RELEASE(curthread, &_keytable_lock); in _thread_cleanupspecific()
158 __thr_free(curthread->specific); in _thread_cleanupspecific()
159 curthread->specific = NULL; in _thread_cleanupspecific()
160 if (curthread->specific_data_count > 0) { in _thread_cleanupspecific()
163 curthread, PTHREAD_DESTRUCTOR_ITERATIONS); in _thread_cleanupspecific()
228 struct pthread *curthread; in _thr_tsd_unload() local
232 curthread = _get_curthread(); in _thr_tsd_unload()
233 THR_LOCK_ACQUIRE(curthread, &_keytable_lock); in _thr_tsd_unload()
243 THR_LOCK_RELEASE(curthread, &_keytable_lock); in _thr_tsd_unload()