freebsd-nq/sys/kern
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
..
bus_if.m * Change device_add_child_after() to device_add_child_ordered() which is 1999-05-28 09:25:16 +00:00
device_if.m Update the comments on values than can be returned by DEVICE_PROBE. 1999-06-17 19:22:12 +00:00
imgact_aout.c
imgact_elf.c Also try to load the interpreter without prepending "emul_path". This allows 1999-07-05 18:38:29 +00:00
imgact_gzip.c Correctly return ENOEXEC for really short zipped files. The way this is 1999-06-21 16:23:13 +00:00
imgact_shell.c
inflate.c
init_main.c Slight reorganization of kernel thread/process creation. Instead of using 1999-07-01 13:21:46 +00:00
init_sysent.c
kern_acct.c
kern_clock.c
kern_conf.c Remove cmaj and bmaj args from DEV_DRIVER_MODULE. 1999-07-04 14:58:56 +00:00
kern_descrip.c From the submitter: 1999-06-07 20:37:29 +00:00
kern_environment.c
kern_exec.c
kern_exit.c From the submitter: 1999-06-07 20:37:29 +00:00
kern_fork.c Stop rfork(0) from panicing. (oops!!) 1999-07-03 20:58:44 +00:00
kern_intr.c
kern_jail.c
kern_kthread.c Slight reorganization of kernel thread/process creation. Instead of using 1999-07-01 13:21:46 +00:00
kern_ktrace.c Make sure syscall arguments properly aligned in ktrace records. 1999-06-16 18:37:01 +00:00
kern_linker.c Slight reorganization of kernel thread/process creation. Instead of using 1999-07-01 13:21:46 +00:00
kern_lock.c When requesting an exclusive lock with LK_NOWAIT, do not panic 1999-06-28 07:54:58 +00:00
kern_lockf.c Fixed corruption of the "blocked" list in lf_setlock() when tsleep() 1999-07-04 14:43:01 +00:00
kern_malloc.c Move the initialisation/tuning of nmbclusters from param.c/machdep.c 1999-07-05 08:52:54 +00:00
kern_mib.c
kern_module.c
kern_ntptime.c
kern_physio.c Convert buffer locking from using the B_BUSY and B_WANTED flags to using 1999-06-26 02:47:16 +00:00
kern_proc.c
kern_prot.c
kern_random.c
kern_resource.c
kern_shutdown.c Fix a warning - the code is correct but gcc can't tell. 1999-07-01 22:54:55 +00:00
kern_sig.c Implement SA_SIGINFO for i386. Thanks to Bruce Evans for much more 1999-07-06 07:13:48 +00:00
kern_subr.c
kern_synch.c
kern_syscalls.c Call the chained module handler before unregistering the syscall so that 1999-06-27 09:38:44 +00:00
kern_sysctl.c Minor tweaks to make sure (new) prerequisites for <sys/buf.h> (mostly 1999-06-27 11:44:22 +00:00
kern_tc.c
kern_threads.c
kern_time.c Minor tweaks to make sure (new) prerequisites for <sys/buf.h> (mostly 1999-06-27 11:44:22 +00:00
kern_timeout.c
kern_xxx.c
ksched.c
link_aout.c
link_elf_obj.c
link_elf.c
Make.tags.inc
makedevops.pl
Makefile
makesyscalls.sh
md5c.c
p1003_1b.c
posix4_mib.c
subr_autoconf.c
subr_blist.c Add Id strings 1999-06-17 23:42:45 +00:00
subr_bus.c * Add a function devclass_create() which looks up the named devclass and 1999-05-30 10:27:11 +00:00
subr_clist.c Quiet warnings on an Alpha. CBSIZE has long type and causes the other 1999-07-01 19:46:36 +00:00
subr_devstat.c
subr_disklabel.c Convert buffer locking from using the B_BUSY and B_WANTED flags to using 1999-06-26 02:47:16 +00:00
subr_diskmbr.c Convert buffer locking from using the B_BUSY and B_WANTED flags to using 1999-06-26 02:47:16 +00:00
subr_diskslice.c dsopen: Print a message if the unit has an invalid sector size. 1999-06-21 03:48:16 +00:00
subr_dkbad.c Convert buffer locking from using the B_BUSY and B_WANTED flags to using 1999-06-26 02:47:16 +00:00
subr_log.c Simplify cdevsw registration. 1999-05-31 11:29:30 +00:00
subr_module.c
subr_param.c Move the initialisation/tuning of nmbclusters from param.c/machdep.c 1999-07-05 08:52:54 +00:00
subr_prf.c ksprintn() may be called with base=2, so redefine MAXNBUF accordingly. 1999-06-07 18:26:26 +00:00
subr_prof.c
subr_rman.c Make sure that we record the flags in all cases. 1999-06-26 10:27:30 +00:00
subr_scanf.c
subr_smp.c Changes in the way that the APs are started appears to have removed the 1999-06-23 23:02:38 +00:00
subr_trap.c Changed the global `idt' from an array to a pointer so that npx.c 1999-06-18 14:32:21 +00:00
subr_xxx.c
sys_generic.c
sys_pipe.c Restructure pipe_read in order to eliminate several race conditions. 1999-06-05 03:53:57 +00:00
sys_process.c Moving the initialization for write sooner quiets a warning. 1999-07-01 22:52:40 +00:00
sys_socket.c
syscalls.c
syscalls.master
sysv_ipc.c
sysv_msg.c
sysv_sem.c
sysv_shm.c For consistency with other implementations, check for the existence 1999-06-19 23:53:13 +00:00
tty_compat.c
tty_conf.c
tty_cons.c Quieten some warnings as a result of changes in ls_items[] constness over 1999-06-26 12:19:03 +00:00
tty_pty.c Simplify cdevsw registration. 1999-05-31 11:29:30 +00:00
tty_snoop.c Add Id strings 1999-06-17 23:42:45 +00:00
tty_subr.c Quiet warnings on an Alpha. CBSIZE has long type and causes the other 1999-07-01 19:46:36 +00:00
tty_tb.c
tty_tty.c Simplify cdevsw registration. 1999-05-31 11:29:30 +00:00
tty.c Don't call calcru() on a swapped-out process. calcru() access p_stats, which 1999-05-22 20:10:31 +00:00
uipc_domain.c
uipc_mbuf.c Move the initialisation/tuning of nmbclusters from param.c/machdep.c 1999-07-05 08:52:54 +00:00
uipc_proto.c
uipc_sockbuf.c Move the initialisation/tuning of nmbclusters from param.c/machdep.c 1999-07-05 08:52:54 +00:00
uipc_socket2.c Move the initialisation/tuning of nmbclusters from param.c/machdep.c 1999-07-05 08:52:54 +00:00
uipc_socket.c Reviewed by: the cast of thousands 1999-06-17 23:54:50 +00:00
uipc_syscalls.c
uipc_usrreq.c
vfs_aio.c Slight reorganization of kernel thread/process creation. Instead of using 1999-07-01 13:21:46 +00:00
vfs_bio.c The buffer queue mechanism has been reformulated. Instead of having 1999-07-04 00:25:38 +00:00
vfs_cache.c
vfs_cluster.c The vfs.write_behind sysctl and related code support has been added to 1999-07-04 00:31:17 +00:00
vfs_conf.c Fix warnings in last commit (dev_t is not an int, and not even int 1999-07-03 17:40:31 +00:00
vfs_default.c Add Id strings 1999-06-17 23:42:45 +00:00
vfs_export.c The buffer queue mechanism has been reformulated. Instead of having 1999-07-04 00:25:38 +00:00
vfs_extattr.c
vfs_init.c
vfs_lookup.c
vfs_mount.c Fix warnings in last commit (dev_t is not an int, and not even int 1999-07-03 17:40:31 +00:00
vfs_subr.c The buffer queue mechanism has been reformulated. Instead of having 1999-07-04 00:25:38 +00:00
vfs_syscalls.c
vfs_vnops.c Make sure that stat(2) and friends always return a valid st_dev field. 1999-07-02 16:29:47 +00:00
vnode_if.pl Add a vnode argument to VOP_BWRITE to get rid of the last vnode 1999-06-16 23:27:55 +00:00
vnode_if.sh Add a vnode argument to VOP_BWRITE to get rid of the last vnode 1999-06-16 23:27:55 +00:00
vnode_if.src Add a vnode argument to VOP_BWRITE to get rid of the last vnode 1999-06-16 23:27:55 +00:00