FreeBSD src
Go to file
Marcel Moolenaar 247aba2474 Allocate TIDs in thread_init() and deallocate them in thread_fini().
The overhead of unconditionally allocating TIDs (and likewise,
unconditionally deallocating them), is amortized across multiple
thread creations by the way UMA makes it possible to have type-stable
storage.
Previously the cost was kept down by having threads created as part
of a fork operation use the process' PID as the TID. While this had
some nice properties, it also introduced complexity in the way TIDs
were allocated. Most importantly, by using the type-stable storage
that UMA gives us this was also unnecessary.

This change affects how core dumps are created and in particular how
the PRSTATUS notes are dumped. Since we don't have a thread with a
TID equalling the PID, we now need a different way to preserve the
old and previous behavior. We do this by having the given thread (i.e.
the thread passed to the core dump code in td) dump it's state first
and fill in pr_pid with the actual PID. All other threads will have
pr_pid contain their TIDs. The upshot of all this is that the debugger
will now likely select the right LWP (=TID) as the initial thread.

Credits to: julian@ for spotting how we can utilize UMA.
Thanks to: all who provided julian@ with test results.
2004-06-26 18:58:22 +00:00
bin Don't continue if the '-C' option (a-la GNUtar; commited in options.c 2004-06-25 05:27:59 +00:00
contrib Our dhclient-script fails to update /etc/resolv.conf if no new 2004-06-26 10:47:38 +00:00
crypto Regenerate. 2004-04-20 09:49:37 +00:00
etc Make the stop command respect the 'fast' prefix. 2004-06-26 09:27:30 +00:00
games Add a Nicollism. 2004-06-24 03:08:44 +00:00
gnu Fixed world breakage in the NOSHARED=yes case (missing library). 2004-06-26 08:48:50 +00:00
include Now that <runetype.h> no longer brings in namespace pollution, 2004-06-23 07:11:39 +00:00
kerberos5 Update version strings for Heimdal: 0.6 -> 0.6.1 2004-04-13 16:41:00 +00:00
lib Revert the last change. There are more 64bit platforms than amd64, and 2004-06-25 12:32:45 +00:00
libexec Nuke COMPAT_43 2004-06-25 10:11:28 +00:00
release Add readme and installation to the build 2004-06-25 05:03:56 +00:00
rescue Remove dangling raidctl reference 2004-03-16 13:42:23 +00:00
sbin o Fix semantics of comparison function for qsort(3). According to qsort(3) 2004-06-25 13:04:49 +00:00
secure Import the openssl conf for arm. 2004-05-14 12:26:51 +00:00
share Fixed a style bug in the previous commit. 2004-06-26 09:02:44 +00:00
sys Allocate TIDs in thread_init() and deallocate them in thread_fini(). 2004-06-26 18:58:22 +00:00
tools Add qsort, mergesort and heapsort regression tests. 2004-06-25 12:31:12 +00:00
usr.bin Add support for multibyte characters in input files and delimiter 2004-06-25 01:48:43 +00:00
usr.sbin If HISMACADDR is set in the environment (by pppoed), pass the value to 2004-06-26 01:02:31 +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 Add myself as maintainer for geom_nop, geom_stripe and geom(8). 2004-05-20 12:44:23 +00:00
Makefile Add a kernel-toolchain target which only builds the bits required to build 2004-04-13 13:42:01 +00:00
Makefile.inc1 Third time's a charm?? (the logic was reversed from desired) 2004-06-17 08:06:41 +00:00
README KerberosIV de-orbit burn continues. Disconnect from "make world". 2003-03-08 10:01:26 +00:00
UPDATING Add "privsep" user/group _pflogd:_pflogd (64:64) to make pflogd(8) work 2004-06-23 01:32:28 +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