Lines Matching refs:thread
84 static inline bool IsPthread(pthread_t thread) in IsPthread() argument
87 if ((UINT32)thread > LOSCFG_BASE_CORE_TSK_LIMIT) { in IsPthread()
90 tcb = OS_TCB_FROM_TID((UINT32)thread); in IsPthread()
177 pthread_t thread = pthread_self(); in CheckForCancel() local
178 if (!IsPthread(thread)) { in CheckForCancel()
179 … PRINT_ERR("[%s:%d] This task %lu is not a posix thread!!!\n", __FUNCTION__, __LINE__, thread); in CheckForCancel()
183 tcb = OS_TCB_FROM_TID((UINT32)thread); in CheckForCancel()
194 int pthread_create(pthread_t *thread, const pthread_attr_t *attr, in pthread_create() argument
202 if ((thread == NULL) || (startRoutine == NULL)) { in pthread_create()
226 *thread = (pthread_t)taskID; in pthread_create()
233 int pthread_setschedparam(pthread_t thread, int policy, const struct sched_param *param) in pthread_setschedparam() argument
235 if (!IsPthread(thread)) { in pthread_setschedparam()
236 … PRINT_ERR("[%s:%d] This task %lu is not a posix thread!!!\n", __FUNCTION__, __LINE__, thread); in pthread_setschedparam()
250 if (LOS_TaskPriSet((UINT32)thread, (UINT16)param->sched_priority) != LOS_OK) { in pthread_setschedparam()
257 int pthread_setschedprio(pthread_t thread, int prio) in pthread_setschedprio() argument
259 if (!IsPthread(thread)) { in pthread_setschedprio()
260 … PRINT_ERR("[%s:%d] This task %lu is not a posix thread!!!\n", __FUNCTION__, __LINE__, thread); in pthread_setschedprio()
264 if (LOS_TaskPriSet((UINT32)thread, (UINT16)prio) != LOS_OK) { in pthread_setschedprio()
276 pthread_t thread = pthread_self(); in pthread_once() local
277 if (!IsPthread(thread)) { in pthread_once()
278 … PRINT_ERR("[%s:%d] This task %lu is not a posix thread!!!\n", __FUNCTION__, __LINE__, thread); in pthread_once()
307 pthread_t thread = pthread_self(); in pthread_setcancelstate() local
308 if (!IsPthread(thread)) { in pthread_setcancelstate()
309 … PRINT_ERR("[%s:%d] This task %lu is not a posix thread!!!\n", __FUNCTION__, __LINE__, thread); in pthread_setcancelstate()
317 tcb = OS_TCB_FROM_TID((UINT32)thread); in pthread_setcancelstate()
340 pthread_t thread = pthread_self(); in pthread_setcanceltype() local
341 if (!IsPthread(thread)) { in pthread_setcanceltype()
342 … PRINT_ERR("[%s:%d] This task %lu is not a posix thread!!!\n", __FUNCTION__, __LINE__, thread); in pthread_setcanceltype()
350 tcb = OS_TCB_FROM_TID((UINT32)thread); in pthread_setcanceltype()
368 int pthread_getschedparam(pthread_t thread, int *policy, struct sched_param *param) in pthread_getschedparam() argument
372 if (!IsPthread(thread)) { in pthread_getschedparam()
373 … PRINT_ERR("[%s:%d] This task %lu is not a posix thread!!!\n", __FUNCTION__, __LINE__, thread); in pthread_getschedparam()
381 prio = LOS_TaskPriGet((UINT32)thread); in pthread_getschedparam()
418 int pthread_cancel(pthread_t thread) in pthread_cancel() argument
423 if (!IsPthread(thread)) { in pthread_cancel()
424 … PRINT_ERR("[%s:%d] This task %lu is not a posix thread!!!\n", __FUNCTION__, __LINE__, thread); in pthread_cancel()
428 tcb = OS_TCB_FROM_TID((UINT32)thread); in pthread_cancel()
461 int pthread_join(pthread_t thread, void **retval) in pthread_join() argument
465 if (!IsPthread(thread)) { in pthread_join()
466 … PRINT_ERR("[%s:%d] This task %lu is not a posix thread!!!\n", __FUNCTION__, __LINE__, thread); in pthread_join()
470 ret = LOS_TaskJoin((UINT32)thread, &result); in pthread_join()
489 int pthread_detach(pthread_t thread) in pthread_detach() argument
492 if (!IsPthread(thread)) { in pthread_detach()
493 … PRINT_ERR("[%s:%d] This task %lu is not a posix thread!!!\n", __FUNCTION__, __LINE__, thread); in pthread_detach()
497 ret = LOS_TaskDetach((UINT32)thread); in pthread_detach()
513 pthread_t thread = pthread_self(); in pthread_exit() local
514 if (!IsPthread(thread)) { in pthread_exit()
515 … PRINT_ERR("[%s:%d] This task %lu is not a posix thread!!!\n", __FUNCTION__, __LINE__, thread); in pthread_exit()
519 tcb = OS_TCB_FROM_TID((UINT32)thread); in pthread_exit()
541 int pthread_setname_np(pthread_t thread, const char *name) in pthread_setname_np() argument
547 if (!IsPthread(thread)) { in pthread_setname_np()
548 … PRINT_ERR("[%s:%d] This task %lu is not a posix thread!!!\n", __FUNCTION__, __LINE__, thread); in pthread_setname_np()
552 taskName = LOS_TaskNameGet((UINT32)thread); in pthread_setname_np()
561 taskCB = OS_TCB_FROM_TID((UINT32)thread); in pthread_setname_np()
579 int pthread_getname_np(pthread_t thread, char *buf, size_t buflen) in pthread_getname_np() argument
584 if (!IsPthread(thread)) { in pthread_getname_np()
585 … PRINT_ERR("[%s:%d] This task %lu is not a posix thread!!!\n", __FUNCTION__, __LINE__, thread); in pthread_getname_np()
589 name = LOS_TaskNameGet((UINT32)thread); in pthread_getname_np()
634 pthread_t thread = pthread_self(); in pthread_key_create() local
635 if (!IsPthread(thread)) { in pthread_key_create()
636 … PRINT_ERR("[%s:%d] This task %lu is not a posix thread!!!\n", __FUNCTION__, __LINE__, thread); in pthread_key_create()
672 pthread_t thread = pthread_self(); in pthread_key_delete() local
673 if (!IsPthread(thread)) { in pthread_key_delete()
674 … PRINT_ERR("[%s:%d] This task %lu is not a posix thread!!!\n", __FUNCTION__, __LINE__, thread); in pthread_key_delete()