Lines Matching refs:key

161 	thread_key_t key;  in thr_keycreate_once()  local
167 error = thr_keycreate(&key, destructor); in thr_keycreate_once()
173 *keyp = key; in thr_keycreate_once()
183 pthread_key_delete(pthread_key_t key) in pthread_key_delete() argument
189 if (key >= tsdm->tsdm_nused || in pthread_key_delete()
190 tsdm->tsdm_destro[key] == TSD_UNALLOCATED) { in pthread_key_delete()
195 tsdm->tsdm_destro[key] = TSD_UNALLOCATED; in pthread_key_delete()
212 pthread_getspecific(pthread_key_t key) in pthread_getspecific() argument
224 if (key < TSD_NFAST) in pthread_getspecific()
225 return (curthread->ul_ftsd[key]); in pthread_getspecific()
227 if ((stsd = curthread->ul_stsd) != NULL && key < stsd->tsd_nalloc) in pthread_getspecific()
228 return (stsd->tsd_data[key]); in pthread_getspecific()
234 thr_getspecific(thread_key_t key, void **valuep) in thr_getspecific() argument
245 if (key == 0) in thr_getspecific()
248 if (key < TSD_NFAST) in thr_getspecific()
249 *valuep = curthread->ul_ftsd[key]; in thr_getspecific()
250 else if ((stsd = curthread->ul_stsd) != NULL && key < stsd->tsd_nalloc) in thr_getspecific()
251 *valuep = stsd->tsd_data[key]; in thr_getspecific()
265 thr_setspecific_slow(thread_key_t key, void *value) in thr_setspecific_slow() argument
277 if (key >= tsdm->tsdm_nused) in thr_setspecific_slow()
295 for (; key >= nkeys; nkeys <<= 1) in thr_setspecific_slow()
313 ntsd->tsd_data[key] = value; in thr_setspecific_slow()
320 thr_setspecific(thread_key_t key, void *value) in thr_setspecific() argument
329 if (key == 0) in thr_setspecific()
332 if (key < TSD_NFAST) { in thr_setspecific()
333 curthread->ul_ftsd[key] = value; in thr_setspecific()
337 if ((stsd = curthread->ul_stsd) != NULL && key < stsd->tsd_nalloc) { in thr_setspecific()
338 stsd->tsd_data[key] = value; in thr_setspecific()
347 ret = thr_setspecific_slow(key, value); in thr_setspecific()
353 pthread_setspecific(pthread_key_t key, const void *value) in pthread_setspecific() argument
355 return (thr_setspecific(key, (void *)value)); in pthread_setspecific()
373 _thr_slot_offset(thread_key_t key) in _thr_slot_offset() argument
375 if (key != 0 && key < TSD_NFAST) in _thr_slot_offset()
376 return ((ptrdiff_t)offsetof(ulwp_t, ul_ftsd[key])); in _thr_slot_offset()
388 thread_key_t key; in tsd_exit() local
398 for (key = 1; key < TSD_NFAST && in tsd_exit()
399 key < tsdm->tsdm_nused; key++) { in tsd_exit()
400 if ((func = tsdm->tsdm_destro[key]) != NULL && in tsd_exit()
402 (val = self->ul_ftsd[key]) != NULL) { in tsd_exit()
403 self->ul_ftsd[key] = NULL; in tsd_exit()
419 for (; key < self->ul_stsd->tsd_nalloc && in tsd_exit()
420 key < tsdm->tsdm_nused; key++) { in tsd_exit()
421 if ((func = tsdm->tsdm_destro[key]) != NULL && in tsd_exit()
423 (val = self->ul_stsd->tsd_data[key]) != NULL) { in tsd_exit()
424 self->ul_stsd->tsd_data[key] = NULL; in tsd_exit()