Commit Graph

49 Commits

Author SHA1 Message Date
thorpej 8c0ee6a16b Merge the nathanw_sa branch. 2003-01-18 17:31:06 +00:00
christos 116bcb05d0 rename: s/sa_/<compat>sa/g 2002-11-26 18:43:20 +00:00
simonb 4e3613273b Remove breaks after returns, unreachable returns and returns after
returns(!).
2002-09-23 05:51:10 +00:00
thorpej 011d4d5f44 Add kernel support for having userland provide the signal trampoline:
* struct sigacts gets a new sigact_sigdesc structure, which has the
  sigaction and the trampoline/version.  Version 0 means "legacy kernel
  provided trampoline".  Other versions are coordinated with machine-
  dependent code in libc.
* sigaction1() grows two more arguments -- the trampoline pointer and
  the trampoline version.
* A new __sigaction_sigtramp() system call is provided to register a
  trampoline along with a signal handler.
* The handler is no longer passed to sensig() functions.  Instead,
  sendsig() looks up the handler by peeking in the sigacts for the
  process getting the signal (since it has to look in there for the
  trampoline anyway).
* Native sendsig() functions now select the appropriate trampoline and
  its arguments based on the trampoline version in the sigacts.

Changes to libc to use the new facility will be checked in later.  Kernel
version not bumped; we will ride the 1.6C bump made recently.
2002-07-04 23:32:02 +00:00
manu 78583a4567 Always define SA_SIGINFO, and keep track of it in SVR4 emulation. This is
needed for IRIX signal delivery.
Approved by Christos.
2002-04-12 17:37:30 +00:00
christos ac29fb3782 make signal array handling uniform, and put signal arrays in a separate
file. This is simular to errno array handling.
2002-03-31 22:22:43 +00:00
christos e88e90e3bf use 64 signals. 2002-03-20 17:50:07 +00:00
lukem dab6ef8b56 add RCSIDs (including regeneration of files as appropriate) 2001-11-13 02:07:52 +00:00
jdolecek 522f569810 make some more constant arrays 'const' 2001-02-21 21:39:52 +00:00
jdolecek e9e91a0fb5 split off thread specific stuff from struct sigacts to struct sigctx, leaving
only signal handler array sharable between threads
move other random signal stuff from struct proc to struct sigctx

This addresses kern/10981 by Matthew Orgass.
2000-12-22 22:58:52 +00:00
mrg 705b50bf32 fix LP64 warnings. 2000-07-27 14:00:56 +00:00
christos 93f27a1a74 Print the extra bits in the SS_ flags. Somehow lwp uses 0x6f00000b0. What is
0x6fxxxxxx. Inquiring minds would like to know :-) It does not appear to be
documented.
2000-04-09 06:28:28 +00:00
christos 926a3cecf8 print the extra SA_ bits we don't support. 2000-04-09 05:29:28 +00:00
augustss a82aeb5508 Kill register declarations. 2000-03-30 11:24:16 +00:00
christos d205cc9cd4 oops, forgot to include new files. 1999-09-07 18:20:18 +00:00
christos b52c37957d Handle the mi portion of the *context system call here. Changes from previous
version:
1. The stack_t returned before was SS_DISABLED; now we enable the stack
   and return a 16K stack which is 16K under the current stack pointer.
   This seems to be what solaris does.
2. Preserve uc_link.
1999-01-21 23:20:43 +00:00
kleink 4ff7b1f346 Add symbolic names for the sys_context() subcodes. 1999-01-12 02:09:18 +00:00
kleink bb6c814341 If a null pointer argument is passed to setcontext(), exit the process; it
would appear that overloading the argument this way is used by SVR4 to `fall
off' the main context (uc_link being NULL) after a function set up using
makecontext() returns.
1999-01-12 00:16:40 +00:00
thorpej 53b61ccd14 Avoid a compiler warning. 1998-10-06 08:51:14 +00:00
christos 227ea85cf0 Don't return EINVAL when nset is NULL in sigprocmask and the command is
invalid.
1998-10-04 16:21:13 +00:00
christos af5667d954 We have SA_NOCLDWAIT now, and for SA_SIGINFO, we ignore the bit, but we
always construct siginfo_t and pass it to the handler. So kill the printfs..
1998-10-02 11:54:16 +00:00
mycroft fb526e055c Substantial signal handling changes:
* Increase the size of sigset_t to accomodate 128 signals -- adding new
  versions of sys_setprocmask(), sys_sigaction(), sys_sigpending() and
  sys_sigsuspend() to handle the changed arguments.
* Abstract the guts of sys_sigaltstack(), sys_setprocmask(), sys_sigaction(),
  sys_sigpending() and sys_sigsuspend() into separate functions, and call them
  from all the emulations rather than hard-coding everything.  (Avoids uses
  the stackgap crap for these system calls.)
* Add a new flag (p_checksig) to indicate that a process may have signals
  pending and userret() needs to do the full (slow) check.
* Eliminate SAS_ALTSTACK; it's exactly the inverse of SS_DISABLE.
* Correct emulation bugs with restoring SS_ONSTACK.
* Make the signal mask in the sigcontext always use the emulated mask format.
* Store signals internally in sigaction structures, rather than maintaining a
  bunch of little sigsets for each SA_* bit.
* Keep track of where we put the signal trampoline, rather than figuring it out
  in *_sendsig().
* Issue a warning when a non-emulated sigaction bit is observed.
* Add missing emulated signals, and a native SIGPWR (currently not used).
* Implement the `not reset when caught' semantics for relevant signals.

