From 2000bff59bdde16770dd6d4274e44a2387de979e Mon Sep 17 00:00:00 2001 From: Giovanni Di Sirio Date: Sun, 2 Apr 2017 10:10:03 +0000 Subject: [PATCH] Fixed bug #823. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@10137 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/common/abstractions/cmsis_os/cmsis_os.c | 5 +---- readme.txt | 2 ++ 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/os/common/abstractions/cmsis_os/cmsis_os.c b/os/common/abstractions/cmsis_os/cmsis_os.c index d925cd73d..eded466dc 100644 --- a/os/common/abstractions/cmsis_os/cmsis_os.c +++ b/os/common/abstractions/cmsis_os/cmsis_os.c @@ -148,19 +148,16 @@ osStatus osThreadTerminate(osThreadId thread_id) { * @note This can interfere with the priority inheritance mechanism. */ osStatus osThreadSetPriority(osThreadId thread_id, osPriority newprio) { - osPriority oldprio; thread_t * tp = (thread_t *)thread_id; chSysLock(); /* Changing priority.*/ #if CH_CFG_USE_MUTEXES - oldprio = (osPriority)tp->realprio; if ((tp->prio == tp->realprio) || ((tprio_t)newprio > tp->prio)) tp->prio = (tprio_t)newprio; tp->realprio = (tprio_t)newprio; #else - oldprio = tp->prio; tp->prio = (tprio_t)newprio; #endif @@ -202,7 +199,7 @@ osStatus osThreadSetPriority(osThreadId thread_id, osPriority newprio) { chSysUnlock(); - return oldprio; + return osOK; } /** diff --git a/readme.txt b/readme.txt index ee17396ce..f6c758a81 100644 --- a/readme.txt +++ b/readme.txt @@ -157,6 +157,8 @@ - RT: Merged RT4. - NIL: Merged NIL2. - NIL: Added STM32F7 demo. +- HAL: Fixed osThreadSetPriority() returns old priority instead of a status + code (bug #823)(backported to 16.1.8). - HAL: Fixed problem in rtcSTM32SetPeriodicWakeup() (bug #821)(backported to 16.1.8). - HAL: Fixed STM32 RTCv1 synchronization problem (bug #820)(backported