freebsd kernel with SKQ
Go to file
John Baldwin 91d5354a2c Locking for the per-process resource limits structure.
- 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
2004-02-04 21:52:57 +00:00
bin Use sys_nsig instead of the static NSIG. DragonflyBSD kill.c:1.3 2004-01-28 19:04:14 +00:00
contrib Make gcc -pthread link to -lpthread instead of -lc_r. 2004-01-30 12:14:19 +00:00
crypto Update the "overview of FreeBSD changes to OpenSSH-portable" to reflect 2004-01-25 13:09:56 +00:00
etc We don't really need a lockfile, and most likely can't create one at 2004-02-04 15:53:49 +00:00
games "The Aged Aged Man" was not a word doubling. 2004-01-19 21:22:21 +00:00
gnu Add a section documenting the return values from diff. 2004-02-01 13:52:19 +00:00
include Add NO_BLUETOOTH knob to the build process 2004-01-28 00:42:51 +00:00
kerberos5 Unbreak build with OpenLDAP. 2004-02-04 16:42:36 +00:00
lib Allow libc's version of sem_trywait() to work for non-pshared mutexes. 2004-02-04 15:37:48 +00:00
libexec Removed unnecessary dependencies on librpcsvc. 2004-02-04 11:59:08 +00:00
release - Use a stock loader with forth support on the boot floppies. 2004-02-03 22:05:55 +00:00
rescue Revision 1.7 of this file added information 2004-01-18 22:24:23 +00:00
sbin Add ifconfig support for network interface renaming. In the process, 2004-02-04 02:55:46 +00:00
secure - Removed libmd from the Kerberos library set. 2004-02-02 22:00:35 +00:00
share Fixed breakage of POSIX support in rev.1.31. -pipe was added to 2004-02-04 14:40:44 +00:00
sys Locking for the per-process resource limits structure. 2004-02-04 21:52:57 +00:00
tools Don't forget to install stable.rc. 2004-02-04 09:06:32 +00:00
usr.bin Removed unnecessary dependencies on librpcsvc. 2004-02-04 11:59:08 +00:00
usr.sbin Removed unnecessary dependencies on librpcsvc. 2004-02-04 11:59:08 +00:00
COPYRIGHT Update the COPYRIGHT file to include FreeBSD's compilation copyright 2003-12-31 22:35:22 +00:00
MAINTAINERS I'll continue to babysit the Kerberos-related stuff. 2004-01-30 15:40:33 +00:00
Makefile Put on some factor 30+ bikeshed repellent and export the internal 2003-12-09 02:08:19 +00:00
Makefile.inc1 Overhaul of kerberos5/ makefiles. Most significant changes are: 2004-01-31 08:15:57 +00:00
README KerberosIV de-orbit burn continues. Disconnect from "make world". 2003-03-08 10:01:26 +00:00
UPDATING Add a note about the libkse -> libpthread switch. 2004-01-30 12:24:21 +00:00

This is the top level of the FreeBSD source directory.  This file
was last revised on:
$FreeBSD$

For copyright information, please see the file COPYRIGHT in this
directory (additional copyright information also exists for some
sources in this tree - please see the specific source directories for
more information).

The Makefile in this directory supports a number of targets for
building components (or all) of the FreeBSD source tree, the most
commonly used one being ``world'', which rebuilds and installs
everything in the FreeBSD system from the source tree except the
kernel, the kernel-modules and the contents of /etc.  The
``buildkernel'' and ``installkernel'' targets build and install
the kernel and the modules (see below).  Please see the top of
the Makefile in this directory for more information on the
standard build targets and compile-time flags.

Building a kernel is a somewhat more involved process, documentation
for which can be found at:
   http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig.html
And in the config(8) man page.
Note: If you want to build and install the kernel with the
``buildkernel'' and ``installkernel'' targets, you might need to build
world before.  More information is available in the handbook.

The sample kernel configuration files reside in the sys/<arch>/conf
sub-directory (assuming that you've installed the kernel sources), the
file named GENERIC being the one used to build your initial installation
kernel.  The file NOTES contains entries and documentation for all possible
devices, not just those commonly used.  It is the successor of the ancient
LINT file, but in contrast to LINT, it is not buildable as a kernel but a
pure reference and documentation file.


Source Roadmap:
---------------
bin		System/user commands.

contrib		Packages contributed by 3rd parties.

crypto		Cryptography stuff (see crypto/README).

etc		Template files for /etc.

games		Amusements.

gnu		Various commands and libraries under the GNU Public License.
		Please see gnu/COPYING* for more information.

include		System include files.

kerberos5	Kerberos5 (Heimdal) package.

lib		System libraries.

libexec		System daemons.

release		Release building Makefile & associated tools.

sbin		System commands.

secure		Cryptographic libraries and commands.

share		Shared resources.

sys		Kernel sources.

tools		Utilities for regression testing and miscellaneous tasks.

usr.bin		User commands.

usr.sbin	System administration commands.


For information on synchronizing your source tree with one or more of
the FreeBSD Project's development branches, please see:

  http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/synching.html