diff options
-rw-r--r-- | src/libthread/Linux-arm-asm.s | 10 | ||||
-rw-r--r-- | src/libthread/Linux.c | 13 |
2 files changed, 6 insertions, 17 deletions
diff --git a/src/libthread/Linux-arm-asm.s b/src/libthread/Linux-arm-asm.s index 5a285bf2..8515e4de 100644 --- a/src/libthread/Linux-arm-asm.s +++ b/src/libthread/Linux-arm-asm.s @@ -9,8 +9,9 @@ _tas: mov r0, r3 mov pc, lr -.globl getmcontext -getmcontext: +.globl getcontext +getcontext: + add r0, r0, #148 /* walk to mcontext */ str r1, [r0,#4] str r2, [r0,#8] str r3, [r0,#12] @@ -32,8 +33,9 @@ getmcontext: mov r0, #0 mov pc, lr -.globl setmcontext -setmcontext: +.globl setcontext +setcontext: + add r0, r0, #148 /* walk to mcontext */ ldr r1, [r0,#4] ldr r2, [r0,#8] ldr r3, [r0,#12] diff --git a/src/libthread/Linux.c b/src/libthread/Linux.c index 73cb28e0..5f7f862e 100644 --- a/src/libthread/Linux.c +++ b/src/libthread/Linux.c @@ -456,19 +456,6 @@ makecontext(ucontext_t *uc, void (*fn)(void), int argc, ...) } int -getcontext(ucontext_t *uc) -{ - return getmcontext(&uc->uc_mcontext); -} - -int -setcontext(const ucontext_t *uc) -{ - setmcontext(&uc->uc_mcontext); - return 0; /* not reached */ -} - -int swapcontext(ucontext_t *oucp, const ucontext_t *ucp) { if(getcontext(oucp) == 0) |