File tree Expand file tree Collapse file tree 1 file changed +1
-12
lines changed
Expand file tree Collapse file tree 1 file changed +1
-12
lines changed Original file line number Diff line number Diff line change 1010#### rtthread.is_preempt_thread()
1111返回是否是可抢占线程。
1212
13- #### rtthread.stacks_analyze()
14- 返回当前系统线程和栈使用信息。
15-
1613### 示例
1714
1815```
1916>>> import rtthread
2017>>>
21- >>> rtthread.is_preempt_thread() # determine if code is running in a preemptible thread
18+ >>> rtthread.is_preempt_thread() # determine if it's a preemptible thread
2219True
2320>>> rtthread.current_tid() # current thread id
2421268464956
25- >>> rtthread.stacks_analyze() # show thread information
26- thread pri status sp stack size max used left tick error
27- ---------- --- ------- ---------- ---------- ------ ---------- ---
28- elog_async 31 suspend 0x000000a8 0x00000400 26% 0x00000003 000
29- tshell 20 ready 0x00000260 0x00001000 39% 0x00000003 000
30- tidle 31 ready 0x00000070 0x00000100 51% 0x0000000f 000
31- SysMonitor 30 suspend 0x000000a4 0x00000200 32% 0x00000005 000
32- timer 4 suspend 0x00000080 0x00000200 25% 0x00000009 000
3322>>>
3423```
You can’t perform that action at this time.
0 commit comments