Commit Graph

1761 Commits

Author SHA1 Message Date
Christian Brueffer
af176d7306 Some language and mdoc style improvements. 2008-02-14 19:39:09 +00:00
Attilio Rao
f0c5fe2d1d Update manpage with lockmgr_assert() description. 2008-02-13 21:54:16 +00:00
Christian Brueffer
a733fdfe95 Remove dublicate MLINK.
Submitted by:	David Naylor <blackdragon@highveldmail.co.za>
2008-02-13 09:50:37 +00:00
Attilio Rao
abd94b3d59 Update manpage in order to reflect LK_NODUP and LK_NOWITNESS options
introduction.
2008-02-06 00:50:51 +00:00
Poul-Henning Kamp
cf827063a9 Give MEXTADD() another argument to make both void pointers to the
free function controlable, instead of passing the KVA of the buffer
storage as the first argument.

Fix all conventional users of the API to pass the KVA of the buffer
as the first argument, to make this a no-op commit.

Likely break the only non-convetional user of the API, after informing
the relevant committer.

Update the mbuf(9) manual page, which was already out of sync on
this point.

Bump __FreeBSD_version to 800016 as there is no way to tell how
many arguments a CPP macro needs any other way.

This paves the way for giving sendfile(9) a way to wait for the
passed storage to have been accessed before returning.

This does not affect the memory layout or size of mbufs.

Parental oversight by:	sam and rwatson.

No MFC is anticipated.
2008-02-01 19:36:27 +00:00
David E. O'Brien
16ea8822d9 Add to the history section. 2008-01-27 03:58:22 +00:00
Attilio Rao
623c393d65 Reflect lockcount() axing and lockmgr() prototype changing. 2008-01-24 14:17:52 +00:00
Attilio Rao
7ad783ffe7 Add manpages for BUF_RECURSED(9) and BUF_ISLOCKED(9) and connect them to
the build.

Reviewed by: brueffer
2008-01-22 21:26:35 +00:00
Attilio Rao
fa88526575 Add the newly added function lockmgr_recursed() to the manpages. 2008-01-22 20:16:09 +00:00
Attilio Rao
d3d35ac3e3 BUF_REFCNT(9) function no more exists, so just axe out the manpage. 2008-01-22 20:02:24 +00:00
Attilio Rao
cc24fccdbe Fix lock.9 manpage in order to recall lockmgr_disown() with 'man' command. 2008-01-22 19:58:30 +00:00
Attilio Rao
f8a134ac63 Update VOP_LOCK() and VOP_UNLOCK() prototypes.
Leave 'td' argument description as it is used by VOP_ISLOCKED(). It will
be axed in further commit.
2008-01-18 22:09:29 +00:00
Maxim Konovalov
eb922405a5 o .Dd.year++. 2008-01-12 21:07:03 +00:00
Maxim Konovalov
8ef952a396 o Do not claim vlan(4) uses mbuf_tags(9).
PR:		docs/11959
Submitted by:	Alexander Chernikov
MFC after:	1 week
2008-01-12 19:37:18 +00:00
Christian Brueffer
072aee8c70 Removed a contraction. 2008-01-10 19:11:37 +00:00
Attilio Rao
fe166a35ff Update vn_lock() prototype accordingly with the 'thread' argument removal. 2008-01-10 01:23:59 +00:00
Christian Brueffer
584b589225 Fix typos. 2008-01-09 08:08:56 +00:00
Attilio Rao
fc2d483ef5 Add lockmgr_disown() and relative explanation. 2008-01-09 02:10:32 +00:00
Greg Lehey
efcb0d7834 "redacted" replaced for clarity. 2008-01-05 21:39:21 +00:00
Attilio Rao
100f241571 Trimm out now unused option LK_EXCLUPGRADE from the lockmgr namespace.
This option just adds complexity and the new implementation no longer
will support it, so axing it now that it is unused is probabilly the
better idea.

FreeBSD version is bumped in order to reflect the KPI breakage introduced
by this patch.

In the ports tree, kris found that only old OSKit code uses it, but as
it is thought to work only on 2.x kernels serie, version bumping will
solve any problem.
2007-12-28 00:38:13 +00:00
Attilio Rao
09f97b49dd Garbage-collect following nomore existing options:
- LK_REENABLE
- LK_NOPAUSE
- LK_NOOBJ
2007-12-27 22:33:30 +00:00
Robert Watson
cd22c920f6 Use .An -nosplit in the AUTHORS section of sf_buf(9) to avoid an undesired
line break.

MFC after:	3 days
2007-12-19 20:34:09 +00:00
Christian Brueffer
c1d0bf3267 Add missing section number. 2007-12-19 08:01:24 +00:00
Warner Losh
db030f1dbc Add verbage on some of the rules for a 'filter' vs an 'ithread'
interrupt handler.
2007-12-19 01:26:34 +00:00
Robert Watson
3c90d1ea74 Break out stack(9) from ddb(4):
- Introduce per-architecture stack_machdep.c to hold stack_save(9).
- Introduce per-architecture machine/stack.h to capture any common
  definitions required between db_trace.c and stack_machdep.c.
