plan9port

fork of plan9port with libvec, libstr and libsdb
Log | Files | Refs | README | LICENSE

commit 2494fc9fa05582e6b9e8d96b90899ef6a5e55adb
parent 9aa463c541d03ce5389e7015b9a19358a5796e63
Author: rsc <devnull@localhost>
Date:   Thu,  3 Nov 2005 00:48:14 +0000

arm

Diffstat:
Msrc/libthread/Linux-arm-asm.s | 10++++++----
Msrc/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 @@ -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 @@ -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)