OPNsense - FreeBSD source
Find a file
John Polstra e6f0183bff Remove the nanosleep calls from the spin loops in the locking code.
They provided little benefit (if any) and they caused some problems
in OpenOffice, at least in post-KSE -current and perhaps in other
environments too.  The nanosleep calls prevented the profiling timer
from advancing during the spinloops, thereby preventing the thread
scheduler from ever pre-empting the spinning thread.  Alexander
Kabaev diagnosed this problem, Martin Blapp helped with testing,
and Matt Dillon provided some helpful suggestions.

This is a short-term fix for a larger problem.  The use of spinlocking
isn't guaranteed to work in all cases.  For example, if the spinning
thread has higher priority than all other threads, it may never be
pre-empted, and the thread holding the lock may never progress far
enough to release the lock.  On the other hand, spinlocking is the
only locking that can work with an arbitrary unknown threads package.

I have some ideas for a much better fix in the longer term.  It
would eliminate all locking inside the dynamic linker by making it
safe for symbol lookups and lazy binding to proceed in parallel
with a call to dlopen or dlclose.  This means that the only mutual
exclusion needed would be to prevent multiple simultaneous calls
to dlopen and/or dlclose.  That mutual exclusion could be put into
the native pthreads library.  Applications using foreign threads
packages would have to make their own arrangements to ensure that
they did not have multiple threads in dlopen and/or dlclose -- a
reasonable requirement in my opinion.

MFC after:	3 days
2002-07-06 20:25:56 +00:00
bin The .Nm utility 2002-07-06 19:13:21 +00:00
contrib Merge rev 1.2 (FreeBSD a.out configuration support) into the 2002-07-05 20:44:29 +00:00
crypto Rewrite to use the buffer API instead of roll-your-own messaging. 2002-07-05 15:27:26 +00:00
etc There is apparently no reason for the existence of the `etc' target. 2002-07-05 13:47:29 +00:00
games Use varargs for syserr(). 2002-06-23 18:30:29 +00:00
gnu Add the missing dependency (gdbint.info: gdb-cfg.texi). 2002-07-04 11:33:59 +00:00
include Convince lint via the standard lint-comment /* LONGLONG */ to not 2002-07-04 11:07:48 +00:00
kerberos5 Heimdal Texinfo manual. 2002-07-05 05:47:13 +00:00
kerberosIV This code is no longer WARNS level 2 OK. 2002-05-15 06:32:29 +00:00
lib Move appropriate information out of DESCRIPTION' and into SECURITY 2002-07-03 15:31:47 +00:00
libexec Remove the nanosleep calls from the spin loops in the locking code. 2002-07-06 20:25:56 +00:00
release New release note: kbdmap(1)/vidfont(1) C rewrite. 2002-07-06 19:42:39 +00:00
sbin The .Nm utility. 2002-07-06 19:35:14 +00:00
secure ssh-keysign(8) belongs in /usr/libexec, not in /usr/bin, and needs to be 2002-07-05 08:39:09 +00:00
share Part 1/2 of kerberos5/doc/ "make release" breakage fix: 2002-07-06 14:58:20 +00:00
sys Cleanup after my de-__P (remove leading whitespace before prototype args). 2002-07-06 16:34:32 +00:00
tools Update another mention of <CR><CR> I missed the first time around (rev 1.2) 2002-07-04 05:16:19 +00:00
usr.bin Don't depend on pollution in <limits.h> for the definition of 2002-07-05 15:58:27 +00:00
usr.sbin The .Nm utility 2002-07-06 19:34:18 +00:00
COPYRIGHT Update to add the July 22, 1999 addendum. 1999-09-05 21:33:47 +00:00
MAINTAINERS Add libufs, a library for dealing with UFS filesystems from userland to 2002-07-01 01:45:03 +00:00
Makefile correct syntax in last commit 2002-06-24 20:13:09 +00:00
Makefile.inc1 libufs does not need built before most things, after all. 2002-07-01 17:51:43 +00:00
Makefile.upgrade Removed "env" commands. "sh" is a real shell, so 2002-03-19 05:58:36 +00:00
README Spell "FreeBSD" correctly. 2002-03-26 12:35:49 +00:00
UPDATING Approved by: imp@freebsd.org 2002-07-03 04:23:38 +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/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.

kerberosIV	KerberosIV (eBones) 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/handbook/synching.html