Commit Graph

106 Commits

Author SHA1 Message Date
thorpej 2835fc6e46 Pull signal actions out of struct user, make them a separate proc
substructure, and allow them to be shared.

Required for clone(2).
1999-04-30 21:23:49 +00:00
thorpej 16936c9565 Break cdir/rdir/cmask info out of struct filedesc, and put it in a new
substructure, `cwdinfo'.  Implement optional sharing of this substructure.

This is required for clone(2).
1999-04-30 18:42:58 +00:00
mrg d2397ac5f7 completely remove Mach VM support. all that is left is the all the
header files as UVM still uses (most of) these.
1999-03-24 05:50:49 +00:00
ross 6803dbddbb Replace the recent scheduler mods with calls to scheduler_{fork,wait}_hook(),
(inlined) so scheduler functionality can be kept in a single .h/.c set.
Also, the wait hook has changed the way it clips the scheduler history.
1999-02-23 02:57:18 +00:00
sommerfe 31a1ef68c7 Tweak to earlier fix to p_estcpu:
- no longer conditionalized
	- when traced, charge time to real parent, not debugger
	- make it clear for future rototillers that p_estcpu should be moved
	  to the "copy" region of struct proc.
1999-01-23 22:23:19 +00:00
sommerfe 068dd91745 Under control of "slowchild" global, make child process inherit the
scheduling penalty for being cpu-bound (p_estcpu) of its parent.
1999-01-23 17:02:35 +00:00
thorpej a0fac8a7bc Move fork_kthread() to a new file, kern_kthread.c, and rename it to
kthread_create().  Implement kthread_exit() (causes a thrad to exit).
Set P_NOCLDWAIT on kernel threads, which will cause any of their children
to be reparented to init(8) (which is already prepared to wait out orphaned
processes).
1998-11-11 22:44:24 +00:00
thorpej 6956a57584 Initial version of API for creating kernel threads (likely to change somewhat
in the future):
- New function, fork_kthread(), takes entry point, argument for entry point,
  and comment for new proc.  May be called by any context, will fork the
  thread from proc0 (requires slight changes to cpu_fork()).
- cpu_set_kpc() now takes a third argument, a void *arg to pass to the
  thread entry point.  Thread entry point now takes void * instead of
  struct proc *.
- Create the pagedaemon and reaper kernel threads using fork_kthread().
1998-11-11 06:34:43 +00:00
thorpej 970e60efb8 - Use proclists[], rather than checking allproc and zombproc explicitly.
- Add some comments about locking.
1998-09-08 23:50:13 +00:00
thorpej 4dc0e91e12 Use the pool allocator and "nointr" pool page allocator for pcred and
plimit structures.
1998-08-31 23:20:16 +00:00
eeh a2dd74ed79 Merge paddr_t changes into the main branch. 1998-08-13 02:10:37 +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
thorpej 0e28b643e9 Use a pool for proc structures. 1998-08-02 04:41:32 +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
thorpej 2018d40811 Allocate kernel virtual address space for the U-area before allocating
the new proc structure when performing a fork.  This makes it much
easier to abort a fork operation and return an error if we run out
of KVA space.

The U-area pages are still wired down in {,u}vm_fork(), as before.
1998-04-09 00:23:38 +00:00
fvdl e5bc90f40c Merge with Lite2 + local changes 1998-03-01 02:20:01 +00:00
thorpej d2924ae854 Prevent the session ID from disappearing if the session leader exits
(thus causing s_leader to become NULL) by storing the session ID separately
in the session structure.  Export the session ID to userspace in the
eproc structure.

Submitted by Tom Proett <proett@nas.nasa.gov>.
1998-02-14 00:37:26 +00:00
mrg d90485202c - add defopt's for UVM, UVMHIST and PMAP_NEW.
- remove unnecessary UVMHIST_DECL's.
1998-02-10 14:08:44 +00:00
mrg 1a8c7604f4 initial import of the new virtual memory system, UVM, into -current.
UVM was written by chuck cranor <chuck@maria.wustl.edu>, with some
minor portions derived from the old Mach code.  i provided some help
getting swap and paging working, and other bug fixes/ideas.  chuck
silvers <chuq@chuq.com> also provided some other fixes.

this is the rest of the MI portion changes.

this will be KNF'd shortly.  :-)
1998-02-05 07:59:28 +00:00
thorpej 07216d15fc Allow retval to be NULL, filling it in only if it was passed. 1998-01-06 21:15:41 +00:00
thorpej ce340c6ca5 Also pass fork1() a struct proc **, in case the caller wants a pointer
to the newly created process.
1998-01-05 05:16:26 +00:00
thorpej 740f872797 New vfork(2) implementation, whith semantics matching those of the original
3BSD vfork(2), i.e. share address space w/ parent and block parent.

Keep statistics on the total number of forks, the number of forks that
block the parent, and the number of forks that share the address space
with the parent.
1998-01-04 03:52:02 +00:00
thorpej b1cf620cfe Update for additional argument to vm_fork() ("shared" boolean). 1998-01-03 02:49:30 +00:00
pk 98ce8ab879 Remove __FORK_BRAINDAMAGEd code; it's no longer needed. 1997-06-19 20:54:15 +00:00
mrg 6fd38fc5f9 pass P_SUGID to child. from freebsd. 1997-02-18 01:30:37 +00:00
mycroft 02ee12e4ba Use PHOLD() and PRELE() rather than frobbing p_holdcnt directly. 1996-10-09 00:04:39 +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
mycroft f183fc14f7 If __FORK_BRAINDAMAGE, continue stuffing retval[1] for the benefit of main(). 1995-12-10 08:26:02 +00:00
mycroft af942a9add Only expect vm_fork() to return if __FORK_BRAINDAMAGE is defined.
Use splstatclock() rather than splhigh() in one place.
Eliminate unused third arg to vm_fork().
1995-12-09 04:23:07 +00:00
mycroft 245f292fed Prefix names of system call implementation functions with `sys_'. 1995-10-07 06:25:19 +00:00
mycroft a1615c4d35 Clean up comments related to last change, and remove an unneeded
splclock/splx pair.
1995-03-18 14:35:14 +00:00
mycroft cfe40d86f6 Move a couple of assignments from the parent to the child. 1995-02-23 23:41:43 +00:00
cgd 6b86130410 update for new syscall args description mechanism 1994-10-20 04:22:35 +00:00
mycroft 227e4cb85c Make sure p_emul is copied on fork. 1994-08-30 06:16:25 +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 0d8affb278 Turn P_NOSWAP and P_PHYSIO into a hold count, as suggested by a comment. 1994-06-15 19:59:21 +00:00
cgd 540aa31a08 update to lite 1994-05-19 05:57:44 +00:00
cgd 91cf0fbaf3 copyright foo 1994-05-17 04:21:49 +00:00
cgd c6abdc2054 setrq -> setrunqueue, sched -> scheduler 1994-05-13 00:50:41 +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
cgd 4bbabd8e7a Rename a lot of process flags. 1994-05-04 03:41:12 +00:00
cgd 47894a50ac light clean 1994-04-10 00:16:58 +00:00
chopps 0622d87221 fix incorect check of nprocs vs. maxproc. 1994-02-21 23:10:46 +00:00
cgd 914aac9116 field name change 1994-01-04 11:29:55 +00:00
cgd a67d24d94b add support for p_vnode, from jsp 1993-12-22 13:39:27 +00:00
cgd afce447ada p_spare is in the 'zero range' now 1993-12-21 10:39:17 +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 cd56dd1638 merge in changes from netbsd-0-9-ALPHA2 1993-08-07 07:53:27 +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 d6e1f01ad4 nextpid & maxproc fixes from ws 1993-06-02 23:10:52 +00:00
cgd 230dcf0d05 add $Id$ strings, and clean up file headers where necessary 1993-05-20 02:54:09 +00:00
cgd 61f282557f initial import of 386bsd-0.1 sources 1993-03-21 09:45:37 +00:00