freebsd-src/sys/amd64/include
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
..
pc Nuke the nonexistend pad bytes from the end of the DMI header structure. 1997-08-04 03:31:23 +00:00
apicreg.h Maintain a mapping from irq number to (ioapic number, int pin) tuple, 1998-09-06 22:41:42 +00:00
asm.h Fixed longstanding profiling bug. The frame pointer wasn't set up 1997-04-23 19:26:04 +00:00
asmacros.h Fixed profiling of elf kernels. Made high resolution profiling compile 1999-05-06 09:44:57 +00:00
atomic.h Change various syscalls to use size_t arguments instead of u_int. 1998-08-24 08:39:39 +00:00
bus.h Improve compatibility with other systems by changing the default 1999-07-03 20:14:08 +00:00
bus_amd64.h Improve compatibility with other systems by changing the default 1999-07-03 20:14:08 +00:00
bus_at386.h Improve compatibility with other systems by changing the default 1999-07-03 20:14:08 +00:00
bus_dma.h Improve compatibility with other systems by changing the default 1999-07-03 20:14:08 +00:00
bus_memio.h Implementation of Bus Space for FreeBSD-x86. 1998-01-15 07:32:56 +00:00
bus_pio.h Implementation of Bus Space for FreeBSD-x86. 1998-01-15 07:32:56 +00:00
clock.h Stop the TSC from being used as timecounter on K5/step0 machines. 1999-05-29 06:57:55 +00:00
cpu.h Moved cpu_set_fork_handler's prototype from <machine/cpu.h> to <sys/proc.h>. 1999-04-23 20:22:44 +00:00
cpufunc.h loadandclear() uses an atomic instruction (even on SMP, where it's an 1999-05-09 23:30:01 +00:00
cputypes.h Recognize Pentium II Xeon, Celeron and Pentium III cpus. Because CPU 1999-02-04 16:48:26 +00:00
db_machdep.h Backed out rev.1.5. if %cs is bad, %eip may be bad, but this is no longer 1997-03-28 12:46:52 +00:00
elf.h On the i386, load the ELF dynamic linker where an mmap(0, ...) would 1999-02-19 01:30:43 +00:00
exec.h Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are not 1997-02-22 09:48:43 +00:00
float.h Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are not 1997-02-22 09:48:43 +00:00
floatingpoint.h Cast return values to the appropriate fp_*_t. Note that the man page 1998-04-27 14:17:30 +00:00
fpu.h Enable vmspace sharing on SMP. Major changes are, 1999-04-28 01:04:33 +00:00
frame.h Implement SA_SIGINFO for i386. Thanks to Bruce Evans for much more 1999-07-06 07:13:48 +00:00
ieeefp.h Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are not 1997-02-22 09:48:43 +00:00
md_var.h Enable vmspace sharing on SMP. Major changes are, 1999-04-28 01:04:33 +00:00
mptable.h Changes in the way that the APs are started appears to have removed the 1999-06-23 23:02:38 +00:00
npx.h Enable vmspace sharing on SMP. Major changes are, 1999-04-28 01:04:33 +00:00
pcb.h Unifdef VM86. 1999-06-01 18:20:36 +00:00
pcb_ext.h A couple of missing doscmd header files. Messed up again. Now can 1997-08-09 04:55:05 +00:00
pci_cfgreg.h Completely replace the PCI bus driver code to make it better reflect 1997-05-26 15:08:43 +00:00
pcpu.h Unifdef VM86. 1999-06-01 18:20:36 +00:00
pmap.h Do not setup 4M pdir until all APs are up. 1999-06-23 21:47:24 +00:00
proc.h Enable vmspace sharing on SMP. Major changes are, 1999-04-28 01:04:33 +00:00
profile.h Make profiling work for ELF. gprof now autodetects the format of 1998-09-07 23:32:00 +00:00
psl.h Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are not 1997-02-22 09:48:43 +00:00
ptrace.h Disallow reading the current kernel stack. Only the user structure and 1998-05-19 00:00:14 +00:00
reg.h Enable vmspace sharing on SMP. Major changes are, 1999-04-28 01:04:33 +00:00
reloc.h Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are not 1997-02-22 09:48:43 +00:00
resource.h A small fragment of new ISA framework: manifest constants for the resources 1998-10-29 01:56:23 +00:00
segments.h Changed the global `idt' from an array to a pointer so that npx.c 1999-06-18 14:32:21 +00:00
setjmp.h Suggested by: bde 1998-01-20 09:09:24 +00:00
signal.h VM86 kernel support. 1997-08-09 00:04:06 +00:00
smp.h Enable vmspace sharing on SMP. Major changes are, 1999-04-28 01:04:33 +00:00
specialreg.h Add defines for the P6 model-specific registers. 1999-04-07 03:58:15 +00:00
sysarch.h u_int --> unsigned int, remove (now unneeded) <sys/types.h> 1998-07-28 15:22:51 +00:00
trap.h Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are not 1997-02-22 09:48:43 +00:00
tss.h Enable vmspace sharing on SMP. Major changes are, 1999-04-28 01:04:33 +00:00
varargs.h Fixed va_arg() to work for small args (as in stdarg.h). 1997-06-21 16:20:55 +00:00
vmparam.h Increased MAXTSIZ to 128MB...there are binaries that get quite large. 1998-06-12 09:10:22 +00:00