rtthread.py 437 B

12345678910111213141516
  1. #
  2. # Copyright (c) 2006-2019, RT-Thread Development Team
  3. #
  4. # SPDX-License-Identifier: MIT License
  5. #
  6. # Change Logs:
  7. # Date Author Notes
  8. # 2019-06-13 SummerGift first version
  9. #
  10. import rtthread
  11. # determine if code is running in a preemptible thread
  12. print(rtthread.is_preempt_thread())
  13. print(rtthread.current_tid()) # current thread id
  14. rtthread.stacks_analyze() # show thread information