summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_proc.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* Misplaced comment.art2009-04-151-5/+5
| | | | From Kirill Timofeev
* change all callers of enterpgrp() to pre-allocate a pgrp or session ifderaadt2008-11-011-17/+30
| | | | | | it might be needed later -- before calling pfind(), so that enterpgrp() can operate without sleeping ok tedu
* accidental commit ... backoutderaadt2008-10-311-39/+19
|
* kern_sysctl.cderaadt2008-10-311-19/+39
|
* Make context switching much more MI:art2007-10-101-3/+3
| | | | | | | | | | | | | | | | | | | | - Move the functionality of choosing a process from cpu_switch into a much simpler function: cpu_switchto. Instead of having the locore code walk the run queues, let the MI code choose the process we want to run and only implement the context switching itself in MD code. - Let MD context switching run without worrying about spls or locks. - Instead of having the idle loop implemented with special contexts in MD code, implement one idle proc for each cpu. make the idle loop MI with MD hooks. - Change the proc lists from the old style vax queues to TAILQs. - Change the sleep queue from vax queues to TAILQs. This makes wakeup() go from O(n^2) to O(n) there will be some MD fallout, but it will be fixed shortly. There's also a few cleanups to be done after this. deraadt@, kettenis@ ok
* Use M_ZERO in a few more places to shave bytes from the kernel.art2007-09-071-4/+2
| | | | eyeballed and ok dlg@
* Allow ddb>ps to print the full name of the wait state. Things likeckuethe2007-08-041-3/+3
| | | | | "flt_noram1" would get truncated otherwise. ok deraadt
* Start moving state that is shared among threads in a process intoart2007-04-031-1/+4
| | | | | | | | | | | a new struct. Instead of doing a huge rename and deal with the fallout for weeks, like other projects that need no mention, we will slowly and carefully move things out of struct proc into a new struct process. - Create struct process and the infrastructure to create and remove them. - Move threads in a process into struct process. deraadt@, tedu@ ok
* Since p_flag is often manipulated in interrupts and without biglockart2007-03-151-2/+2
| | | | | | | | | | | | it's a good idea to use atomic.h operations on it. This mechanic change updates all bit operations on p_flag to atomic_{set,clear}bits_int. Only exception is that P_OWEUPC is set by MI code before calling need_proftick and it's automatically cleared by ADDUPC. There's no reason for MD handling of that flag since everyone handles it the same way. kettenis@ ok
* fix memory leak conditions in thrsleep and significantly simplifytedu2005-12-221-9/+1
|
* older gcc (like real C) does not let you declare local variables afterderaadt2005-12-041-4/+4
| | | | doing functional code; ie. LIST_INIT()
* kernel support for threaded processes (rthreads).tedu2005-12-031-1/+9
| | | | | | | | uses rfork(RFTHREAD) to create threads, which are presently processes that are a little more tightly bound together. several new syscalls added to facilitate a userland thread library. all conditional on RTHREADS, currently disabled. ok deraadt
* ansi/deregister.jsg2005-11-281-38/+22
| | | | 'go for it' deraadt@
* oops, kernel free needs two args. thanks pedrotedu2005-07-041-5/+7
|
* malloc(M_WAITOK) implies sleeping, so we have to double check thattedu2005-07-031-7/+15
| | | | somebody else didn't beat us in uid_find().
* split out uidinfo from kern_proc.c private, use it to store lock count,tedu2005-03-101-32/+22
| | | | | | restrict lock count per uid to a global limit, add sysctl to adjust limit. this prevents a user from creating too many locks. problem noticed by devon o'dell. ok deraadt miod pedro
* Use list and queue macros where applicable to make the code easier to read;miod2004-12-261-15/+13
| | | | no change in compiler assembly output.
* handle SONPROC; ok aaron, deraadt, krwmarkus2004-11-181-2/+2
|
* cacheing -> cachingpedro2004-10-041-2/+2
|
* move db_show_all_procs to kern_proc.c, proc_printit goes in DDB too.tedu2004-07-251-1/+90
| | | | | shuffle functions around so that scheduler is all together. no real functional changes. ok art@ testing miod@
* SIMPLELOCK -> mutex for the lock around deadproc list.art2004-07-221-14/+1
| | | | | | | Also move the whole deadproc infrastructure to kern_exit, it's only used there. miod@ ok
* debranch SMP, have funniklas2004-06-131-3/+3
|
* The Sxxx proc state defines start at 1, not 0. Also make the constmillert2004-01-291-5/+5
| | | | | usage more correct and fix a signed/unsigned format mismatch. Based on a patch from Patrick Latifi. OK deraadt@
* Remove the advertising clause in the UCB license which Berkeleymillert2003-06-021-6/+2
| | | | rescinded 22 July 1999. Proofed by myself and Theo.
* Quoting Theo: Do not approve diffs when you're hungover.art2003-05-121-3/+3
| | | | Accessing p_md members from MI code is not legal.
* use snprintf. ok mickeytedu2003-05-121-2/+2
|
* sho proc [addr] to print some proc's field; art@ okmickey2003-05-121-1/+30
|
* First round of __P removal in sysmillert2002-03-141-3/+3
|
* poolify pcreds.art2002-01-251-1/+4
|
* Allocate rusage, pgrp, ucred and session with pool.art2002-01-231-9/+18
|
* Pool deals fairly well with physical memory shortage, but it doesn't dealart2002-01-231-2/+2
| | | | | | | | | | | | | | | | | | well (not at all) with shortages of the vm_map where the pages are mapped (usually kmem_map). Try to deal with it: - group all information the backend allocator for a pool in a separate struct. The pool will only have a pointer to that struct. - change the pool_init API to reflect that. - link all pools allocating from the same allocator on a linked list. - Since an allocator is responsible to wait for physical memory it will only fail (waitok) when it runs out of its backing vm_map, carefully drain pools using the same allocator so that va space is freed. (see comments in code for caveats and details). - change pool_reclaim to return if it actually succeeded to free some memory, use that information to make draining easier and more efficient. - get rid of PR_URGENT, noone uses it.
* Don't include <sys/map.h> when you don't need what's in it.miod2002-01-161-2/+1
|
* Use pool to allocate processes.art2001-03-231-1/+7
|
* Changes to exit handling.art2000-06-051-2/+16
| | | | | | | | cpu_exit no longer frees the vmspace and u-area. This is now handled by a separate kernel thread "reaper". This is to avoid sleeping locks in the critical path of cpu_exit where we're not allowed to sleep. From NetBSD
* zap the newhashinit hack.art1999-04-281-4/+4
| | | | | Add an extra flag to hashinit telling if it should wait in malloc. update all calls to hashinit.
* Please gcc 2.8todd1998-03-021-2/+2
|
* Please GCC 2.8 -Wallniklas1998-02-201-3/+5
|
* fix memory leak; hbriceno@lcs.mit.eduderaadt1997-11-241-3/+3
|
* From NetBSD: 960217 mergeniklas1996-03-031-4/+9
|
* initial import of NetBSD treederaadt1995-10-181-0/+377