aboutsummaryrefslogtreecommitdiff
path: root/src/libthread/Darwin-power.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libthread/Darwin-power.c')
-rw-r--r--src/libthread/Darwin-power.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/libthread/Darwin-power.c b/src/libthread/Darwin-power.c
index 373cc623..e625626c 100644
--- a/src/libthread/Darwin-power.c
+++ b/src/libthread/Darwin-power.c
@@ -8,23 +8,24 @@ makecontext(ucontext_t *ucp, void (*func)(void), int argc, ...)
tos = (ulong*)ucp->uc_stack.ss_sp+ucp->uc_stack.ss_size/sizeof(ulong);
sp = tos - 16;
- ucp->label.pc = (long)func;
- ucp->label.sp = (long)sp;
+ ucp->mc.pc = (long)func;
+ ucp->mc.sp = (long)sp;
va_start(arg, argc);
- ucp->label.r3 = va_arg(arg, long);
+ ucp->mc.r3 = va_arg(arg, long);
va_end(arg);
}
-void
+int
getcontext(ucontext_t *uc)
{
- return __setlabel(uc);
+ return _getmcontext(&uc->mc);
}
int
setcontext(ucontext_t *uc)
{
- return __gotolabel(uc);
+ _setmcontext(&uc->mc);
+ return 0;
}
int