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 767 forks source link

on riscv32, Does flow situation use right? #368

Open jmx-wqz opened 4 months ago

jmx-wqz commented 4 months ago

Describe the bug A clear and concise description of what the bug is. i creast 2 thread, thread1's priority is 2 and thread2's priority is 4, thread1 call tx_thread_queue_receive() and thread2 write swint reg,and handler of swint will call context_store and interrupt process which is call tx_thread_send_message() which will resume thread1 but thread1 will not resume because tx_thread_system_state is not zero, and context_restore, in context_restore will identify there is preempt (thread1 is ready and execute_thread_ptr is thread1, current_thread_ptr is thread2) and will call thread_schedule which will switch thread to thead1,thread1's stack_type is 0(task type) and will sync_return but interrupt not return ,in this situation can't exit from interrupt is error

Please also mention any information which could help others to understand the problem you're facing:

To Reproduce Steps to reproduce the behavior:

  1. Build my project in IAR Workbench.
  2. See error

Expected behavior A clear and concise description of what you expected to happen.

Impact What impact does this issue have on your progress (e.g., annoyance, showstopper)

Logs and console output If applicable, add console logs or other types of debug information like Wireshark capture as .zip file.

Additional context Add any other context about the problem here.