Closed HelloByeAll closed 2 years ago
Thanks for the feedback. Yes, with RTOS in ISR if mutex_get is invoked there is potential issue.
The improve for HCD or DCD implement is, to move current interrupt callback handlings to a thread, then inside thread you can freely using RTOS features.
了解
stm32H7做 host 接了一个鼠标通过栈回溯了一次中断事件
_txe_mutex_get中:
可以看到在中断中触发了一次
ux_utility_memory_allocate
,这个mutex
由于是在中断中, 所以必然会返回TX_CALLER_ERROR
,而调用处并没有对于_ux_utility_mutex_on
的结果有任何判断,结尾处的_ux_utility_mutex_off
同样如此,这个做法对于内存而言是否有安全隐患?