- Add new kernel option "options STACK"; we will build in stack(9) if it is
  defined, or also if "options DDB" is defined to provide compatibility
  with existing users of stack(9).

Add new stack_save_td(9) function, which allows the capture of a stacktrace
of another thread rather than the current thread, which the existing
stack_save(9) was limited to.  It requires that the thread be neither
swapped out nor running, which is the responsibility of the consumer to
enforce.

Update stack(9) man page.

Build tested:	amd64, arm, i386, ia64, powerpc, sparc64, sun4v
Runtime tested:	amd64 (rwatson), arm (cognet), i386 (rwatson)
2007-12-02 20:40:35 +00:00
Robert Watson
9ccca7d1b1 Modify stack(9) stack_print() and stack_sbuf_print() routines to use new
linker interfaces for looking up function names and offsets from
instruction pointers.  Create two variants of each call: one that is
"DDB-safe" and avoids locking in the linker, and one that is safe for
use in live kernels, by virtue of observing locking, and in particular
safe when kernel modules are being loaded and unloaded simultaneous to
their use.  This will allow them to be used outside of debugging
contexts.

Modify two of three current stack(9) consumers to use the DDB-safe
interfaces, as they run in low-level debugging contexts, such as inside
lockmgr(9) and the kernel memory allocator.

Update man page.
2007-12-01 22:04:16 +00:00
Robert Watson
7340f1a1b8 Add description of stack_print() and MLINK. 2007-11-29 17:16:55 +00:00
Robert Watson
6a2ecc3859 Fix spelling of stack_capture() to stack_save(). 2007-11-28 12:04:08 +00:00
Robert Watson
12cef7aa96 Add a man page for stack(9).
MFC after:	1 week
2007-11-27 11:02:41 +00:00
Christian Brueffer
23ae24e09a Bump .Dd for previous revision. 2007-11-26 15:21:21 +00:00
Christian Brueffer
4faa4b080e Clean up after previous revision. 2007-11-25 16:14:32 +00:00
Attilio Rao
0e933b2f3c Update sx(9) lock manpage in order to add missing prototypes for function
sx_slock_sig() and sx_xlock_sig() and their respective explanation.
2007-11-25 01:55:53 +00:00
Attilio Rao
6442838d08 Update rwlock(9) manpage adding missing bits about the rw_init_flags()
function, its options and explaining that recursion for writers can be
selectively enabled.

Reported by: rwatson, Skip Ford <skip at menantico dot com>
2007-11-25 01:53:58 +00:00
Gabor Kovesdan
521a179014 - Add callout_init_rw.9 to MLINKS of timeout.9
Forgotten by:	gabor
Reminded by:	ru
2007-11-20 14:13:49 +00:00
Gabor Kovesdan
53b41930df - Document newly added callout_init_rw function
Requested by:	attilio
Reviewed by:	attilio
2007-11-20 12:21:36 +00:00
Ruslan Ermilov
bfbdccc1d1 Sort. 2007-11-13 20:26:27 +00:00
Christian Brueffer
c6d7cf7bc4 More cleanup. 2007-11-11 19:40:46 +00:00
Robert Watson
a1b36788c2 Hook up rmlock(9) and its links to the build. 2007-11-10 16:47:38 +00:00
Robert Watson
433ea89af4 Add rm_wowned(9) function to test whether the current thread owns an
exclusive lock on the passed rmlock.

Reviewed by:	ups
2007-11-10 15:06:30 +00:00
Hiten Pandya
989cbe408e Clean up the rmlock(9) manual page:
* Correct spelling and grammar
    * Re-structure sentences in BUGS section for legibility
    * Break long lines appropriately
    * Break lines at full stops
    * Add mdoc(9) commands where applicable
    * Remove superfluous .Ft in the SYNOPSIS section
    * Various other mdoc(9) fixes
2007-11-10 06:04:46 +00:00
Stephan Uphoff
f53d15fe1b Initial checkin for rmlock (read mostly lock) a multi reader single writer
lock optimized for almost exclusive reader access. (see also rmlock.9)

TODO:
    Convert to per cpu variables linkerset as soon as it is available.
    Optimize UP (single processor)  case.
2007-11-08 14:47:55 +00:00
Giorgos Keramidas
5dde2b655c mdoc fix: Add missing .El request
MFC after:	3 days
2007-10-30 16:04:23 +00:00
Julian Elischer
39b920eb0c Doc police fixes
thanks to: ru@
2007-10-26 16:50:21 +00:00
Ruslan Ermilov
5d40d4a597 Sort MLINKS. 2007-10-26 11:01:17 +00:00
Julian Elischer
4960b2adf0 catch up with the code. 2007-10-26 08:28:45 +00:00
Julian Elischer
cae927b25f Note the temporary removal of these functions. 2007-10-21 02:45:57 +00:00
Julian Elischer
d91be65fa7 This was kthread.9
it has  been duplicated to kproc.9

