rtthread.py 451 B

123456789101112131415
  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. print(rtthread.is_preempt_thread()) # determine if code is running in a preemptible thread
  12. print(rtthread.current_tid() ) # current thread id
  13. rtthread.stacks_analyze() # show thread information