FreeBSD src
Go to file
Daniel Eischen fbeb36e4bf Implement zero system call thread switching. Performance of
thread switches should be on par with that under scheduler
activations.

  o Timing is achieved through the use of a fixed interval
    timer (ITIMER_PROF) to count scheduling ticks instead
    of retrieving the time-of-day upon every thread switch
    and calculating elapsed real time.

  o Polling for I/O readiness is performed once for each
    scheduling tick instead of every thread switch.

  o The non-signal saving/restoring versions of setjmp/longjmp
    are used to save and restore thread contexts.  This may
    allow the removal of _THREAD_SAFE macros from setjmp()
    and longjmp() - needs more investigation.

Change signal handling so that signals are handled in the
context of the thread that is receiving the signal.  When
signals are dispatched to a thread, a special signal handling
frame is created on top of the target threads stack.  The
frame contains the threads saved state information and a new
context in which the thread can run.  The applications signal
handler is invoked through a wrapper routine that knows how
to restore the threads saved state and unwind to previous
frames.

Fix interruption of threads due to signals.  Some states
were being improperly interrupted while other states were
not being interrupted.  This should fix several PRs.

Signal handlers, which are invoked as a result of a process
signal (not by pthread_kill()), are now called with the
code (or siginfo_t if SA_SIGINFO was set in sa_flags) and
sigcontext_t as received from the process signal handler.

Modify the search for a thread to which a signal is delivered.
The search algorithm is now:

  o First thread found in sigwait() with signal in wait mask.
  o First thread found sigsuspend()'d on the signal.
  o Current thread if signal is unmasked.
  o First thread found with signal unmasked.

Collapse machine dependent support into macros defined in
pthread_private.h.  These should probably eventually be moved
into separate MD files.

Change the range of settable priorities to be compliant with
POSIX (0-31).  The threads library uses higher priorities
internally for real-time threads (not yet implemented) and
threads executing signal handlers.  Real-time threads and
threads running signal handlers add 64 and 32, respectively,
to a threads base priority.

Some other small changes and cleanups.

PR:		17757 18559 21943
Reviewed by:	jasone
2000-10-13 22:12:32 +00:00
bin Style fixes 2000-10-11 05:04:21 +00:00
contrib Helper to trim extracted files for use when importing new versions of 2000-10-13 12:36:13 +00:00
crypto Fix a few style oddities. 2000-09-10 18:04:12 +00:00
etc "fix" savecore by moving dev_mkdb before it to allow device name sensing 2000-10-12 21:40:04 +00:00
games Remove one other dup. 2000-10-12 09:26:33 +00:00
gnu Style tweaks. 2000-10-13 12:22:47 +00:00
include Cleanup of bitstring.h: 2000-10-09 12:34:51 +00:00
kerberos5 Fix ordering for real this time. 2000-08-30 03:44:30 +00:00
kerberosIV Remove the last vestiges of libRSAglue now that it's an empty stub. 2000-03-11 22:34:10 +00:00
lib Implement zero system call thread switching. Performance of 2000-10-13 22:12:32 +00:00
libexec Fix broken PAM with SKEY behaviour: the skey.access file checks 2000-10-12 10:21:05 +00:00
release Note fsck wrappers, ncurses update (+MFC), gperf update. 2000-10-13 14:31:01 +00:00
sbin Allow for IP_FW_ADD to be used in getsockopt(2) incarnation as 2000-10-12 07:59:14 +00:00
secure Do not override BINDIR settings from subdirectory Makefiles. 2000-10-13 16:57:03 +00:00
share Add `isoC-99' to the list of availble abbreviations. 2000-10-11 19:30:41 +00:00
sys Remember to assign an_dev to device_t before calling an_attach(). 2000-10-13 22:04:20 +00:00
tools Teach kerninclude to check <machine/*> #includes as well. 2000-10-13 12:03:01 +00:00
usr.bin Skip sockets with no SCB 2000-10-13 16:25:37 +00:00
usr.sbin ../Makefile.inc was clobbering BINDIR so sendmail was being installed in 2000-10-13 16:51:05 +00:00
COPYRIGHT Update to add the July 22, 1999 addendum. 1999-09-05 21:33:47 +00:00
Makefile Pass the reinstallkernel target through from Makefile to Makefile.inc1. 2000-09-19 11:15:40 +00:00
Makefile.inc1 Number the stages in the documentation to match what is printed out when 2000-10-13 01:19:36 +00:00
Makefile.upgrade $Id$ -> $FreeBSD$ 1999-08-28 01:35:59 +00:00
README Slightly improve the description of "crypto". "DES" is a subset of 2000-08-31 17:59:01 +00:00
UPDATING rm miniperl && cd /usr/ports && cvs update -PAd now recommended 2000-10-09 03:56:39 +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 have to build
world before.  More information is available in the handbook.

The sample kernel configuration files reside in the sys/i386/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.

kerberosIV	Kerberos 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