sched/pthread: change the wrong type cast

Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
This commit is contained in:
zhangyuan21 2023-02-13 20:38:42 +08:00 committed by Xiang Xiao
parent dc2e9b8771
commit a20bc77010
2 changed files with 2 additions and 2 deletions

View File

@ -138,7 +138,7 @@ FAR struct join_s *pthread_findjoininfo(FAR struct task_group_s *group,
if (pjoin == NULL)
{
FAR struct tcb_s *tcb = nxsched_get_tcb((pthread_t)pid);
FAR struct tcb_s *tcb = nxsched_get_tcb(pid);
if (tcb != NULL && (tcb->flags & TCB_FLAG_DETACHED) == 0 &&
(tcb->flags & TCB_FLAG_TTYPE_MASK) == TCB_FLAG_TTYPE_PTHREAD &&

View File

@ -114,7 +114,7 @@ int pthread_join(pthread_t thread, FAR pthread_addr_t *pexit_value)
{
/* Determine what kind of error to return */
FAR struct tcb_s *tcb = nxsched_get_tcb((pthread_t)thread);
FAR struct tcb_s *tcb = nxsched_get_tcb((pid_t)thread);
swarn("WARNING: Could not find thread data\n");