summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_acct.c
Commit message (Collapse)AuthorAgeFilesLines
* Move the truncation code out of vn_open and into the open system callmckusick2000-07-041-2/+3
| | | | | | | | | | after the acquisition of any advisory locks. This fix corrects a case in which a process tries to open a file with a non-blocking exclusive lock. Even if it fails to get the lock it would still truncate the file even though its open failed. With this change, the truncation is done only after the lock is successfully acquired. Obtained from: BSD/OS
* Add sysctl descriptions to a few sysctls. Simply "documentation".nbm2000-06-261-3/+3
| | | | | PR: kern/8015 Submitted by: Stefan Eggers <seggers@semyam.dinoco.de>
* Remove unneeded #include <vm/vm_zone.h>phk2000-04-301-1/+0
| | | | Generated by: src/tools/tools/kerninclude
* Introduce NDFREE (and remove VOP_ABORTOP)eivind1999-12-151-0/+3
|
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* Fix a dev_t/udev_t issue with accounting. lastcomm now shows thephk1999-07-101-3/+3
| | | | | | | right tty again. Submitted by: "D. Rock" <rock@dead-end.net> Reviewed by: phk
* Suser() simplification:phk1999-04-271-2/+2
| | | | | | | | | | | | | | | | | | | 1: s/suser/suser_xxx/ 2: Add new function: suser(struct proc *), prototyped in <sys/proc.h>. 3: s/suser_xxx(\([a-zA-Z0-9_]*\)->p_ucred, \&\1->p_acflag)/suser(\1)/ The remaining suser_xxx() calls will be scrutinized and dealt with later. There may be some unneeded #include <sys/cred.h>, but they are left as an exercise for Bruce. More changes to the suser() API will come along with the "jail" code.
* Moved limit frobbing (and the resulting limcopy()) that occurs fordg1998-06-051-2/+12
| | | | | | accounting to the accounting function so that this isn't needlessly done for some process exits. Reviewed by: bde,phk
* Move the "retval" (3rd) parameter from all syscall functions and putphk1997-11-061-3/+2
| | | | | | | | | | | | 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.
* init_main.c subr_autoconf.c:gibbs1997-09-211-3/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for "interrupt driven configuration hooks". A component of the kernel can register a hook, most likely during auto-configuration, and receive a callback once interrupt services are available. This callback will occur before the root and dump devices are configured, so the configuration task can affect the selection of those two devices or complete any tasks that need to be performed prior to launching init. System boot is posponed so long as a hook is registered. The hook owner is responsible for removing the hook once their task is complete or the system boot can continue. kern_acct.c kern_clock.c kern_exit.c kern_synch.c kern_time.c: Change the interface and implementation for the kernel callout service. The new implemntaion is based on the work of Adam M. Costello and George Varghese, published in a technical report entitled "Redesigning the BSD Callout and Timer Facilities". The interface used in FreeBSD is a little different than the one outlined in the paper. The new function prototypes are: struct callout_handle timeout(void (*func)(void *), void *arg, int ticks); void untimeout(void (*func)(void *), void *arg, struct callout_handle handle); If a client wishes to remove a timeout, it must store the callout_handle returned by timeout and pass it to untimeout. The new implementation gives 0(1) insert and removal of callouts making this interface scale well even for applications that keep 100s of callouts outstanding. See the updated timeout.9 man page for more details.
* Removed unused #includes.bde1997-09-021-2/+1
|
* Don't include <sys/ioctl.h> in the kernel. Stage 1: don't includebde1997-03-241-2/+1
| | | | | it when it is not used. In most cases, the reasons for including it went away when the special ioctl headers became self-sufficient.
* Don't #include <sys/fcntl.h> in <sys/file.h> if KERNEL is defined.bde1997-03-231-2/+2
| | | | | Fixed everything that depended on getting fcntl.h stuff from the wrong place. Most things don't depend on file.h stuff at all.
* Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are notpeter1997-02-221-1/+1
| | | | ready for it yet.
* This is the kernel Lite/2 commit. There are some requisite userlanddyson1997-02-101-18/+18
| | | | | | | | | | | | | | | 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>
* Make the long-awaited change from $Id$ to $FreeBSD$jkh1997-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.
* A Major staticize sweep. Generates a couple of warnings that I'll dealphk1995-12-141-10/+19
| | | | | | with later. A number of unused vars removed. A number of unused procs removed or #ifdefed.
* Included <sys/sysproto.h> to get central declarations for syscall argsbde1995-11-121-1/+4
| | | | | | | | | | 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.
* Second batch of cleanup changes.phk1995-10-291-2/+2
| | | | | This time mostly making a lot of things static and some unused variables here and there.
* Use the same method to determine the time that the processmpp1995-07-231-4/+2
| | | | | | | ended that fork() uses to determine the time that the process started when calculating the elapsed time. This prevents the ac_etime field in the accounting record from getting set to -1 if the process exists for a VERY short period of time.
* All of this is cosmetic. prototypes, #includes, printfs and so on. Makesphk1994-10-021-3/+5
| | | | GCC a lot more silent.
* Process accounting implementation by Chris Demetriou, with minor localdg1994-09-261-32/+216
| | | | | | changes. Obtained from: NetBSD
* Supply prototypes for some functions that were implicitly declared andbde1994-09-151-1/+2
| | | | fix the resulting warnings.
* Added $Id$dg1994-08-021-0/+1
|
* The big 4.4BSD Lite to FreeBSD 2.0.0 (Development) patch.rgrimes1994-05-251-0/+2
| | | | | Reviewed by: Rodney W. Grimes Submitted by: John Dyson and David Greenman
* BSD 4.4 Lite Kernel Sourcesrgrimes1994-05-241-0/+116
OpenPOWER on IntegriCloud