File tree Expand file tree Collapse file tree 2 files changed +5
-6
lines changed Expand file tree Collapse file tree 2 files changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -285,7 +285,6 @@ asyncPreempt 是汇编实现的,分为三个部分:
2852852 . 执行 asyncPreempt2
2862863 . 恢复 g 的所有寄存器,继续执行用户代码
287287
288-
289288```
290289┌────────────────┐ ┌────────────────┐
291290│ stack change │ │ code │
@@ -300,13 +299,13 @@ asyncPreempt 是汇编实现的,分为三个部分:
300299│ ├──────────────┴───────────┐ │ │ └────────────────────────┴────────────────────────┘ │
301300│ │ local var 1 │ │ │ │
302301│ ├──────────────────────────┤ │ │ ┌──────────────────────────┐ │
303- │ │ local var 2 │ │ │ │ │ │ │
302+ │ │ local var 2 │ │ │ │ │ signal handler │ │
304303│ ├──────────────────────────┤ │ │ │ │ │ │
305- │ ┌─────┐ │ ... │ │ │ │ │ signal handler │ │
304+ │ ┌─────┐ │ ... │ │ │ │ │ push 0x21350 to stk top │ │
306305│ │ RSP │ ─────────────▶ └──────────────────────────┘ │ │ │ │ │ │
307- │ └─────┘ │ │ │ │ push 0x21350 to stk top │ │
308- │ │ │ │ │ │ │
306+ │ └─────┘ │ │ │ │ set pc to asyncPreempt │ │
309307│ │ │ │ │ │ │
308+ │ │ │ │ │ return │ │
310309│ │ │ │ └──────────────────────────┘ │
311310│ │ │ ▼ │
312311│ ┌──────────────┐ │ │ │
@@ -344,7 +343,7 @@ asyncPreempt 是汇编实现的,分为三个部分:
344343│ │ RSP │ ─────────────▶ └──────────────────────────┘ │ │ │ │
345344│ └─────┘ │ │ ▼ │
346345│ │ │ ┌───────────────────────┐ │
347- │ │ │ │ asyncPreempt() │ │
346+ │ │ │ │ asyncPreempt2() │ │
348347│ │ │ └───────────────────────┘ │
349348│ │ │ │
350349│ ┌──────────────┐ │ │ │ │
You can’t perform that action at this time.
0 commit comments