📄 386.c
字号:
#include <u.h>#include <libc.h>#include <thread.h>#include "threadimpl.h"static voidlauncher386(void (*f)(void *arg), void *arg){ (*f)(arg); threadexits(nil);}void_threadinitstack(Thread *t, void (*f)(void*), void *arg){ ulong *tos; tos = (ulong*)&t->stk[t->stksize&~7]; *--tos = (ulong)arg; *--tos = (ulong)f; t->sched[JMPBUFPC] = (ulong)launcher386+JMPBUFDPC; t->sched[JMPBUFSP] = (ulong)tos - 8; /* old PC and new PC */}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -