From 83b6331aade5f9d635f46cff5c7dedefae906af5 Mon Sep 17 00:00:00 2001 From: LiteOS2021 Date: Fri, 18 Mar 2022 11:16:43 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E7=BA=BF=E7=A8=8Bid=E5=88=A4=E6=96=AD?= =?UTF-8?q?=E6=9C=89=E8=AF=AF=EF=BC=8Ccmsis=E4=BC=98=E5=85=88=E7=BA=A7?= =?UTF-8?q?=E5=88=9B=E5=BB=BA=E4=BF=AE=E6=94=B9):=20=E7=BA=BF=E7=A8=8Bid?= =?UTF-8?q?=E5=88=A4=E6=96=AD=E6=9C=89=E8=AF=AF=EF=BC=8Ccmsis=E4=BC=98?= =?UTF-8?q?=E5=85=88=E7=BA=A7=E5=88=9B=E5=BB=BA=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 线程id判断有误,cmsis优先级创建修改 Signed-off-by: LiteOS2021 --- kal/posix/src/pthread.c | 2 +- testsuites/sample/cmsis/cmsis_func_test.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/kal/posix/src/pthread.c b/kal/posix/src/pthread.c index 37296c6e..9da1dfc5 100644 --- a/kal/posix/src/pthread.c +++ b/kal/posix/src/pthread.c @@ -82,7 +82,7 @@ static void *PthreadEntry(UINT32 param) static inline bool IsPthread(pthread_t thread) { LosTaskCB *tcb = NULL; - if ((UINT32)thread >= LOSCFG_BASE_CORE_TSK_LIMIT) { + if ((UINT32)thread > LOSCFG_BASE_CORE_TSK_LIMIT) { return false; } tcb = OS_TCB_FROM_TID((UINT32)thread); diff --git a/testsuites/sample/cmsis/cmsis_func_test.c b/testsuites/sample/cmsis/cmsis_func_test.c index d1fcf94e..f9aa29b9 100644 --- a/testsuites/sample/cmsis/cmsis_func_test.c +++ b/testsuites/sample/cmsis/cmsis_func_test.c @@ -66,7 +66,7 @@ LITE_TEST_CASE(CmsisFuncTestSuite, TestCmsis001, Function | MediumTest | Level1) attr.stack_mem = stackAddr; attr.stack_size = OS_TSK_TEST_STACK_SIZE; - attr.priority = osPriorityNormal; + attr.priority = osPriorityNormal + 1; attr.attr_bits = osThreadDetached; threadId = osThreadNew((osThreadFunc_t)CmsisStackFunc01, NULL, &attr); ICUNIT_GOTO_NOT_EQUAL(threadId, 0, threadId, EXIT);