Lines Matching refs:key
57 _thr_key_create(pthread_key_t *key, void (*destructor)(void *)) in _thr_key_create() argument
75 *key = i + 1; in _thr_key_create()
88 int key, ret; in _thr_key_delete() local
90 key = userkey - 1; in _thr_key_delete()
91 if ((unsigned int)key >= PTHREAD_KEYS_MAX) in _thr_key_delete()
95 if (_thread_keytable[key].allocated) { in _thr_key_delete()
96 _thread_keytable[key].allocated = 0; in _thr_key_delete()
111 int i, key; in _thread_cleanupspecific() local
119 for (key = 0; key < PTHREAD_KEYS_MAX && in _thread_cleanupspecific()
120 curthread->specific_data_count > 0; key++) { in _thread_cleanupspecific()
123 if (_thread_keytable[key].allocated && in _thread_cleanupspecific()
124 (curthread->specific[key].data != NULL)) { in _thread_cleanupspecific()
125 if (curthread->specific[key].seqno == in _thread_cleanupspecific()
126 _thread_keytable[key].seqno) { in _thread_cleanupspecific()
127 data = curthread->specific[key].data; in _thread_cleanupspecific()
128 destructor = _thread_keytable[key]. in _thread_cleanupspecific()
131 curthread->specific[key].data = NULL; in _thread_cleanupspecific()
133 } else if (curthread->specific[key].data != NULL) { in _thread_cleanupspecific()
142 curthread->specific[key].data = NULL; in _thread_cleanupspecific()
172 pthread_key_t key; in _thr_setspecific() local
174 key = userkey - 1; in _thr_setspecific()
175 if ((unsigned int)key >= PTHREAD_KEYS_MAX || in _thr_setspecific()
176 !_thread_keytable[key].allocated) in _thr_setspecific()
187 if (pthread->specific[key].data == NULL) { in _thr_setspecific()
192 pthread->specific[key].data = value; in _thr_setspecific()
193 pthread->specific[key].seqno = _thread_keytable[key].seqno; in _thr_setspecific()
202 pthread_key_t key; in _thr_getspecific() local
205 key = userkey - 1; in _thr_getspecific()
206 if ((unsigned int)key >= PTHREAD_KEYS_MAX) in _thr_getspecific()
211 if (_thread_keytable[key].allocated && pthread->specific != NULL && in _thr_getspecific()
212 pthread->specific[key].seqno == _thread_keytable[key].seqno) { in _thr_getspecific()
214 data = pthread->specific[key].data; in _thr_getspecific()
230 int key; in _thr_tsd_unload() local
234 for (key = 0; key < PTHREAD_KEYS_MAX; key++) { in _thr_tsd_unload()
235 if (!_thread_keytable[key].allocated) in _thr_tsd_unload()
237 destructor = _thread_keytable[key].destructor; in _thr_tsd_unload()
241 _thread_keytable[key].destructor = NULL; in _thr_tsd_unload()