summaryrefslogtreecommitdiff
path: root/sys/kern/kern_resource.c
Commit message (Collapse)AuthorAgeFilesLines
* Added comments about non-staticization so it doesn't get un-done nextMark Newton1999-01-311-1/+2
| | | | | | | | | time someone goes on a staticization binge. Suggested by: eivind Notes: svn path=/head/; revision=43448
* Unstaticized routines which are needed by the svr4 KLD and the streamsMark Newton1999-01-301-3/+3
| | | | | | | garbage needed to support SysVR4 networking. Notes: svn path=/head/; revision=43408
* Fixed double counting of runtime after a process exits. The lastBruce Evans1998-07-271-1/+11
| | | | | | | | | | | timeslice of the exiting process was counted for both the exiting process and the next process to run if the next process runs immediately. Broken in: mostly in kern_clock.c rev.1.70 (1998/05/28) Notes: svn path=/head/; revision=37894
* Some cleanups related to timecounters and weird ifdefs in <sys/time.h>.Poul-Henning Kamp1998-05-281-11/+14
| | | | | | | | | | | | | | | | | | | | | | | Clean up (or if antipodic: down) some of the msgbuf stuff. Use an inline function rather than a macro for timecounter delta. Maintain process "on-cpu" time as 64 bits of microseconds to avoid needless second rollover overhead. Avoid calling microuptime the second time in mi_switch() if we do not pass through _idle in cpu_switch() This should reduce our context-switch overhead a bit, in particular on pre-P5 and SMP systems. WARNING: Programs which muck about with struct proc in userland will have to be fixed. Reviewed, but found imperfect by: bde Notes: svn path=/head/; revision=36441
* s/nanoruntime/nanouptime/gPoul-Henning Kamp1998-05-171-2/+2
| | | | | | | | | s/microruntime/microuptime/g Reviewed by: bde Notes: svn path=/head/; revision=36119
* Fix previous commit. Don't people read compiler messages or something??Peter Wemm1998-04-051-2/+2
| | | | Notes: svn path=/head/; revision=35036
* Time changes mark 2:Poul-Henning Kamp1998-04-041-7/+10
| | | | | | | | | | | | | | | | | | | | * Figure out UTC relative to boottime. Four new functions provide time relative to boottime. * move "runtime" into struct proc. This helps fix the calcru() problem in SMP. * kill mono_time. * add timespec{add|sub|cmp} macros to time.h. (XXX: These may change!) * nanosleep, select & poll takes long sleeps one day at a time Reviewed by: bde Tested by: ache and others Notes: svn path=/head/; revision=35029
* Reviewed by: msmith, bde long agoPeter Dufault1998-03-041-2/+5
| | | | | | | | | | Fix for RTPRIO scheduler to eliminate invalid context switches. POSIX.4 headers and sysctl variables. Nothing should change unless POSIX4 is defined or _POSIX_VERSION is set to 199309. Notes: svn path=/head/; revision=34029
* Staticize.Eivind Eklund1998-02-091-5/+5
| | | | Notes: svn path=/head/; revision=33181
* Restrict idleprio to superuser:David Greenman1998-02-041-1/+11
| | | | | | | | | | | | Realtime priority has to be restricted for reasons which should be obvious. However, for idle priority, there is a potential for system deadlock if an idleprio process gains a lock on a resource that other processes need (and the idleprio process can't run due to a CPU-bound normal process). Fix me! XXX PR: 5639 Notes: svn path=/head/; revision=33102
* Set p_retval for the correct process in getpriority(). This fixesBruce Evans1998-01-191-3/+3
| | | | | | | | | | | a null pointer panic when the pointer for the incorrect process is NULL. getpriority() was broken in rev.1.27. Rev.1.28 broke the warning instead of fixing the problem. PR: 5495 Notes: svn path=/head/; revision=32618
* Make COMPAT_43 and COMPAT_SUNOS new-style options.Eivind Eklund1997-12-161-1/+2
| | | | Notes: svn path=/head/; revision=31778
* Remove a bunch of variables which were unused both in GENERIC and LINT.Poul-Henning Kamp1997-11-071-2/+2
| | | | | | | Found by: -Wunused Notes: svn path=/head/; revision=31016
* Move the "retval" (3rd) parameter from all syscall functions and putPoul-Henning Kamp1997-11-061-18/+10
| | | | | | | | | | | | | | | it in struct proc instead. This fixes a boatload of compiler warning, and removes a lot of cruft from the sources. I have not removed the /*ARGSUSED*/, they will require some looking at. libkvm, ps and other userland struct proc frobbing programs will need recompiled. Notes: svn path=/head/; revision=30994
* Print more info in the "calcru: negative time" message.Bruce Evans1997-08-261-2/+3
| | | | Notes: svn path=/head/; revision=28768
* Man the liferafts! Here comes the long awaited SMP -> -current merge!Peter Wemm1997-04-261-2/+4
| | | | | | | | | | | | | | | | | | | There are various options documented in i386/conf/LINT, there is more to come over the next few days. The kernel should run pretty much "as before" without the options to activate SMP mode. There are a handful of known "loose ends" that need to be fixed, but have been put off since the SMP kernel is in a moderately good condition at the moment. This commit is the result of the tinkering and testing over the last 14 months by many people. A special thanks to Steve Passe for implementing the APIC code! Notes: svn path=/head/; revision=25164
* Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are notPeter Wemm1997-02-221-1/+1
| | | | | | | ready for it yet. Notes: svn path=/head/; revision=22975
* This is the kernel Lite/2 commit. There are some requisite userlandJohn Dyson1997-02-101-1/+1
| | | | | | | | | | | | | | | | | | changes, so don't expect to be able to run the kernel as-is (very well) without the appropriate Lite/2 userland changes. The system boots and can mount UFS filesystems. Untested: ext2fs, msdosfs, NFS Known problems: Incorrect Berkeley ID strings in some files. Mount_std mounts will not work until the getfsent library routine is changed. Reviewed by: various people Submitted by: Jeffery Hsu <hsu@freebsd.org> Notes: svn path=/head/; revision=22521
* Make the long-awaited change from $Id$ to $FreeBSD$Jordan K. Hubbard1997-01-141-1/+1
| | | | | | | | | | | This will make a number of things easier in the future, as well as (finally!) avoiding the Id-smashing problem which has plagued developers for so long. Boy, I'm glad we're not using sup anymore. This update would have been insane otherwise. Notes: svn path=/head/; revision=21673
* Make DFLDSIZ and MAXDSIZ fully-supported options.Joerg Wunsch1996-12-221-1/+3
| | | | | | | "Don't forget to do a ``make depend''" :-) Notes: svn path=/head/; revision=20821
* Fixed accumulation of run time for processes that don't accumulateBruce Evans1996-06-081-7/+5
| | | | | | | | | | | | | | any statclock ticks. Pretend that all the time up to the first statclock tick is system time. . This makes a difference mainly for benchmarks that test short-lived processes - the user and system times for processes that each lived for about 1ms only added up to about 10% of the real time even when there was very little interrupt activity. Break the printing of a quad_t variable correctly. Notes: svn path=/head/; revision=16222
* From Lite2: proc LIST changesJeffrey Hsu1996-03-111-8/+9
| | | | | | | | stylistic changes to function prototypes Reviewed by: david & bde Notes: svn path=/head/; revision=14528
* Fix a printf, well, actually break it, that is...Poul-Henning Kamp1996-01-161-10/+10
| | | | | | | We don't have the ability to print 64bit things yet... Notes: svn path=/head/; revision=13467
* Untangled the vm.h include file spaghetti.David Greenman1995-12-071-1/+6
| | | | Notes: svn path=/head/; revision=12662
* Included <sys/sysproto.h> to get central declarations for syscall argsBruce Evans1995-11-121-1/+18
| | | | | | | | | | | | | structs and prototypes for syscalls. Ifdefed duplicated decentralized declarations of args structs. It's convenient to have this visible but they are hard to maintain. Some are already different from the central declarations. 4.4lite2 puts them in comments in the function headers but I wanted to avoid the large changes for that. Notes: svn path=/head/; revision=12221
* Fixed types of rtprio(), osetrlimit() and setrlimit(). The args structBruce Evans1995-11-111-12/+12
| | | | | | | | tag and/or member names conflicted with the machine generated ones in <sys/sysproto.h>. Notes: svn path=/head/; revision=12201
* Fix a sign extension bug that was unleashed by the previous change.Bruce Evans1995-10-231-3/+9
| | | | | | | | | The total process time was sometimes 2^32 usec too large but that wasn't a problem before because the time was bogusly truncated mod 2^32. Notes: svn path=/head/; revision=11731
* Avoid overflow in calcru(). Fixes PR 788.Bruce Evans1995-10-211-2/+2
| | | | | | | Submitted by: imdave@synet.net (Dave Bodenstab) Notes: svn path=/head/; revision=11610
* Remove trailing whitespace.Rodney W. Grimes1995-05-301-5/+5
| | | | Notes: svn path=/head/; revision=8876
* Implement maxprocperuid and maxfilesperproc. They are tunableGuido van Rooij1995-02-201-9/+9
| | | | | | | | | | | | | | | via sysctl(8). The initial value of maxprocperuid is maxproc-1, that of maxfilesperproc is maxfiles (untill maxfile will disappear) Now it is at least possible to prohibit one user opening maxfiles -Guido Submitted by: Obtained from: Notes: svn path=/head/; revision=6577
* Don't allow negative limits at all. Convert them to RLIM_INFINITY insteadBruce Evans1994-12-061-6/+15
| | | | | | | | | | of returning EINVAL since something may depend on them being broken. Allowing negative limits caused bugs almost everywhere. The recent fixes for MAXSSIZ checked the limits too late to stop anyone defeating limits set by root... Notes: svn path=/head/; revision=5009
* Add one forgotten u_quad_t typecast in dosetrlimit.Andreas Schulz1994-12-021-2/+2
| | | | Notes: svn path=/head/; revision=4908
* The values for setrlimit in the data size and stack size case areAndreas Schulz1994-12-011-6/+6
| | | | | | | | | | | | | used as an address value. Then all comparisons should be done unsigned and not signed. Fix it with a typecast of u_quad_t. Error can be demonstrated with the current bash in port, do a ulimit -s unlimited and the machine hangs. bash delivers through an internal error a large negative value for the stacksize, the comparison saw this smaller than MAXSSIZ and then tried to expand the stack to this size. Notes: svn path=/head/; revision=4889
* Cosmetics. related to getting prototypes into view.Poul-Henning Kamp1994-10-101-1/+4
| | | | Notes: svn path=/head/; revision=3485
* "idle priority" support. Based on code from Henrik Vestergaard Draboel,David Greenman1994-10-021-34/+45
| | | | | | | but substantially rewritten by me. Notes: svn path=/head/; revision=3291
* While in the real world, I had a bad case of being swapped out for a lot ofPoul-Henning Kamp1994-09-251-6/+6
| | | | | | | | | | | cycles. While waiting there I added a lot of the extra ()'s I have, (I have never used LISP to any extent). So I compiled the kernel with -Wall and shut up a lot of "suggest you add ()'s", removed a bunch of unused var's and added a couple of declarations here and there. Having a lap-top is highly recommended. My kernel still runs, yell at me if you kernel breaks. Notes: svn path=/head/; revision=3098
* Realtime priority scheduling support.David Greenman1994-09-011-1/+59
| | | | | | | Submitted by: Henrik Vestergaard Draboel Notes: svn path=/head/; revision=2441
* Added $Id$David Greenman1994-08-021-0/+1
| | | | Notes: svn path=/head/; revision=1817
* The big 4.4BSD Lite to FreeBSD 2.0.0 (Development) patch.Rodney W. Grimes1994-05-251-9/+20
| | | | | | | | Reviewed by: Rodney W. Grimes Submitted by: John Dyson and David Greenman Notes: svn path=/head/; revision=1549
* BSD 4.4 Lite Kernel SourcesRodney W. Grimes1994-05-241-0/+476
Notes: svn path=/head/; revision=1541