smp: proper cleanup on (non-main) thread exit

This commit is contained in:
2021-11-11 15:44:59 +08:00
parent 240e01d69c
commit 20bc9f4a64
3 changed files with 42 additions and 3 deletions

View File

@ -39,10 +39,11 @@ static inline int minmax(int val, int min, int max) {
static SYSV_ABI void kThreader(int a, int b, int c, int d, int e, int f) {
io_Printf("kThreader: args[%d,%d,%d,%d,%d,%d]\n", a, b, c, d, e, f);
for (;;) {
smp_thread_Sleep(768);
for (int i = 0; i < 10; i++) {
io_Printf("kThreader: Not sleeping!\n");
smp_thread_Sleep(768);
}
io_Printf("kThreader: byebye!\n");
}