Subject: Re: trapsignal() or p_emul->e_trapsignal() ?
To: None <>
From: Christos Zoulas <>
List: tech-kern
Date: 01/03/2004 20:28:34
In article <>,
Martin Husemann <> wrote:
>What's the official rule about trapsignal(9)?
>For i386 this change replaced it with calls to 
>   (*p->p_emul->e_trapsignal)(l, &ksi);
>revision 1.161
>date: 2001/06/18 02:00:49;  author: christos;  state: Exp;  lines: +10 -10
>branches:  1.161.2;
>Add an e_trapsignal member to struct emul, so that emulated processes can
>send the appropriate signal depending on the trap type.
>but other archs still just call trapsignal().
>Is this an oversight that should be fixed, or does it have some non obvious

Well, the trapsignal emulation override function is used for some
emulations to change the signal information passed to the userland
programs. On some architectures that have no emulations, this just
slows down things by making the procedure call indirect. I would
say though that since this is not a very frequently used code path,
using p->p_emul->e_trapsignal is better for consistency reasons.