diff options
Diffstat (limited to 'os/common/abstractions/cmsis_os')
-rw-r--r-- | os/common/abstractions/cmsis_os/cmsis_os.c | 5 |
1 files changed, 1 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;
}
/**
|