Blob
1 #include "threadimpl.h"3 static void4 launcherpower(int a0, int a1, int a2, int a3, int a4, int a5, int a6, int a7,5 void (*f)(void *arg), void *arg)6 {7 (*f)(arg);8 threadexits(nil);9 }11 void12 _threadinitstack(Thread *t, void (*f)(void*), void *arg)13 {14 ulong *tos, *stk;16 tos = (ulong*)&t->stk[t->stksize&~7];17 stk = tos;18 --stk;19 --stk;20 --stk;21 --stk;22 *--stk = (ulong)arg;23 *--stk = (ulong)f;24 t->sched.pc = (ulong)launcherpower+LABELDPC;25 t->sched.sp = ((ulong)stk)-8;26 *((ulong *)t->sched.sp) = 0;27 }29 void30 _threadinswitch(int enter)31 {32 USED(enter);33 }35 void36 _threadstacklimit(void *addr, void *addr2)37 {38 USED(addr);39 }