diff --git a/Port/Cortex-M/port_cmx.c b/Port/Cortex-M/port_cmx.c index 1622e1e8..f2f9fb2e 100644 --- a/Port/Cortex-M/port_cmx.c +++ b/Port/Cortex-M/port_cmx.c @@ -3,8 +3,8 @@ * @file port_cmx.c * @brief CMSIS Cortex-M Core Port File * @author 迟凯峰 - * @version V2.2.0 - * @date 2026.01.13 + * @version V2.2.2 + * @date 2026.01.19 ******************************************************************************/ #include "os_var.h" @@ -29,7 +29,6 @@ if(m_sign_fifo == true) {中断FIFO服务装载器 入FIFO0,中断FIFO服务 if(m_sign_fifo == false){中断FIFO服务装载器 入FIFO1,中断FIFO服务处理器 出FIFO0} */ #if (MCUCFG_PENDSVFIFO_MUTEX == 2) /*!< 互斥访问机制 */ void *mPendSV_FIFO_X; /*!< FIFO神秘替身 */ -volatile bool m_sign_load = false; /*!< 互斥访问标志 */ #endif /* 中断FIFO服务处理器 */ @@ -59,7 +58,14 @@ void mPendSV_FIFOHandler(void) } do{ sv = *++p; + #if (MCUCFG_PENDSVFIFO_MUTEX != 2) (*sPendSV_FIFOHandler[*(const s_u8_t *)sv])(sv); + #else + if(sv != OS_NULL){ + *p = OS_NULL; + (*sPendSV_FIFOHandler[*(const s_u8_t *)sv])(sv); + } + #endif }while(--i); } @@ -84,7 +90,14 @@ void mPendSV_FIFOHandler(void) } do{ sv = *++p; + #if (MCUCFG_PENDSVFIFO_MUTEX != 2) (*sPendSV_FIFOHandler[*(const s_u8_t *)sv])(sv); + #else + if(sv != OS_NULL){ + *p = OS_NULL; + (*sPendSV_FIFOHandler[*(const s_u8_t *)sv])(sv); + } + #endif }while(--i); }