Lines Matching refs:tid
293 static void _pthread_cleanup(rt_thread_t tid) in _pthread_cleanup() argument
296 tid->cleanup = RT_NULL; in _pthread_cleanup()
299 rt_free(tid->stack_addr); in _pthread_cleanup()
302 tid->pthread_data = RT_NULL; in _pthread_cleanup()
305 rt_free(tid); in _pthread_cleanup()
434 ptd->tid = (rt_thread_t) rt_malloc(sizeof(struct rt_thread)); in pthread_create()
435 if (ptd->tid == RT_NULL) in pthread_create()
440 memset(ptd->tid, 0, sizeof(struct rt_thread)); in pthread_create()
477 if (rt_thread_init(ptd->tid, name, pthread_entry_stub, ptd, in pthread_create()
489 ptd->tid->cleanup = _pthread_cleanup; in pthread_create()
490 ptd->tid->pthread_data = (void *)ptd; in pthread_create()
493 if (rt_thread_startup(ptd->tid) == RT_EOK) in pthread_create()
497 rt_thread_detach(ptd->tid); in pthread_create()
553 if ((RT_SCHED_CTX(ptd->tid).stat & RT_THREAD_STAT_MASK) == RT_THREAD_CLOSE) in pthread_detach()
616 if (ptd->tid == rt_thread_self()) in pthread_join()
667 rt_thread_t tid; in pthread_self() local
670 tid = rt_thread_self(); in pthread_self()
671 if (tid == NULL) return PTHREAD_NUM_MAX; in pthread_self()
951 rt_thread_t tid; in pthread_exit() local
983 tid = ptd->tid; in pthread_exit()
1004 rt_thread_detach(tid); in pthread_exit()
1102 ret = rt_thread_kill(ptd->tid, sig); in pthread_kill()
1446 rt_thread_t tid; in pthread_cancel() local
1454 tid = ptd->tid; in pthread_cancel()
1457 if (ptd->tid == rt_thread_self()) in pthread_cancel()
1499 rt_thread_detach(tid); in pthread_cancel()