From a20bc7701096c8cf18c661df5c3f59770ae5204a Mon Sep 17 00:00:00 2001 From: zhangyuan21 Date: Mon, 13 Feb 2023 20:38:42 +0800 Subject: [PATCH] sched/pthread: change the wrong type cast Signed-off-by: zhangyuan21 --- sched/pthread/pthread_findjoininfo.c | 2 +- sched/pthread/pthread_join.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sched/pthread/pthread_findjoininfo.c b/sched/pthread/pthread_findjoininfo.c index 72eb111559..631980aaf5 100644 --- a/sched/pthread/pthread_findjoininfo.c +++ b/sched/pthread/pthread_findjoininfo.c @@ -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 && diff --git a/sched/pthread/pthread_join.c b/sched/pthread/pthread_join.c index 398e35100d..5a7263bd61 100644 --- a/sched/pthread/pthread_join.c +++ b/sched/pthread/pthread_join.c @@ -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");