freebsd-dev/sys/i386/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 - Don't assume the line length in the video memory is always the same as 1999-02-05 11:52:13 +00:00
_limits.h Fixed style bugs in previous commit. 1999-05-22 08:36:55 +00:00
ansi.h Little reorganization: 1998-12-19 00:02:34 +00:00
apic.h Maintain a mapping from irq number to (ioapic number, int pin) tuple, 1998-09-06 22:41:42 +00:00
apicreg.h Maintain a mapping from irq number to (ioapic number, int pin) tuple, 1998-09-06 22:41:42 +00:00
apm_bios.h Add the ability to specify where on the at_shutdown queue a handler is 1998-10-30 05:41:15 +00:00
apm_segments.h Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are not 1997-02-22 09:48:43 +00:00
asc_ioctl.h Cleaned up all headers that include <sys/ioctl.h> or <sys/ioccom.h>: 1996-09-21 14:59:43 +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
asnames.h Unbreak VESA on SMP. 1999-05-12 21:39:07 +00:00
atomic.h Change various syscalls to use size_t arguments instead of u_int. 1998-08-24 08:39:39 +00:00
bootinfo.h Remove the bi_vesa field, as vesa modeswitching is no longer performed 1998-10-01 18:25:04 +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_pc98.h Improve compatibility with other systems by changing the default 1999-07-03 20:14:08 +00:00
bus_pio.h Implementation of Bus Space for FreeBSD-x86. 1998-01-15 07:32:56 +00:00
bus.h Improve compatibility with other systems by changing the default 1999-07-03 20:14:08 +00:00
cdk.h Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are not 1997-02-22 09:48:43 +00:00
clock.h Stop the TSC from being used as timecounter on K5/step0 machines. 1999-05-29 06:57:55 +00:00
comstats.h Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are not 1997-02-22 09:48:43 +00:00
cons.h Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are not 1997-02-22 09:48:43 +00:00
console.h The second phase of syscons reorganization. 1999-06-22 14:14:06 +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
cronyx.h Don't declare prototypes for driver functions unless KERNEL is defined. 1998-02-03 20:07:02 +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
dvcfg.h Changed inline' to __inline' so that this file can be compiled by 1998-02-03 20:14:35 +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
endian.h Put I*86_CPU options in opt_global.h and don't #include "opt_cpu.h" 1997-08-31 22:43:46 +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
frame.h Implement SA_SIGINFO for i386. Thanks to Bruce Evans for much more 1999-07-06 07:13:48 +00:00
globaldata.h Unifdef VM86. 1999-06-01 18:20:36 +00:00
globals.h Unifdef VM86. 1999-06-01 18:20:36 +00:00
gsc.h Cleaned up all headers that include <sys/ioctl.h> or <sys/ioccom.h>: 1996-09-21 14:59:43 +00:00
i4b_cause.h update the i4b include files to i4b release 0.71.00 1999-03-07 16:09:45 +00:00
i4b_debug.h upgrade isdn4bsd from version 0.71 to the just released version 0.81 1999-05-20 10:14:57 +00:00
i4b_ioctl.h upgrade isdn4bsd from version 0.71 to the just released version 0.81 1999-05-20 10:14:57 +00:00
i4b_tel_ioctl.h upgrade isdn4bsd from version 0.71 to the just released version 0.81 1999-05-20 10:14:57 +00:00
i4b_trace.h update the i4b include files to i4b release 0.71.00 1999-03-07 16:09:45 +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
if_wavelan_ieee.h Add device driver support for the Lucent WaveLAN/IEEE 802.11 PCMCIA 1999-05-05 07:37:11 +00:00
if_wl_wavelan.h Moved misplaced idempotency ifdef. Multiple inclusion was fatal since 1998-02-03 20:24:13 +00:00
iic.h Change /dev/smb and /dev/iic interface to allow user programs to interact with 1999-01-09 18:08:24 +00:00
in_cksum.h Fix all areas of the system (or at least all those in LINT) to avoid storing 1997-08-16 19:16:27 +00:00
ioctl_bt848.h Bt848 driver release 1.65 1999-05-18 12:14:39 +00:00
ioctl_ctx.h Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are not 1997-02-22 09:48:43 +00:00
ioctl_fd.h Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are not 1997-02-22 09:48:43 +00:00
ioctl_meteor.h Cleaned up all headers that include <sys/ioctl.h> or <sys/ioccom.h>: 1996-09-21 14:59:43 +00:00
ipl.h Removed a bogus ifdef that broke using SWI_* in LKMs. 1998-08-11 19:21:17 +00:00
joystick.h Cleaned up all headers that include <sys/ioctl.h> or <sys/ioccom.h>: 1996-09-21 14:59:43 +00:00
limits.h Fixed style bugs in previous commit. 1999-05-22 08:36:55 +00:00
lock.h Remove stuff related to microtime.s, which is gone. 1998-04-06 11:38:18 +00:00
lpt.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
mouse.h 1) Added define for USB as an interface 1999-02-21 16:08:43 +00:00
mpapic.h Use <machine/*.h> instead of <i386/include/*.h>. 1998-02-01 22:23:18 +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
mtpr.h Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are not 1997-02-22 09:48:43 +00:00
npx.h Enable vmspace sharing on SMP. Major changes are, 1999-04-28 01:04:33 +00:00
param.h Don't define MACHINE, MACHINE_ARCH, _MACHINE or _MACHINE_ARCH if 1999-03-01 06:10:16 +00:00
pcaudioio.h Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are not 1997-02-22 09:48:43 +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
pcb.h Unifdef VM86. 1999-06-01 18:20:36 +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
pcvt_ioctl.h Adopt syscons's recent change from key_t to keyent_t (this part of 1999-03-04 10:50:36 +00:00
perfmon.h Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are not 1997-02-22 09:48:43 +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
random.h Converted add_interrupt_randomness() to take a `void *' arg. Rewrote 1998-06-21 11:33:32 +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
si.h Add a macro tweak. 1998-06-13 19:36:22 +00:00
signal.h VM86 kernel support. 1997-08-09 00:04:06 +00:00
smb.h Change /dev/smb and /dev/iic interface to allow user programs to interact with 1999-01-09 18:08:24 +00:00
smp.h Enable vmspace sharing on SMP. Major changes are, 1999-04-28 01:04:33 +00:00
smptests.h Remove stuff related to microtime.s, which is gone. 1998-04-06 11:38:18 +00:00
soundcard.h o sys/i386/include/soundcard.h 1999-04-08 08:09:34 +00:00
speaker.h Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are not 1997-02-22 09:48:43 +00:00
specialreg.h Add defines for the P6 model-specific registers. 1999-04-07 03:58:15 +00:00
spigot.h Cleaned up all headers that include <sys/ioctl.h> or <sys/ioccom.h>: 1996-09-21 14:59:43 +00:00
stdarg.h Don't attempt to generate errors for unpromoted types in va_arg(), 1997-06-21 15:45:13 +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
types.h Stage 1 of a cleanup of the i386 interrupt registration mechanism. 1999-04-21 07:26:30 +00:00
ultrasound.h Part 3 of the pcvt/voxware revival. 1999-01-01 08:23:23 +00:00
varargs.h Fixed va_arg() to work for small args (as in stdarg.h). 1997-06-21 16:20:55 +00:00
vm86.h Unifdef VM86. 1999-06-01 18:20:36 +00:00
vmparam.h Increased MAXTSIZ to 128MB...there are binaries that get quite large. 1998-06-12 09:10:22 +00:00
wtio.h Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are not 1997-02-22 09:48:43 +00:00