diff --git a/os/kernel/include/chschd.h b/os/kernel/include/chschd.h index 8d8a2b36f..2518215bd 100644 --- a/os/kernel/include/chschd.h +++ b/os/kernel/include/chschd.h @@ -116,7 +116,7 @@ register Thread *currp asm(CH_CURRP_REGISTER_CACHE); #if !defined(CH_CURRP_REGISTER_CACHE) || defined(__DOXYGEN__) #define setcurrp(tp) (rlist.r_current = (tp)) #else /* defined(CH_CURRP_REGISTER_CACHE) */ -(currp = (tp)) +#define setcurrp(tp) (currp = (tp)) #endif /* defined(CH_CURRP_REGISTER_CACHE) */ #endif /* !defined(PORT_OPTIMIZED_SETCURRP) */ diff --git a/os/ports/GCC/ARMCMx/chcore_v7m.c b/os/ports/GCC/ARMCMx/chcore_v7m.c index e5df0d296..d199afdad 100644 --- a/os/ports/GCC/ARMCMx/chcore_v7m.c +++ b/os/ports/GCC/ARMCMx/chcore_v7m.c @@ -29,12 +29,12 @@ #if !CH_OPTIMIZE_SPEED void _port_lock(void) { - register uint32_t tmp asm ("r3") = BASEPRI_KERNEL; + register uint32_t tmp asm ("r3") = CORTEX_BASEPRI_KERNEL; asm volatile ("msr BASEPRI, %0" : : "r" (tmp)); } void _port_unlock(void) { - register uint32_t tmp asm ("r3") = BASEPRI_USER; + register uint32_t tmp asm ("r3") = CORTEX_BASEPRI_DISABLED; asm volatile ("msr BASEPRI, %0" : : "r" (tmp)); } #endif