summaryrefslogtreecommitdiffstats
path: root/sys/fs/procfs/procfs_rlimit.c
Commit message (Collapse)AuthorAgeFilesLines
* Locking for the per-process resource limits structure.jhb2004-02-041-4/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - struct plimit includes a mutex to protect a reference count. The plimit structure is treated similarly to struct ucred in that is is always copy on write, so having a reference to a structure is sufficient to read from it without needing a further lock. - The proc lock protects the p_limit pointer and must be held while reading limits from a process to keep the limit structure from changing out from under you while reading from it. - Various global limits that are ints are not protected by a lock since int writes are atomic on all the archs we support and thus a lock wouldn't buy us anything. - All accesses to individual resource limits from a process are abstracted behind a simple lim_rlimit(), lim_max(), and lim_cur() API that return either an rlimit, or the current or max individual limit of the specified resource from a process. - dosetrlimit() was renamed to kern_setrlimit() to match existing style of other similar syscall helper functions. - The alpha OSF/1 compat layer no longer calls getrlimit() and setrlimit() (it didn't used the stackgap when it should have) but uses lim_rlimit() and kern_setrlimit() instead. - The svr4 compat no longer uses the stackgap for resource limits calls, but uses lim_rlimit() and kern_setrlimit() instead. - The ibcs2 compat no longer uses the stackgap for resource limits. It also no longer uses the stackgap for accessing sysctl's for the ibcs2_sysconf() syscall but uses kernel_sysctl() instead. As a result, ibcs2_sysconf() no longer needs Giant. - The p_rlimit macro no longer exists. Submitted by: mtm (mostly, I only did a few cleanups and catchups) Tested on: i386 Compiled on: alpha, amd64
* Minor whitespace and style issues.des2003-12-071-2/+1
|
* Pseudofsize procfs(5).des2001-12-041-37/+10
|
* - FDESC, FIFO, NULL, PORTAL, PROC, UMAP and UNION fileru2001-05-231-1/+1
| | | | | | | | | | | | | | | systems were repo-copied from sys/miscfs to sys/fs. - Renamed the following file systems and their modules: fdesc -> fdescfs, portal -> portalfs, union -> unionfs. - Renamed corresponding kernel options: FDESC -> FDESCFS, PORTAL -> PORTALFS, UNION -> UNIONFS. - Install header files for the above file systems. - Removed bogus -I${.CURDIR}/../../sys CFLAGS from userland Makefiles.
* Remove unused #includes.phk1999-12-081-1/+0
| | | | Obtained from: http://bogon.freebsd.dk/include
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* Fixed printf format errors (%qu -> %llu; the arg was already unsigned longbde1999-08-081-5/+3
| | | | long to hide problems on alphas).
* Use %q rather than rolling a custom routine.peter1999-07-091-51/+7
|
* Add a new "file" to procfs: "rlimit" which shows the resource limits forphk1999-04-301-0/+175
the process. PR: 11342 Submitted by: Adrian Chadd adrian@freebsd.org Reviewed by: phk
OpenPOWER on IntegriCloud