minix/lib/libc/arch/arm/sys-minix/__sigreturn.S
Ben Gras e3e5cf6d34 arm: make signal handlers work
A few kernel and calling convention adjustments to make sigsend and
sigreturn work for arm.

	. provide a arch_proc_setcontext for earm in kernel
	. set LR in context of signal handler to provide a proper
	  return address (to __sigreturn)
	. change __sigreturn to retrieve the sigcontext pointer
	  from the sigframe struct and pass it to _sigreturn() in r0

Change-Id: Icd135a70595382c79d11d8dd9876f6a6f1df41f8
2013-01-30 04:10:12 +00:00

11 lines
433 B
ArmAsm

/* This routine is the low-level code for returning from signals. */
/* It calls _sigreturn, which is the normal "system call" routine. */
/* Both __sigreturn and _sigreturn are needed. */
#include <machine/asm.h>
IMPORT(_sigreturn)
ENTRY(__sigreturn)
add sp, sp, #24 /* make sp point to sigframe.sf_scpcopy */
pop {r0} /* load it into r0 as parameter */
b _C_LABEL(_sigreturn) /* _sigreturn(struct sigcontext *sf_scpcopy) */