Lines Matching refs:ptd
51 struct _pthread_data* ptd; in pthread_getspecific() local
56 ptd = (_pthread_data_t *)rt_thread_self()->pthread_data; in pthread_getspecific()
57 RT_ASSERT(ptd != NULL); in pthread_getspecific()
59 if (ptd->tls == NULL) in pthread_getspecific()
63 return ptd->tls[key]; in pthread_getspecific()
102 struct _pthread_data* ptd; in pthread_setspecific() local
107 ptd = (_pthread_data_t *)rt_thread_self()->pthread_data; in pthread_setspecific()
108 RT_ASSERT(ptd != NULL); in pthread_setspecific()
111 if (ptd->tls == NULL) in pthread_setspecific()
113 ptd->tls = (void**)rt_calloc(PTHREAD_KEY_MAX, sizeof(void*)); in pthread_setspecific()
118 ptd->tls[key] = (void *)value; in pthread_setspecific()