Commit Graph

35 Commits

Author SHA1 Message Date
thorpej e3669c3393 Add "use counting" to file entries. When closing a file, and it's reference
count is 0, wait for use count to drain before finishing the close.

This is necessary in order for multiple processes to safely share file
descriptor tables.
1999-05-05 20:01:01 +00:00
kleink bff1bef006 * Add a comment to ktrgetheader() mentioning that ktr_len and ktr_buf are
being left uninitialized intentionally; addresses PR kern/6987.
* In ktrsysret(), initialize the unused ktr_eosys to avoid writing random junk.
1999-04-11 18:44:00 +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
perry 275d1554aa Abolition of bcopy, ovbcopy, bcmp, and bzero, phase one.
bcopy(x, y, z) ->  memcpy(y, x, z)
ovbcopy(x, y, z) -> memmove(y, x, z)
   bcmp(x, y, z) ->  memcmp(x, y, z)
  bzero(x, y)    ->  memset(x, 0, y)
1998-08-04 04:03:10 +00:00
perry 730baa7431 fix sizeofs so they comply with the KNF style guide. yes, it is pedantic. 1998-07-31 22:50:48 +00:00
thorpej a4a34ba74a Add two additional arguments to the fileops read and write calls, a
pointer to the offset to use, and a flags word.  Define a flag that
specifies whether or not to update the offset passed by reference.
1998-06-30 05:33:11 +00:00
thorpej 808867c7cf defopt KTRACE 1998-06-25 21:17:15 +00:00
christos 02cecf686a New fktrace syscall from Darren Reed [with fixes from me] 1998-05-02 18:33:19 +00:00
mycroft f327fee4ca Fix KTROP_CLEARFILE so it does the same thing as KTROP_CLEAR (i.e. vrele()
rather than vn_close()).  Fixes PR 5357.
1998-04-28 22:27:22 +00:00
mrg f0fc5e8ca7 remove register from decl. 1998-03-29 05:19:43 +00:00
fvdl e5bc90f40c Merge with Lite2 + local changes 1998-03-01 02:20:01 +00:00
mycroft 04daee4f9c Add const where appropriate. 1997-10-19 02:00:19 +00:00
christos 09afd77655 More proto fixes 1996-02-09 18:59:18 +00:00
christos 8a5b1b92e2 First pass at prototyping 1996-02-04 02:15:01 +00:00
christos 16c4374c1f Make the ktrace code emit a record that indicates the current emulation
every time there is an attach or detach event.
1995-10-22 00:35:06 +00:00
mycroft 245f292fed Prefix names of system call implementation functions with `sys_'. 1995-10-07 06:25:19 +00:00
thorpej 60024eb978 Make system calls conform to a standard prototype and bring those
prototypes into scope.
1995-09-19 21:40:36 +00:00
christos 7de0fcfd12 Add KTR_EMUL to indicate a switch between syscall emulations.
Currently this record is emitted only on exec. Maybe it should
be emitted on ktrace() attach too.
1995-07-19 15:19:08 +00:00
cgd a046d2374e don't default return types to ints; specify them.
ktrsyscall takes (vp, code, argsize, args), and stores argsize rather
than nargs.
1995-03-26 07:48:47 +00:00
mycroft 1f5c42f54c Update types. 1995-03-09 08:55:47 +00:00
mycroft 080e194e58 Remove extra arg to vn_open(). 1994-12-14 19:03:13 +00:00
christos 1a320dc9be added extra argument in vn_open and VOP_OPEN to allow cloning devices 1994-11-14 06:01:16 +00:00
cgd 6b86130410 update for new syscall args description mechanism 1994-10-20 04:22:35 +00:00
mycroft 2f710a54ee Convert process, file, and namei lists and hash tables to use queue.h. 1994-08-30 03:04:28 +00:00
cgd cf92afd66e New RCS ID's, take two. they're more aesthecially pleasant, and use 'NetBSD' 1994-06-29 06:29:24 +00:00
mycroft 699bbb84b6 Update to 4.4-Lite fs code. 1994-06-08 11:28:29 +00:00
cgd 21a03cca53 mostly-machine-indepedent switch, and changes to match. also, hack init_main 1994-05-18 05:12:10 +00:00
cgd a0a7429482 lots of changes: prototype migration, move lots of variables, definitions,
and structure elements around.  kill some unnecessary type and macro
definitions.  standardize clock handling.  More changes than you'd want.
1994-05-05 05:35:42 +00:00
mycroft 21edb9924e Canonicalize all #includes. 1993-12-18 03:59:02 +00:00
cgd 9c32bc786a make allproc be volatile, and cast things accordingly.
suggested by torek, because CSRG had problems with reordering
of assignments to allproc leading to strange panics from kernels
compiled with gcc2...
1993-09-15 22:30:32 +00:00
cgd c0334ef92c break args structs out, into syscallname_args structs, so gcc2 doesn't
whine so much.
1993-07-13 22:13:15 +00:00
andrew 0e6cb953ea ANSIfications - removed all implicit function return types and argument
definitions.  Ensured that all files include "systm.h" to gain access to
general prototypes.  Casts where necessary.
1993-06-27 06:01:27 +00:00
cgd 230dcf0d05 add $Id$ strings, and clean up file headers where necessary 1993-05-20 02:54:09 +00:00
glass e0cd0652b6 removed unnecessary #ifdefing, fixed conf/files appropriately 1993-03-26 22:16:30 +00:00
cgd 61f282557f initial import of 386bsd-0.1 sources 1993-03-21 09:45:37 +00:00