Commit Diff


commit - 9aa463c541d03ce5389e7015b9a19358a5796e63
commit + 2494fc9fa05582e6b9e8d96b90899ef6a5e55adb
blob - 5a285bf20bcf53bbcbaee9f7a018e54f5be76dc4
blob + 8515e4ded973b16d16e9304f4ef699ea3b539ccb
--- src/libthread/Linux-arm-asm.s
+++ 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]
blob - 73cb28e0731f12afcc9a082a5d008fffc5684f41
blob + 5f7f862e45bcac59a2ac33c73aa428f6adff4384
--- src/libthread/Linux.c
+++ src/libthread/Linux.c
@@ -453,22 +453,9 @@ makecontext(ucontext_t *uc, void (*fn)(void), int argc
 	va_end(arg);
 	uc->uc_mcontext.gregs[13] = (uint)sp;
 	uc->uc_mcontext.gregs[14] = (uint)fn;
-}
-
-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)