4 #include "threadimpl.h"
6 /* first argument goes in a register and on the stack; avoid it */
8 launcheralpha(int, void (*f)(void *arg), void *arg)
15 _threadinitstack(Thread *t, void (*f)(void*), void *arg)
19 tos = (ulong*)&t->stk[t->stksize&~7];
21 *--tos = 0; /* pad arguments to 8 bytes */
24 *--tos = 0; /* first arg */
26 *--tos = 0; /* for alignment with... */
27 *--tos = 0; /* ... place to store return PC */
29 t->sched[JMPBUFPC] = (ulong)launcheralpha+JMPBUFDPC;
30 t->sched[JMPBUFSP] = (ulong)tos;