Lines Matching refs:key
53 _pthread_key_create(pthread_key_t *key, void (*destructor)(void *)) in _pthread_key_create() argument
71 *key = i + 1; in _pthread_key_create()
84 int key, ret; in _pthread_key_delete() local
86 key = userkey - 1; in _pthread_key_delete()
87 if ((unsigned int)key >= PTHREAD_KEYS_MAX) in _pthread_key_delete()
91 if (_thread_keytable[key].allocated) { in _pthread_key_delete()
92 _thread_keytable[key].allocated = 0; in _pthread_key_delete()
107 int i, key; in _thread_cleanupspecific() local
115 for (key = 0; key < PTHREAD_KEYS_MAX && in _thread_cleanupspecific()
116 curthread->specific_data_count > 0; key++) { in _thread_cleanupspecific()
119 if (_thread_keytable[key].allocated && in _thread_cleanupspecific()
120 (curthread->specific[key].data != NULL)) { in _thread_cleanupspecific()
121 if (curthread->specific[key].seqno == in _thread_cleanupspecific()
122 _thread_keytable[key].seqno) { in _thread_cleanupspecific()
123 data = curthread->specific[key].data; in _thread_cleanupspecific()
124 destructor = _thread_keytable[key]. in _thread_cleanupspecific()
127 curthread->specific[key].data = NULL; in _thread_cleanupspecific()
129 } else if (curthread->specific[key].data != NULL) { in _thread_cleanupspecific()
138 curthread->specific[key].data = NULL; in _thread_cleanupspecific()
169 pthread_key_t key; in _pthread_setspecific() local
171 key = userkey - 1; in _pthread_setspecific()
172 if ((unsigned int)key >= PTHREAD_KEYS_MAX || in _pthread_setspecific()
173 !_thread_keytable[key].allocated) in _pthread_setspecific()
185 if (pthread->specific[key].data == NULL) { in _pthread_setspecific()
190 pthread->specific[key].data = value; in _pthread_setspecific()
191 pthread->specific[key].seqno = _thread_keytable[key].seqno; in _pthread_setspecific()
200 pthread_key_t key; in _pthread_getspecific() local
203 key = userkey - 1; in _pthread_getspecific()
204 if ((unsigned int)key >= PTHREAD_KEYS_MAX) in _pthread_getspecific()
209 if (_thread_keytable[key].allocated && pthread->specific != NULL && in _pthread_getspecific()
210 pthread->specific[key].seqno == _thread_keytable[key].seqno) { in _pthread_getspecific()
212 data = pthread->specific[key].data; in _pthread_getspecific()
228 int key; in _thr_tsd_unload() local
232 for (key = 0; key < PTHREAD_KEYS_MAX; key++) { in _thr_tsd_unload()
233 if (!_thread_keytable[key].allocated) in _thr_tsd_unload()
235 destructor = _thread_keytable[key].destructor; in _thr_tsd_unload()
239 _thread_keytable[key].destructor = NULL; in _thr_tsd_unload()