Note: Only code touched by the i386 port has been modified.  Other ports and
emulations need to be updated.
1998-09-11 12:50:05 +00:00
christos e1f16dd0c9 Assign copyrights to TNF; tv has copyrights on the remaining files...
It would be nice if he changed them (hint, hint)
1998-09-04 19:54:37 +00:00
perry e1601dc2ca bzero->memset, bcopy->memcpy, bcmp->memcmp 1998-08-09 20:36:58 +00:00
mjacob 0e9ef018df more putz cleanup: I dunno if this works (fixing syntax, not checking semantics) 1997-12-01 06:04:23 +00:00
christos e8aaebee8e implement pause 1996-12-06 03:21:53 +00:00
christos 6c2fd36998 Fixed debug printf format args. 1996-03-30 22:37:52 +00:00
christos ed8966b2ea svr4_sigfillset should be void 1996-03-16 23:20:30 +00:00
christos 1b17f25866 fix prototype warnings 1996-02-09 23:12:14 +00:00
jtc 2fce159ff8 Changed name of sigaltstack's ss_base field to ss_sp to match XPG4.2 and
traditional usage.
1996-01-04 22:21:33 +00:00
mycroft 245f292fed Prefix names of system call implementation functions with `sys_'. 1995-10-07 06:25:19 +00:00
thorpej eecd40e854 Make system calls conform to a standard prototype and bring those
prototypes into scope.
1995-09-19 22:10:11 +00:00
cgd ce48e523d6 kill some redundant (and harmful) static definitions of functions 1995-08-19 04:04:50 +00:00
mycroft c331c7be82 Rename ss_flags bits. 1995-08-15 16:52:30 +00:00
mycroft eba2f2e81a Move signal types into signal.h. 1995-08-14 01:11:52 +00:00
mycroft ca057762b9 Minor cleanup. 1995-08-14 00:41:02 +00:00
mycroft a6b7c740c6 Convert SA_RESETHAND and SA_NODEFER.
Scrub this code a bit.
1995-08-13 22:57:10 +00:00
christos d0169ce44a Use compat_util.[ch] 1995-06-24 20:29:17 +00:00
fvdl a22d72bf4d * Always kill all vm_cmds before giving up on loading an executable
* Don't try to use auxiliary arguments with statically linked executables.
* Remove 'cannot find interpreter' uprintf, as other exec modules may
  succeed in running the binary after all, and then we don't want this message.
* Some linkers produce rw- for the data segment, not rwx.
* Remove a few debugging printfs
1995-06-11 15:06:11 +00:00
mycroft 7688f4456e Remove usages of ibcs_sigflags. 1995-05-01 04:50:28 +00:00
christos ee05f066e8 1. siginfo stuff torn out from wait.h to be used by the MI portion of the code.
2. many termio, ioctl, sigaction fixes
3. better socket type emulation; still ticotsord [the loopback interface I
   guess] does not work properly on svr4 4.1.
4. new gettimeofday, fixed utssys..
5. rmdir and mkdir were swapped in syscalls.master
1995-03-31 03:06:17 +00:00
christos dbcb84b7e1 Added sigaltstack, ioctl(I_NREAD)
Replaced syssun with svr4_sysarch()
1995-02-01 01:37:33 +00:00
christos 9033addb0c Job control fixes... Still not working, but better 1995-01-09 01:04:18 +00:00
christos ff6fb90722 Fixed waitsys().
Fixed time functions.
Added alarm(), contextsys(), sigaction(), kill(), statvfs(), fstatvfs()
1995-01-08 21:31:34 +00:00
christos 2859b1c634 Rework streams emulation so that it does not rely on non portable hacks.
We keep streams state in so->so_ptcb; this field is unused in all the kernel.
Fix poll(2) timeout computation; add hrtsys and waitsys syscalls.
1994-11-18 02:53:37 +00:00
christos f46f498d53 Changed code to KNF, removed global variable per cgd's request. 1994-10-29 00:43:14 +00:00
christos afffe1aaf8 Fixed Charles suggestions:
1. always do the stackgap_init()/CHECKALT first in syscalls that need it.
2. svr4_emul_find() uses malloc for the buf, does not use copyoutstr, but
   copyout().

Removed makesyscalls.sh; it was really old and we don't need a separate copy.
1994-10-26 11:58:24 +00:00
cgd 69d2deb545 new RCS ID format. 1994-10-26 05:27:43 +00:00
deraadt b415eb1d1d new from christos 1994-10-24 17:37:34 +00:00