Lines Matching refs:key

60 _thr_key_create(pthread_key_t *key, void (*destructor)(void *))  in _thr_key_create()  argument
78 *key = i + 1; in _thr_key_create()
91 int key, ret; in _thr_key_delete() local
93 key = userkey - 1; in _thr_key_delete()
94 if ((unsigned int)key >= PTHREAD_KEYS_MAX) in _thr_key_delete()
98 if (_thread_keytable[key].allocated) { in _thr_key_delete()
99 _thread_keytable[key].allocated = 0; in _thr_key_delete()
114 int i, key; in _thread_cleanupspecific() local
122 for (key = 0; key < PTHREAD_KEYS_MAX && in _thread_cleanupspecific()
123 curthread->specific_data_count > 0; key++) { in _thread_cleanupspecific()
126 if (_thread_keytable[key].allocated && in _thread_cleanupspecific()
127 (curthread->specific[key].data != NULL)) { in _thread_cleanupspecific()
128 if (curthread->specific[key].seqno == in _thread_cleanupspecific()
129 _thread_keytable[key].seqno) { in _thread_cleanupspecific()
130 data = curthread->specific[key].data; in _thread_cleanupspecific()
131 destructor = _thread_keytable[key]. in _thread_cleanupspecific()
134 curthread->specific[key].data = NULL; in _thread_cleanupspecific()
136 } else if (curthread->specific[key].data != NULL) { in _thread_cleanupspecific()
145 curthread->specific[key].data = NULL; in _thread_cleanupspecific()
175 pthread_key_t key; in _thr_setspecific() local
177 key = userkey - 1; in _thr_setspecific()
178 if ((unsigned int)key >= PTHREAD_KEYS_MAX || in _thr_setspecific()
179 !_thread_keytable[key].allocated) in _thr_setspecific()
190 if (pthread->specific[key].data == NULL) { in _thr_setspecific()
195 pthread->specific[key].data = value; in _thr_setspecific()
196 pthread->specific[key].seqno = _thread_keytable[key].seqno; in _thr_setspecific()
205 pthread_key_t key; in _thr_getspecific() local
208 key = userkey - 1; in _thr_getspecific()
209 if ((unsigned int)key >= PTHREAD_KEYS_MAX) in _thr_getspecific()
214 if (_thread_keytable[key].allocated && pthread->specific != NULL && in _thr_getspecific()
215 pthread->specific[key].seqno == _thread_keytable[key].seqno) { in _thr_getspecific()
217 data = pthread->specific[key].data; in _thr_getspecific()
233 int key; in _thr_tsd_unload() local
237 for (key = 0; key < PTHREAD_KEYS_MAX; key++) { in _thr_tsd_unload()
238 if (!_thread_keytable[key].allocated) in _thr_tsd_unload()
240 destructor = _thread_keytable[key].destructor; in _thr_tsd_unload()
244 _thread_keytable[key].destructor = NULL; in _thr_tsd_unload()