kthread.9 will continue on to describe the coming kthread_xxx
functions which will actually make threads.
2007-10-21 02:40:28 +00:00
Alexander Leidinger
9f05d312b3 Backout sensors framework.
Requested by:	phk
Discussed on:	cvs-all
2007-10-15 20:00:24 +00:00
Ruslan Ermilov
3ec523c017 Fix mdoc. 2007-10-14 19:11:01 +00:00
Alexander Leidinger
99f6b270e3 Import OpenBSD's sysctl hardware sensors framework.
This commit includes the following core components:

 * sample configuration file for sensorsd
 * rc(8) script and glue code for sensorsd(8)
 * sysctl(3) doc fixes for CTL_HW tree
 * sysctl(3) documentation for hardware sensors
 * sysctl(8) documentation for hardware sensors
 * support for the sensor structure for sysctl(8)
 * rc.conf(5) documentation for starting sensorsd(8)
 * sensor_attach(9) et al documentation
 * /sys/kern/kern_sensors.c
   o sensor_attach(9) API for drivers to register ksensors
   o sensor_task_register(9) API for the update task
   o sysctl(3) glue code
   o hw.sensors shadow tree for sysctl(8) internal magic
 * <sys/sensors.h>
 * HW_SENSORS definition for <sys/sysctl.h>
 * sensors display for systat(1), including documentation
 * sensorsd(8) and all applicable documentation

The userland part of the framework is entirely source-code
compatible with OpenBSD 4.1, 4.2 and  -current as of today.

All sensor readings can be viewed with `sysctl hw.sensors`,
monitored in semi-realtime with `systat -sensors` and also
logged with `sensorsd`.

Submitted by:	Constantine A. Murenin <cnst@FreeBSD.org>
Sponsored by:	Google Summer of Code 2007 (GSoC2007/cnst-sensors)
Mentored by:	syrinx
Tested by:	many
OKed by:	kensmith
Obtained from:	OpenBSD (parts)
2007-10-14 10:45:31 +00:00
Marius Strobl
2e01823535 Add an MLINKS for pci_find_dbsf.9.
Submitted by:	ru
Approved by:	re (gnn)
2007-10-05 22:50:44 +00:00
Marius Strobl
55aaf894e8 Make the PCI code aware of PCI domains (aka PCI segments) so we can
support machines having multiple independently numbered PCI domains
and don't support reenumeration without ambiguity amongst the
devices as seen by the OS and represented by PCI location strings.
This includes introducing a function pci_find_dbsf(9) which works
like pci_find_bsf(9) but additionally takes a domain number argument
and limiting pci_find_bsf(9) to only search devices in domain 0 (the
only domain in single-domain systems). Bge(4) and ofw_pcibus(4) are
changed to use pci_find_dbsf(9) instead of pci_find_bsf(9) in order
to no longer report false positives when searching for siblings and
dupe devices in the same domain respectively.
Along with this change the sole host-PCI bridge driver converted to
actually make use of PCI domain support is uninorth(4), the others
continue to use domain 0 only for now and need to be converted as
appropriate later on.
Note that this means that the format of the location strings as used
by pciconf(8) has been changed and that consumers of <sys/pciio.h>
potentially need to be recompiled.

Suggested by:	jhb
Reviewed by:	grehan, jhb, marcel
Approved by:	re (kensmith), jhb (PCI maintainer hat)
2007-09-30 11:05:18 +00:00
Gabor Kovesdan
9d77e05aff - Change the description of sleepq_add(), sleepq_broadcast() and
sleepq_signal() to reflect recent changes

Submitted by:	attilio
Approved by:	re (bmah)
2007-09-28 11:13:40 +00:00
Gabor Kovesdan
376ccd5c9d - Fix a declaration example
PR:		docs/115632
Submitted by:	Romain Tartiere <romain@blogreen.org>
Approved by:	re (bmah)
MFC after:	3 days
2007-09-20 10:52:08 +00:00
Christian Brueffer
b61e8b3e31 Update the table of supported algorithms:
- Group hash functions together and sort
- Add CRYPTO_CAMELLIA_CBC (1)

