freebsd kernel with SKQ
Go to file
jhb 1ce407b675 Change the preemption code for software interrupt thread schedules and
mutex releases to not require flags for the cases when preemption is
not allowed:

The purpose of the MTX_NOSWITCH and SWI_NOSWITCH flags is to prevent
switching to a higher priority thread on mutex releease and swi schedule,
respectively when that switch is not safe.  Now that the critical section
API maintains a per-thread nesting count, the kernel can easily check
whether or not it should switch without relying on flags from the
programmer.  This fixes a few bugs in that all current callers of
swi_sched() used SWI_NOSWITCH, when in fact, only the ones called from
fast interrupt handlers and the swi_sched of softclock needed this flag.
Note that to ensure that swi_sched()'s in clock and fast interrupt
handlers do not switch, these handlers have to be explicitly wrapped
in critical_enter/exit pairs.  Presently, just wrapping the handlers is
sufficient, but in the future with the fully preemptive kernel, the
interrupt must be EOI'd before critical_exit() is called.  (critical_exit()
can switch due to a deferred preemption in a fully preemptive kernel.)

I've tested the changes to the interrupt code on i386 and alpha.  I have
not tested ia64, but the interrupt code is almost identical to the alpha
code, so I expect it will work fine.  PowerPC and ARM do not yet have
interrupt code in the tree so they shouldn't be broken.  Sparc64 is
broken, but that's been ok'd by jake and tmm who will be fixing the
interrupt code for sparc64 shortly.

Reviewed by:	peter
Tested on:	i386, alpha
2002-01-05 08:47:13 +00:00
bin Bruce thought some of the comments I added were not clear enough. This is 2002-01-01 06:14:26 +00:00
contrib Repo copied to /usr/src/lib/libopie/ 2002-01-03 15:58:11 +00:00
crypto mdoc(7) police: remove -r from SYNOPSIS, sort -p in DESCRIPTION. 2001-12-14 14:41:07 +00:00
etc Install nsmb.conf with mode 0600, since it may be modified to include 2002-01-04 13:02:51 +00:00
games Correct typo. 2002-01-01 00:50:30 +00:00
gnu Don't build csu or libgcc on sparc64 for the time being. 2002-01-03 19:57:35 +00:00
include Fix bugs in the structure for rx_frame by making gap length one byte and 2001-12-31 22:01:44 +00:00
kerberos5 Install script via SCRIPTS. 2001-12-17 16:52:32 +00:00
kerberosIV Install script via SCRIPTS. 2001-12-17 16:52:32 +00:00
lib Minor grammar and punctuation fixes 2002-01-04 18:17:07 +00:00
libexec Fix OPIE auth 2002-01-01 13:14:25 +00:00
release Merge the changes in the English version (1.244 --> 1.247). 2002-01-05 08:01:41 +00:00
sbin o Note that packets diverted using a 'divert' socket, and then 2002-01-03 01:00:23 +00:00
secure Clean up makefiles, and turn on WARNS=2. Take into account the telnet 2001-11-30 21:10:58 +00:00
share Fully catch up to the recent critical section API change. Update the 2002-01-04 23:56:17 +00:00
sys Change the preemption code for software interrupt thread schedules and 2002-01-05 08:47:13 +00:00
tools Remove broken attempt to compile libc's malloc source directly; this 2002-01-02 06:42:34 +00:00
usr.bin Argh...argv->argc 2002-01-04 13:46:57 +00:00
usr.sbin Add a new flag '-c' to disable repeated line compression when the output 2002-01-05 07:34:52 +00:00
COPYRIGHT Update to add the July 22, 1999 addendum. 1999-09-05 21:33:47 +00:00
Makefile Make it possible to build manpages for the entire source tree. 2001-03-27 08:43:28 +00:00
Makefile.inc1 gnu/libexec has gone so remove it from the most targets. 2001-12-28 11:53:18 +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 add note that truss works again as of dec 09. 2001-12-28 05:35:32 +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