FreeBSD src
Go to file
marcel 22ad156e94 Assign thread IDs to kernel threads. The purpose of the thread ID (tid)
is twofold:
1. When a 1:1 or M:N threaded process dumps core, we need to put the
   register state of each of its kernel threads in the core file.
   This can only be done by differentiating the pid field in the
   respective note. For this we need the tid.
2. When thread support is present for remote debugging the kernel
   with gdb(1), threads need to be identified by an integer due to
   limitations in the remote protocol. This requires having a tid.

To minimize the impact of having thread IDs, threads that are created
as part of a fork (i.e. the initial thread in a process) will inherit
the process ID (i.e. tid=pid). Subsequent threads will have IDs larger
than PID_MAX to avoid interference with the pid allocation algorithm.
The assignment of tids is handled by thread_new_tid().

The thread ID allocation algorithm has been written with 3 assumptions
in mind:
1. IDs need to be created as fast a possible,
2. Reuse of IDs may happen instantaneously,
3. Someone else will write a better algorithm.
2004-04-03 15:59:13 +00:00
bin Add spaces after flag names on .Fl macros. 2004-04-01 13:28:36 +00:00
contrib pcap clients should use strlcpy() from the base system libc by default also. 2004-03-31 18:15:37 +00:00
crypto Resolve conflicts after import of OpenSSL 0.9.7d. 2004-03-17 17:44:39 +00:00
etc Add rc.d script to start pflogd and add rcvars etc. Also document vars in 2004-04-02 19:25:27 +00:00
games Add an observation by Dijkstra software engineering. 2004-03-22 05:02:01 +00:00
gnu Get rid of a spurious "the". 2004-03-18 20:36:14 +00:00
include Parenthesize function names in masking macros for getc() etc. for the 2004-03-20 11:45:52 +00:00
kerberos5 style.Makefile(5). 2004-02-05 18:51:52 +00:00
lib Unbreak natd. 2004-04-02 17:57:57 +00:00
libexec If we change obj_rtld.path after initialising __progname, make sure we 2004-03-29 18:37:37 +00:00
release Add Cronyx-Tau entry. 2004-04-02 17:35:53 +00:00
rescue Remove dangling raidctl reference 2004-03-16 13:42:23 +00:00
sbin Remove these MAINTAINER lines since the maintainers has had their 2004-04-01 20:31:49 +00:00
secure Remove the -pthread from the last commit, as OpenSSL doesn't actually 2004-03-30 21:04:04 +00:00
share Add rc.d script to start pflogd and add rcvars etc. Also document vars in 2004-04-02 19:25:27 +00:00
sys Assign thread IDs to kernel threads. The purpose of the thread ID (tid) 2004-04-03 15:59:13 +00:00
tools Add a snapshot of build32.sh for amd64 systems. The readme and comments 2004-03-30 22:57:11 +00:00
usr.bin From the list of calendars, remove some duplicate entries which were added 2004-03-30 18:28:36 +00:00
usr.sbin If the user doesn't specify a device and we can't open any of the defaults, 2004-04-01 16:37:46 +00:00
COPYRIGHT Update the COPYRIGHT file to include FreeBSD's compilation copyright 2003-12-31 22:35:22 +00:00
installworld_newk Commit the first set of files for changing time_t on freebsd/sparc64 2004-03-03 19:36:20 +00:00
installworld_oldk Commit the first set of files for changing time_t on freebsd/sparc64 2004-03-03 19:36:20 +00:00
MAINTAINERS Remove these MAINTAINER lines since the maintainers has had their 2004-04-01 20:31:49 +00:00
Makefile Added the `toolchain' top-level target, which builds enough of 2004-03-24 08:26:22 +00:00
Makefile.inc1 Added the `toolchain' top-level target, which builds enough of 2004-03-24 08:26:22 +00:00
README KerberosIV de-orbit burn continues. Disconnect from "make world". 2003-03-08 10:01:26 +00:00
UPDATING Commit a message to UPDATING indicating that during network stack locking 2004-03-22 16:37:32 +00:00
UPDATING.64BTT Add a tip for people who are using database-related ports on a sparc64 2004-03-17 01:59:47 +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