PR:		116471
Submitted by:	Philip Schulz <phs@deadc0.de> (1)
Approved by:	re (blanket)
2007-09-19 16:28:46 +00:00
Robert Watson
bdec1ad988 Add MLINKS entries for various SYSCTL_*() macros documented in sysctl.9.
Approved by:	re (bmah)
Submitted by:	Constantine A. Murenin <cnst+freebsd@bugmail.mojo.ru>
Sponsored by:	Google Summer of Code 2007
2007-09-05 19:46:23 +00:00
Daniel Gerzo
628a706c96 - Fix include path, these functions were moved to sys/priv.h.
Approved by:	re (bmah)
Submitted by:	sbahra@hpcl.seas.gwu.edu (via #bsddocs@EFnet)
Pointy hat to:	rwatson
2007-08-30 15:03:21 +00:00
Julian Elischer
20f16ca028 Corrections and clarifications
Approved by: re (bmah)
2007-08-09 21:09:56 +00:00
Maxim Konovalov
3d9b9e59cf o round-type -> round-trip.
PR:		docs/115082
Submitted by:	Jordan Gordeev
Approved by:	re (kensmith)
MFC after:	1 week
2007-08-05 07:38:09 +00:00
Remko Lodder
31a35b79dd Update the sysctl_ctx_init(9) manual page with the following
information from the submitter:

Starting value for OID_AUTO was changed from 100 to 256 (0x100) in
kern/kern_sysctl.c#rev1.112 on 2001-07-25, and defined as
CTL_AUTO_START in sys/sysctl.h#rev1.98.

Submitted by:	cnst
Silence from:	#bsddocs on efnet
MFC After:	3 days
Approved by:	re (bmah)
2007-07-27 19:55:42 +00:00
Alan Cox
40e4089d34 Document support for M_NOWAIT by the new implementation of contigmalloc(9)
in HEAD.

Approved by:	re (hrs)
Reviewed by:	Michael Plass
2007-07-19 17:23:20 +00:00
Florent Thoumie
b68038fa8c Note that module should return EOPNOTSUPP for both unrecognized
*and* unsupported values of `what'.

Submitted by:	kevlo
Discussed on:	cvs-doc@
Approved by:	re (hrs)
MFC after:	3 days
2007-07-19 11:22:34 +00:00
John-Mark Gurney
f616cf330e document the call to wakeup after a task has been run...
Approved by:	re (hrs)
MFC after:	3 days
2007-07-09 06:24:10 +00:00
Andrew Thompson
069441f718 Remove wicontrol(8) from the base system. Using wicontrol to configure an
interface has been deprecated since 5.1, wi(4) wireless interfaces are managed
via the net80211 stack and ifconfig.

Approved by:	re (rwatson)
2007-07-01 10:25:07 +00:00
Robert Watson
6b25fa2abb Update suser(9) and priv(9) to document that the 'flags' argument is now
unused -- SUSER_RUID and SUSER_ALLOWJAIL are no longer defined or used.

Approved by:	re (bmah)
2007-06-26 23:12:05 +00:00
Christian Brueffer
3111fc98d5 Remove duplicate xref and add missing commas.
PR:		113891
Submitted by:	pluknet <pluknet@gmail.com>
Approved by:	re (blanket)
2007-06-21 16:39:25 +00:00
Nate Lawson
dcb5531bb2 The struct selinfo pointed to by *sip MUST be zeroed before calling
selrecord() or selwake*().  Otherwise, a panic may occur.

MFC after:	1 day
2007-06-14 22:38:50 +00:00
Warner Losh
3fbc4c1e37 bump date for 1.20 2007-06-05 20:53:18 +00:00
Warner Losh
8effe33f10 Add note about condvars not working with spin locks. 2007-06-05 20:45:10 +00:00
Konstantin Belousov
e3e7f469a0 Update man page for VOP_OPEN() after fdidx->fp conversion.
Reminded by: ru
2007-06-05 10:48:29 +00:00
Remko Lodder
a1f6cb79d9 Correct the referenced securelevel document, it's now securelevel 7.
Pointed out by:	ru
2007-06-02 20:15:59 +00:00
Xin LI
f9d63aec3f Markup fixes. 2007-06-01 03:11:47 +00:00
Warner Losh
fbe508ffba Giant is special. How do I love thee? Let me count the ways?
errr, I mean "Enumerate how the giant lock differs from other locks"

Please let me know if I missed any.  Or misrepresented any...

Reviewed by: ssouhlal@
2007-05-31 00:05:59 +00:00
Warner Losh
81c968ebb5 Improve both the PCI and PC Card descriptions of the RID. 2007-05-27 20:49:08 +00:00
John Baldwin
7ec137e5b0 Rename the macros for assertion flags passed to sx_assert() from SX_* to
SA_* to match mutexes and rwlocks.  The old flags still exist for
backwards compatiblity.

Requested by:	attilio
2007-05-19 21:26:05 +00:00
John Baldwin
2b9573af36 Document sx_xholder(). 2007-05-19 20:24:32 +00:00
John Baldwin
e45907c90e Document SX_RECURSE flag. 2007-05-19 16:38:10 +00:00
Andrew Thompson
b84a4e0cf2 Link the defunct MUTEX_PROFILING option to LOCK_PROFILING. 2007-05-13 22:56:58 +00:00
Pav Lucistnik
1cf95db60f Remove cred argument, which was removed from code by phk two years ago
PR:		docs/110200
Submitted by:	Jamie Jones <jamie@bishopston.net>
MFC after:	1 week
2007-05-12 13:10:55 +00:00
Christian Brueffer
77213b87eb Bump date for previous commit, also new sentence -> new line. 2007-05-09 05:05:50 +00:00
John-Mark Gurney
2557913d4b Document the additional fields, si_drv1 and si_drv2 that are available
for the user to use...

MFC after:	1 week
2007-05-06 18:20:16 +00:00
Wojciech A. Koszek
fe2e562728 Add missing 'bp', since it should be passed as g_print_bio() argument.
Oked by:	pjd
2007-05-06 12:48:39 +00:00
Pawel Jakub Dawidek
d0c11f9eb7 - Extend disk structure to allow to store disk's serial number, which can be
retrieved via GEOM::ident attribute.
- Bump disk(9) ABI version.

OK'ed by:	phk
2007-05-05 17:12:15 +00:00
John-Mark Gurney
bc95681198 Document requirements to calling rman_init... (Hmmm, maybe we should make
these areguments to rman_init?)

MFC after:	1 week
2007-04-29 19:46:33 +00:00
John-Mark Gurney
ebf750a9fd Complete removal of restriction about overlaps to rman_manage_region:
remove comment and man page verbage...

Document return values for rman_init and rman_manage_region..

MFC after:	1 week
2007-04-28 07:37:49 +00:00
Christian Brueffer
880a3b451f Xref linsysfs(5).
MFC after:	3 days
2007-04-20 15:38:06 +00:00
Andrew Thompson
6429a5cb9b Fix a compiler warning so hash.h can be included in the kernel. This changes
the args for hash32_stre and hash32_strne but there are no consumers in the
base system and openbgpd does not use it which the initial import was for.

Silence on:	hackers
2007-04-09 22:55:14 +00:00
Pawel Jakub Dawidek
4e9f341722 Bump date. 2007-04-05 21:17:52 +00:00
Pawel Jakub Dawidek
f3a8d2f93c Add security.jail.mount_allowed sysctl, which allows to mount and
unmount jail-friendly file systems from within a jail.
Precisely it grants PRIV_VFS_MOUNT, PRIV_VFS_UNMOUNT and
PRIV_VFS_MOUNT_NONUSER privileges for a jailed super-user.
It is turned off by default.

A jail-friendly file system is a file system which driver registers
itself with VFCF_JAIL flag via VFS_SET(9) API.
The lsvfs(1) command can be used to see which file systems are
jail-friendly ones.

There currently no jail-friendly file systems, ZFS will be the first one.
In the future we may consider marking file systems like nullfs as
jail-friendly.

Reviewed by:	rwatson
2007-04-05 21:03:05 +00:00
Maxim Konovalov
8ad9c32345 o Document vdropl(9) [1].
o Add an MLINK for vdropl().

Reviewed by:	des [1]
Obtained from:	wording from vgone(9)
2007-04-01 09:48:59 +00:00
John Baldwin
4e7f640dfb Optimize sx locks to use simple atomic operations for the common cases of
obtaining and releasing shared and exclusive locks.  The algorithms for
manipulating the lock cookie are very similar to that rwlocks.  This patch
also adds support for exclusive locks using the same algorithm as mutexes.

A new sx_init_flags() function has been added so that optional flags can be
specified to alter a given locks behavior.  The flags include SX_DUPOK,
SX_NOWITNESS, SX_NOPROFILE, and SX_QUITE which are all identical in nature
to the similar flags for mutexes.

Adaptive spinning on select locks may be enabled by enabling the
ADAPTIVE_SX kernel option.  Only locks initialized with the SX_ADAPTIVESPIN
flag via sx_init_flags() will adaptively spin.

The common cases for sx_slock(), sx_sunlock(), sx_xlock(), and sx_xunlock()
are now performed inline in non-debug kernels.  As a result, <sys/sx.h> now
requires <sys/lock.h> to be included prior to <sys/sx.h>.

The new kernel option SX_NOINLINE can be used to disable the aforementioned
inlining in non-debug kernels.

The size of struct sx has changed, so the kernel ABI is probably greatly
disturbed.

MFC after:	1 month
Submitted by:	attilio
Tested by:	kris, pjd
2007-03-31 23:23:42 +00:00
Julian Elischer
a280550abf Add some cross references to locking.9 from related pages. 2007-03-30 18:07:26 +00:00
Julian Elischer
27c20cc4b8 Connect the locking man page to the build.
Next step is to add it as a "See Also" to related man pages.
2007-03-30 17:56:19 +00:00
Christian Brueffer
ffdb86fe9a New sentence -> new line 2007-03-28 21:21:22 +00:00
Maxim Konovalov
1f43095400 o Trim unneeded backslash. 2007-03-28 04:43:55 +00:00
Maxim Konovalov
dd3c9f51e5 o Actually add MLINKs for priv(9) functions. 2007-03-28 04:41:50 +00:00
Nick Hibma
36eab02467 Clarify the definition of the watchdog kernel interface by moving a sentence up
to the sentence it references.
2007-03-27 21:23:20 +00:00
Christian Brueffer
09dfbddbda Add MLINKs for priv(9) functions. 2007-03-27 21:20:57 +00:00
John Baldwin
8f27b08e87 Rename the cv_*wait*() functions to _cv_*wait*() and change their second
argument from a mutex to a lock_object.  Add cv_*wait*() wrapper macros
that accept either a mutex, rwlock, or sx lock as the second argument and
convert it to a lock_object and then call _cv_*wait*().  Basically, the
visible difference is that you can now use rwlocks and sx locks with
condition variables using the same API as with mutexes.
2007-03-21 22:22:13 +00:00
Xin LI
46d98f5737 - Remove an unneeded comma
- Remove a redundant .Xc
 - Spell "Largely" as it should.
2007-03-19 07:49:11 +00:00
Julian Elischer
4ff78a9ca8 More corrections, this time from Wojciech Koszek 2007-03-18 19:28:44 +00:00
Julian Elischer
53882c7c96 Spelling and whitespace fixes from Dunne Whitty 2007-03-18 18:57:38 +00:00
Christian Brueffer
2bf274778d Fix markup and reword a sentence to actually make sense. 2007-03-14 20:09:23 +00:00
Julian Elischer
626d3f9f41 fix braino in markup. 2007-03-14 17:33:16 +00:00
Bruce M Simpson
5e018b11ee Remove obsolete polling members from documentation for struct ifnet.
Submitted by:	Aniruddha Bohra
MFC after:	5 days
2007-03-14 13:19:50 +00:00
Julian Elischer
c2c54c3d82 More suggestions from pjd. 2007-03-14 06:27:02 +00:00
Julian Elischer
34e1b9e5f0 Some comments from pjd 2007-03-14 06:12:36 +00:00
Julian Elischer
0929bf8e57 Add locking.9
This is supposed to be a brief overview of the locking primatives.
It is not yet complete and contains many place-holders for information
I do not know.

The locking is getting so diverse that I've lost track of it all.
We need this page to keep outselves in sync with what the primitives do.

note.. not part of the build yet.
2007-03-14 04:00:24 +00:00
Greg Lehey
6238e679b7 Typo. 2007-03-13 03:56:16 +00:00
John Baldwin
e7573e7ad7 Allow threads to atomically release rw and sx locks while waiting for an
event.  Locking primitives that support this (mtx, rw, and sx) now each
include their own foo_sleep() routine.
- Rename msleep() to _sleep() and change it's 'struct mtx' object to a
  'struct lock_object' pointer.  _sleep() uses the recently added
  lc_unlock() and lc_lock() function pointers for the lock class of the
  specified lock to release the lock while the thread is suspended.
- Add wrappers around _sleep() for mutexes (mtx_sleep()), rw locks
  (rw_sleep()), and sx locks (sx_sleep()).  msleep() still exists and
  is now identical to mtx_sleep(), but it is deprecated.
- Rename SLEEPQ_MSLEEP to SLEEPQ_SLEEP.
- Rewrite much of sleep.9 to not be msleep(9) centric.
- Flesh out the 'RETURN VALUES' section in sleep.9 and add an 'ERRORS'
  section.
- Add __nonnull(1) to _sleep() and msleep_spin() so that the compiler will
  warn if you try to pass a NULL wait channel.  The functions already have
  a KASSERT to that effect.
2007-03-09 22:41:01 +00:00
John Baldwin
32d2c58bd6 Document SLEEPQ_PAUSE. 2007-03-09 18:06:36 +00:00
John Baldwin
0a1d8ac624 Oof, it is not my day. Unswap the descriptions of EINTR and ERESTART. 2007-03-09 17:56:05 +00:00
John Baldwin
196baa968a Fix a typo in the last that claimed that only masked signals were caught. 2007-03-09 17:53:16 +00:00
John Baldwin
f499e49c46 Correct descriptions of EINTR and ERESTART errors. Masked signals don't
interrupt sleeps.  Rather, unmasked signals interrupt restarts and can
either interrupt the system call by having it return EINTR in userland or
force the system call to be restarted.
2007-03-09 17:52:10 +00:00
John Baldwin
e6b69890ed - Document cv_wait_unlock(9).
- Don't claim that the mutex is atomically reacquired when a cv_wait
  routine returns.  There's nothing atomic or magical about the lock
  reacquire.  The only magic is that we atomically drop the lock by
  placing the thread on the sleep queue before dropping the lock.
2007-03-09 16:59:27 +00:00
John Baldwin
b58aa2bde7 Place mtx_destroy() and rw_destroy() right after mtx_init() and rw_init()
to match sx(9) and condvar(9).
2007-03-09 16:54:03 +00:00
John Baldwin
cc61ffc3fb - Sort functions in the order that rwlock(9) and mutex(9) use.
- Markup sx_unlock() as a function rather than saying it is a macro.
  The macro part is an implementation detail, and all the other sx_*lock()
  functions are actually macros, too.
- Use the same style as rwlock(9) and mutex(9) to markup sx_assert() and
  SX_SYSINIT() with respect to headers and kernel options.
- Add a missing MLINK.
2007-03-09 16:52:26 +00:00
John Baldwin
7d3052bbc4 - Sort rwlock functions similar to the order in mutex(9).
- Add a missing MLINK.
2007-03-09 16:44:58 +00:00
John Baldwin
2f46d62192 Some minor tweaks and updates to bus_dma(9) including some additional notes
on the address filter and locking callback.

Reviewed by:	ru, scottl
2007-03-06 17:32:49 +00:00
Kirk McKusick
a9093e846d Move macros describing extended attributes in UFS from
<sys/extattr.h> to <ufs/ufs/extattr.h>. Move description
of extended attributes in UFS from man9/extattr.9 to
man5/fs.5.

Note that restore will not compile until <sys/extattr.h>
and <ufs/ufs/extattr.h> have been updated.

Suggested by:	Robert Watson
2007-03-06 08:13:21 +00:00
Greg Lehey
1c5fcea18d Another typo.
Spotted by:             ru
Another pointy hat to:  grog
2007-03-05 05:59:49 +00:00
Greg Lehey
c907770c56 Cosmetics: remove trailing white space, wrap over-long lines.
Pointy hat to:  grog
2007-03-05 00:27:30 +00:00
Greg Lehey
759ace7eca Rearrange function descriptions in more logical order.
Be less alarmist about the dangers of abusing wakeup_one().

Requested by: kris, imp
2007-03-04 23:42:58 +00:00
Ruslan Ermilov
92cb9e01dc Markup polishing. 2007-03-04 19:04:39 +00:00
Chad David
6c2478125a Add vfs_getopt.9 to the build, and add links for related functions. 2007-03-02 17:03:56 +00:00
Chad David
cbd01db412 Document the mount option handling functions.
Reviewed By: ru
2007-03-02 17:03:06 +00:00
Ruslan Ermilov
e69b11c87d Remove trailing spaces and make the date canonical. 2007-03-01 14:33:29 +00:00
Paolo Pisati
e0526e6088 Update bus_setup_intr() man page after recent newbus modification:
o uniform the driver_intr_t parameter name to 'ithread'

o delete any reference to INTR_FAST

o document a bit the difference between the filter and ithread
  argument

Reviewed by: mdoc-police (ru)
2007-02-28 23:13:41 +00:00
Greg Lehey
8866174561 Furhter clarifications:
- the issues with wakeup_one are due to address space clashes between
  unrelated groups of threads.
- sleep() was removed in FreeBSD 2.2.
- date the page today, not 4 days ago.
- replace grammatically correct "woken" with "woken up" for
  consistency with the function name.
2007-02-27 23:09:31 +00:00
John Baldwin
a198b356e5 In FreeBSD 5.x+, sleep/wakeup operate on threads, not processes. 2007-02-27 16:32:55 +00:00
Ruslan Ermilov
7700fc3ca9 Fix markup and grammar bugs in recent revisions. 2007-02-27 16:21:01 +00:00
Greg Lehey
fc5fe41fe9 Update HISTORY.
Reviewed by:	dmr
2007-02-27 05:39:22 +00:00
Greg Lehey
5af924bf6c Add warning about deadlocks created by use of wakeup_one. 2007-02-27 02:51:41 +00:00
Robert Watson
149b6b0b12 Add rw_wowned(9) symlink. 2007-02-26 19:09:36 +00:00
Robert Watson
dd348217d7 Update rwlock(9) for rw_wowned(). 2007-02-26 19:07:41 +00:00
Bruce M Simpson
d305f4b99e Document m_pulldown().
Obtained from:	MBUF issues in 4.4BSD IPv6/IPsec support (itojun)
2007-02-26 15:17:19 +00:00
Kirk McKusick
fdece2b8f7 Declare a `struct extattr' that defines the format of an extended
attribute. Also define some macros to manipulate one of these
structures. Explain their use in the extattr.9 manual page.

The next step will be to make a sweep through the kernel replacing
the old pointer manipulation code. To get an idea of how they would
be used, the ffs_findextattr() function in ufs/ffs/ffs_vnops.c is
currently written as follows:

/*
 * Vnode operating to retrieve a named extended attribute.
 *
 * Locate a particular EA (nspace:name) in the area (ptr:length), and return
 * the length of the EA, and possibly the pointer to the entry and to the data.
 */
static int
ffs_findextattr(u_char *ptr, u_int length, int nspace, const char *name,
    u_char **eap, u_char **eac)
{
	u_char *p, *pe, *pn, *p0;
	int eapad1, eapad2, ealength, ealen, nlen;
	uint32_t ul;

	pe = ptr + length;
	nlen = strlen(name);

	for (p = ptr; p < pe; p = pn) {
		p0 = p;
		bcopy(p, &ul, sizeof(ul));
		pn = p + ul;
		/* make sure this entry is complete */
		if (pn > pe)
			break;
		p += sizeof(uint32_t);
		if (*p != nspace)
			continue;
		p++;
		eapad2 = *p++;
		if (*p != nlen)
			continue;
		p++;
		if (bcmp(p, name, nlen))
			continue;
		ealength = sizeof(uint32_t) + 3 + nlen;
		eapad1 = 8 - (ealength % 8);
		if (eapad1 == 8)
			eapad1 = 0;
		ealength += eapad1;
		ealen = ul - ealength - eapad2;
		p += nlen + eapad1;
		if (eap != NULL)
			*eap = p0;
		if (eac != NULL)
			*eac = p;
		return (ealen);
	}
	return(-1);
}

After applying the structure and macros, it would look like this:

/*
 * Vnode operating to retrieve a named extended attribute.
 *
 * Locate a particular EA (nspace:name) in the area (ptr:length), and return
 * the length of the EA, and possibly the pointer to the entry and to the data.
 */
static int
ffs_findextattr(u_char *ptr, u_int length, int nspace, const char *name,
    u_char **eapp, u_char **eac)
{
	struct extattr *eap, *eaend;

	eaend = (struct extattr *)(ptr + length);
	for (eap = (struct extattr *)ptr; eap < eaend; eap = EXTATTR_NEXT(eap)){
		/* make sure this entry is complete */
		if (EXTATTR_NEXT(eap) > eaend)
			break;
		if (eap->ea_namespace != nspace ||
		    eap->ea_namelength != length ||
		    bcmp(eap->ea_name, name, length))
			continue;
		if (eapp != NULL)
			*eapp = eap;
		if (eac != NULL)
			*eac = EXTATTR_CONTENT(eap);
		return (EXTATTR_CONTENT_SIZE(eap));
	}
	return(-1);
}

Not only is it considerably shorter, but it hopefully more readable :-)
2007-02-26 06:18:53 +00:00
Ruslan Ermilov
066eef7a1d Remove the traces of vm_page_unmanage(). 2007-02-25 06:51:11 +00:00
John Baldwin
37e80fcac2 Add a new kernel sleep function pause(9). pause(9) is for places that
want an equivalent of DELAY(9) that sleeps instead of spins.  It accepts
a wmesg and a timeout and is not interrupted by signals.  It uses a private
wait channel that should never be woken up by wakeup(9) or wakeup_one(9).

