aboutsummaryrefslogtreecommitdiff
path: root/src/libthread/PowerMacintosh.c
blob: 21f6041d9ab7fb2c911a5a0fa21df98292a29255 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#include "threadimpl.h"

static void
launcherpower(int a0, int a1, int a2, int a3, int a4, int a5, int a6, int a7,
	void (*f)(void *arg), void *arg)
{
	(*f)(arg);
	threadexits(nil);
}

void
_threadinitstack(Thread *t, void (*f)(void*), void *arg)
{
	ulong *tos, *stk;

	tos = (ulong*)&t->stk[t->stksize&~7];
	stk = tos;
	--stk;
	--stk;
	--stk;
	--stk;
	*--stk = (ulong)arg;
	*--stk = (ulong)f;
	t->sched.pc = (ulong)launcherpower+LABELDPC;
	t->sched.sp = (ulong)tos-80;
}

void
_threadinswitch(int enter)
{
	USED(enter);
}

void
_threadstacklimit(void *addr)
{
	USED(addr);
}