1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-05 09:14:03 +00:00
Mirror of the FreeBSD src repository https://git.FreeBSD.org/src.git .
Go to file
David Xu 9b0f1823b5 Use umtx to implement process sharable semaphore, to make this work,
now type sema_t is a structure which can be put in a shared memory area,
and multiple processes can operate it concurrently.
User can either use mmap(MAP_SHARED) + sem_init(pshared=1) or use sem_open()
to initialize a shared semaphore.
Named semaphore uses file system and is located in /tmp directory, and its
file name is prefixed with 'SEMD', so now it is chroot or jail friendly.
In simplist cases, both for named and un-named semaphore, userland code
does not have to enter kernel to reduce/increase semaphore's count.
The semaphore is designed to be crash-safe, it means even if an application
is crashed in the middle of operating semaphore, the semaphore state is
still safely recovered by later use, there is no waiter counter maintained
by userland code.
The main semaphore code is in libc and libthr only has some necessary stubs,
this makes it possible that a non-threaded application can use semaphore
without linking to thread library.
Old semaphore implementation is kept libc to maintain binary compatibility.
The kernel ksem API is no longer used in the new implemenation.

Discussed on: threads@
2010-01-05 02:37:59 +00:00
bin Committed the wrong version in r201484. This time really fix the "-t" 2010-01-04 10:50:17 +00:00
cddl Apply OpenSolaris revision 8012 which brings our zpool to version 14, 2009-12-28 22:15:11 +00:00
contrib Remove unneeded inclusion of <utmp.h> and dead variables. 2009-12-27 11:56:32 +00:00
crypto The size of credential messages is limited by CMGROUP_MAX rather than 2010-01-03 20:45:49 +00:00
etc Expose the upper 256 ptys in the default devfs rules. I should have updated 2010-01-04 18:21:27 +00:00
games - Add two particulary interesting quotes from the past decade. 2010-01-04 09:16:35 +00:00
gnu Fix one spelling and one copy&paste error in comments. 2009-12-14 01:51:23 +00:00
include Use umtx to implement process sharable semaphore, to make this work, 2010-01-05 02:37:59 +00:00
kerberos5 Link GSS mechanics modules against libgssapi so they will not fail due 2009-10-12 17:10:51 +00:00
lib Use umtx to implement process sharable semaphore, to make this work, 2010-01-05 02:37:59 +00:00
libexec Make WARNS=6 the default for libexec/. 2010-01-02 09:50:19 +00:00
release Do kgzip to the loader on pc98, too. Now pc98's boot2 works for ELF. 2010-01-02 12:37:54 +00:00
rescue Unbreak rescue(8). We should also link against libulog now. 2009-12-05 23:23:46 +00:00
sbin Add manual page for gcache(8). 2010-01-03 15:20:52 +00:00
secure Build lib/ with WARNS=6 by default. 2010-01-02 09:58:07 +00:00
share Add a missing word. 2010-01-04 22:23:09 +00:00
sys Use umtx to implement process sharable semaphore, to make this work, 2010-01-05 02:37:59 +00:00
tools Add ability to search up the directory hierarchy for the system directory. 2010-01-04 18:57:22 +00:00
usr.bin Add ability to search up the directory hierarchy for the system directory. 2010-01-04 18:57:22 +00:00
usr.sbin Unbreak bootparamd when setting WITHOUT_NIS. 2010-01-04 18:08:16 +00:00
COPYRIGHT Happy New Year 2010! :-) 2009-12-31 10:00:37 +00:00
LOCKS
MAINTAINERS Removing pre-commit review on isp(4). It's time to let people have their 2009-12-30 14:41:02 +00:00
Makefile Add a new world named 'mips' to our universe. 2009-04-01 17:11:50 +00:00
Makefile.inc1 Disable K&R style function definitions for WARNS=6. 2009-12-31 00:07:26 +00:00
ObsoleteFiles.inc Use umtx to implement process sharable semaphore, to make this work, 2010-01-05 02:37:59 +00:00
README
UPDATING Fixed two typos. 2009-12-25 21:14:34 +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 ``world''
target should only be used in cases where the source tree has not
changed from the currently running version.  See:
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/makeworld.html
for more information, including setting make(1) variables.

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.

rescue		Build system for statically linked /rescue utilities.

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