Subject: Re: included from userland unnecessarily.
To: Simon Burge <>
From: Nathan J. Williams <nathanw@MIT.EDU>
List: tech-userlevel
Date: 10/12/2001 12:30:39
Simon Burge <> writes:

> Folks,
> A number of architectures (i386, m68k, pc532, sh3 & x86_64) include
> <machine/trap.h> from <machine/signal.h>, and of these, only the
> pc532 wraps all the trap types in an "#ifdef _KERNEL".  As far as
> I can tell, there's no requirement to include <machine/trap.h> in
> <machine/signal.h>, except that there maybe some residual fallout in
> some MD parts of the kernel.  Is there any opposition to removing that
> #include from <machine/signal.h>?

At least on the i386, <machine/trap.h> defines the signal codes that
are passed to userlevel for SIBGUS, SIGILL, SIGSEGV, SIGTRAP, and some
cases of SIGFPE.

As an issue of namespace pollution, the right thing to do would
probably be to provide the SUSv2-specified code macros (ILL_*, FPE_*,
SEGV_*, etc), wrapped in the usual XOPEN ifdefs. As in issue of
compatibility, we may want to keep the old names around, somewhere....

        - Nathan