eclipse-threadx / threadx

Eclipse ThreadX is an advanced real-time operating system (RTOS) designed specifically for deeply embedded applications.
https://github.com/eclipse-threadx/rtos-docs/blob/main/rtos-docs/threadx/index.md
MIT License
2.92k stars 797 forks source link

_tx_event_flags_set preempt_check question #175

Closed arm7star closed 2 years ago

arm7star commented 2 years ago

when TX_NOT_INTERRUPTABLE is not defined. _tx_event_flags_set just disables preempt and preempt_check only is set to TX_TRUE when flags_satisfied is not zero, but the ISR may resume some higher thread. If ISR resume higher threead, does _tx_thread_system_preempt_check need to be called?

goldscott commented 2 years ago

Good find. We are looking into this.

goldscott commented 2 years ago

Hi @arm7star - we have confirmed this is a bug and we have fixed it. The updated code will be available in our next release. Thank you! I'll keep this ticket open and close it once the release is made.

arm7star commented 2 years ago

OK. Thank you!

goldscott commented 2 years ago

@arm7star This was fixed in 6.1.11: https://github.com/azure-rtos/threadx/blob/master/common/src/tx_event_flags_set.c