From b4ddc58755e1c5799259a302d33b33697023dd7a Mon Sep 17 00:00:00 2001 From: Giovanni Di Sirio Date: Sat, 4 Jun 2016 17:04:16 +0000 Subject: [PATCH] Fixed bug #752. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/stable_16.1.x@9577 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/rt/ports/ARMCMx/cmsis_os/cmsis_os.h | 2 +- readme.txt | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/os/rt/ports/ARMCMx/cmsis_os/cmsis_os.h b/os/rt/ports/ARMCMx/cmsis_os/cmsis_os.h index 23f12a0b6..12a37eeaa 100644 --- a/os/rt/ports/ARMCMx/cmsis_os/cmsis_os.h +++ b/os/rt/ports/ARMCMx/cmsis_os/cmsis_os.h @@ -502,7 +502,7 @@ static inline osStatus osThreadYield(void) { */ static inline osPriority osThreadGetPriority(osThreadId thread_id) { - return thread_id->p_prio; + return (osPriority)(NORMALPRIO - thread_id->p_prio); } /** diff --git a/readme.txt b/readme.txt index acc7d8059..8fdd38c78 100644 --- a/readme.txt +++ b/readme.txt @@ -73,6 +73,8 @@ ***************************************************************************** *** 16.1.5 *** +- HAL: Fixed CMSIS function osThreadGetPriority() does not return correct + priority (bug #752). - HAL: Fixed wrong conditional branches in _adc_isr_error_code (bug #751). - HAL: Fixed bug in STM32/ADCv3 (bug #750). - HAL: Fixed OPT settings and added board folder in STM32F4xx-USB_CDC demo