diff options
| author | rsc <devnull@localhost> | 2005-01-11 17:43:53 +0000 |
|---|---|---|
| committer | rsc <devnull@localhost> | 2005-01-11 17:43:53 +0000 |
| commit | b8f742db850ffc99333a97ab54fc820c6de0fd98 (patch) | |
| tree | 9096b9872c0e65a3f1f3cdd7b993c58411d20e5e /src/libthread/Darwin-power.c | |
| parent | 530d00164177fd68e2aeb403e7b9be31823e3168 (diff) | |
| download | plan9port-b8f742db850ffc99333a97ab54fc820c6de0fd98.tar.gz plan9port-b8f742db850ffc99333a97ab54fc820c6de0fd98.zip | |
os x changes
Diffstat (limited to 'src/libthread/Darwin-power.c')
| -rw-r--r-- | src/libthread/Darwin-power.c | 13 |
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 |
