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.8k stars 768 forks source link

A question about the interrupt processing in _tx_byte_pool_search function #297

Closed Liuyux closed 10 months ago

Liuyux commented 10 months ago

Hi Sccot, We team met a problem when using tx_byte_allocate. There has two same priority threads that need using tx_byte_allocate,but we found CPU can toggle between the two threads when they both call tx_byte_allocate, resulting in they can‘t jump out of the loop in _tx_byte_pool_search. We found interrupt restored in line 258 of tx_byte_pool_search.c and disabled immediately in line 261,here may be the point that causes two threads interlock. Could you explain me for what reason enable the interrupt here. Thank you so much.