Subject: Re: SA_SIGINFO for mips
To: Christopher SEKIYA <wileyc@rezrov.net>
From: Matt Thomas <matt@3am-software.com>
List: port-mips
Date: 10/12/2003 13:35:27
At 01:33 PM 10/12/2003, Matt Thomas wrote:
>At 10:03 PM 10/11/2003, Christopher SEKIYA wrote:
>>+LEAF_NOPROFILE(__sigtramp_siginfo_2)
>>+       move    a0, sp
>>+       addu    a0, 128                 /* get pointer to ucontext */
>
>Why not set a0 to sp+128 in the sendsig() routine in the kernel?  Then
>you can remove those two instructions.

Never mind.  However, you can set a caller-saved register to the point
to the ucontext.  It'll be overwritten anyway by the setcontext.  That
way you are protected if the SP gets screwed up.

>>+       SYSTRAP(setcontext)             /* and call setcontext() with it */
>>+       move    a0, v0                  /* if that failed, get error code */
>>+       SYSTRAP(exit)                   /* and call exit() with it */
>
>--
>Matt Thomas                     email: matt@3am-software.com
>3am Software Foundry              www: http://3am-software.com/bio/matt/
>Cupertino, CA              disclaimer: I avow all knowledge of this message.
>

-- 
Matt Thomas                     email: matt@3am-software.com
3am Software Foundry              www: http://3am-software.com/bio/matt/
Cupertino, CA              disclaimer: I avow all knowledge of this message.