1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-16 10:20:30 +00:00
freebsd/sys/i386
Martin Cracauer aff66c5455 Implement SA_SIGINFO for i386. Thanks to Bruce Evans for much more
than a review, this was a nice puzzle.

This is supposed to be binary and source compatible with older
applications that access the old FreeBSD-style three arguments to a
signal handler.

Except those applications that access hidden signal handler arguments
bejond the documented third one. If you have applications that do,
please let me know so that we take the opportunity to provide the
functionality they need in a documented manner.

Also except application that use 'struct sigframe' directly. You need
to recompile gdb and doscmd. `make world` is recommended.

Example program that demonstrates how SA_SIGINFO and old-style FreeBSD
handlers (with their three args) may be used in the same process is at
http://www3.cons.org/tmp/fbsd-siginfo.c

Programs that use the old FreeBSD-style three arguments are easy to
change to SA_SIGINFO (although they don't need to, since the old style
will still work):

  Old args to signal handler:
    void handler_sn(int sig, int code, struct sigcontext *scp)

  New args:
    void handler_si(int sig, siginfo_t *si, void *third)
  where:
    old:code == new:second->si_code
    old:scp == &(new:si->si_scp)     /* Passed by value! */

The latter is also pointed to by new:third, but accessing via
si->si_scp is preferred because it is type-save.

FreeBSD implementation notes:
- This is just the framework to make the interface POSIX compatible.
  For now, no additional functionality is provided. This is supposed
  to happen now, starting with floating point values.
- We don't use 'sigcontext_t.si_value' for now (POSIX meant it for
  realtime-related values).
- Documentation will be updated when new functionality is added and
  the exact arguments passed are determined. The comments in
  sys/signal.h are meant to be useful.

Reviewed by:	BDE
1999-07-06 07:13:48 +00:00
..
apm Remove cmaj and bmaj args from DEV_DRIVER_MODULE. 1999-07-04 14:58:56 +00:00
bios Remove cmaj and bmaj args from DEV_DRIVER_MODULE. 1999-07-04 14:58:56 +00:00
boot Back the last change out. 1999-05-25 10:30:52 +00:00
conf The IDA driver is 'ida', not 'id' 1999-07-05 09:09:09 +00:00
eisa Handle suspend/resume methods 1999-06-22 09:44:00 +00:00
i386 Implement SA_SIGINFO for i386. Thanks to Bruce Evans for much more 1999-07-06 07:13:48 +00:00
ibcs2 Rename struct members sa_siginfo. POSIX reserves identifiers starting 1999-07-06 06:55:29 +00:00
include Implement SA_SIGINFO for i386. Thanks to Bruce Evans for much more 1999-07-06 07:13:48 +00:00
isa Patch the WaveLAN/IEEE driver to detect and reject oversized received 1999-07-04 14:40:22 +00:00
linux Rename struct members sa_siginfo. POSIX reserves identifiers starting 1999-07-06 06:55:29 +00:00
pci Move pcibus (host -> pci bus) probe/attach routines from nexus 1999-05-18 20:48:43 +00:00
svr4 Back out last commit (did I get all of them?) 1999-06-02 15:35:46 +00:00
Makefile