[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [MiNT] proposed change in signal handling
On 10/15/11 13:52, Peter Persson wrote:
> Hi,
>
> I propose the following changes:
>
> MiNTLib (sigaction)
> - add member sa_action to sa_sigaction
> - add flag SA_SIGACTION
>
> This afaik doesn't really affect kernel<>library interaction at all,
> but rather just allows an alternative set of
> parameters for the signal hander.
>
> Kernel
> - add members to struct sigcontext:
>
> ulong sc_regs[15];
> ulong sc_fregs[8*3];
> ulong sc_fctrl[3];
> ushort sc_mask;
>
> - save/restore register context + sc_mask (which is actually
> sigact->sa_mask) in sig_mach.c
> Signal handler
>
> Normally, this is void handler(int sig).
>
> If SA_SIGACTION is enabled, it should be something like void
> handler(int sig, int info, sigcontect* sc).
>
> Why?
>
> It's a nice feature in other unixoids, and allows nifty things like
> threads and other stuff to be implemented
> in user mode applications. It also allows application-specific debug
> output with register contents etc. when things go
> bump.
>
I don't see any mention of SA_SIGACTION and sa_action on my Linux box.
Can't we follow some natural convention here, as you mention other
unixoids, which ones ?
Thanks,
Alan.