/* * Get thread specific "global" variable, * using new POSIX routines. * Crash and burn if the thread given isn't the calling thread. * XXX For compatibility with old cthread_data() XXX */ void * cthread_data(cthread_t t) { register cthread_t self; void *value; self = cthread_self(); if (t == self) { (void)cthread_getspecific(CTHREAD_KEY_RESERVED, &value); return(value); } else { ASSERT(t == self); return(NULL); } }
int ldap_pvt_thread_key_getdata( ldap_pvt_thread_key_t key, void **data ) { return cthread_getspecific( key, data ); }