Glanced at by:	phk
2007-02-23 16:22:09 +00:00
Robert Watson
9fad4c2a12 Refine implementation notes for priv(9): clarify ABI comments, mention
updating Jail's list of privileges.
2007-02-21 10:32:03 +00:00
Pawel Jakub Dawidek
eb62f84553 VFS_VPTOFH(9) was replaced with VOP_VPTOFH(9).
VFS_VPTOFH.9 was repo-copied to VOP_VPTOFH.9.

Repo-copy done by:	joe
2007-02-16 14:27:59 +00:00
Luigi Rizzo
ddb53abcd9 remove some leftover text and update the text to match the current version
of the code.
2007-02-15 17:52:17 +00:00
Robert Watson
db430f9709 Expand history and authors section of mbuf.9 man page to discuss recent
transition to mbuma (FreeBSD 5.3) and the fact that mbufs are now limited
almost entirely to packet storage, with straight UMA zones being used for
most other network data types.
2007-02-15 14:44:46 +00:00
John Baldwin
f4ad756aef MLINK for bus_dmamap_load_mbuf_sg(9) 2007-02-12 17:53:21 +00:00
Christian Brueffer
cbc64eb2f2 There is no isa(4) manpage, convert to normal text an join lines.
PR:		108980
Submitted by:	Yonatan
2007-02-09 21:12:21 +00:00
Christian Brueffer
afc4e93d96 Remove Xref to owi(4), it's dead and gone.
PR:		108980
Submitted by:	Yonatan
2007-02-09 20:32:58 +00:00
Luigi Rizzo
97070dd5e0 Document a little more the firmware subsystem.
Apart from minor cleanup of the text, it should document
in reasonable detail what the status of the code is.
RELENG_6 has some minor differences there in the way automatic
loading/unloading is handled, but hopefully this should be
fixed by MFC time.

The examples come from Max Laier and Sam Leffler.

MFC after: 1 week
2007-02-09 19:08:07 +00:00
Robert Watson
1b824bcfab s/software was developed/documentation was written/
Suggested by:	ru
2007-01-31 09:40:31 +00:00
Robert Watson
806c2dc9bf Add MLINKS for sf_buf.9. 2007-01-29 11:27:44 +00:00
Joel Dahl
9eca1342f5 Line break before "All rights reserved" in the license example.
Reveiwed by:	bde, rwatson
2007-01-28 20:51:04 +00:00