Commit Graph

1813 Commits

Author SHA1 Message Date
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
Robert Watson
5d668266bb Update pmap_extract() implementation notes: we appear no longer to serialize
this call with Giant on any platform.
2007-01-28 16:23:55 +00:00
Robert Watson
5a05988c32 Add a rudimentary man page for sf_bufs, based on my rudimentary
understanding of sf_bufs.
2007-01-28 16:07:50 +00:00
Robert Watson
0931399389 Fix minor type: "struct disk *" instead of "struct *disk".
MFC after:	3 days
2007-01-28 14:37:13 +00:00
Ruslan Ermilov
b902c5bc80 Fix grammar [1] and formatting.
Submitted by:	pluknet AT gmail DOT com [1]
2007-01-27 23:06:00 +00:00
Robert Watson
cbfb87359e Add a missing verb in describing MAP_PREFAULT_MADVISE. 2007-01-27 18:58:33 +00:00
Randall Stewart
b939bb368a Reviewed by: rwatson
Approved by:	gnn

Add a new function hashinit_flags() which allows NOT-waiting
for memory (or waiting). The old hashinit() function now
calls hashinit_flags(..., HASH_WAITOK);
2007-01-15 15:06:28 +00:00
Warner Losh
547569c05e Julian says that he doesn't need the advertising clause, so out it goes. 2007-01-09 04:17:20 +00:00
John-Mark Gurney
99be3bc6d9 Some how the d slipped out in the last commit, add it back...
Pointed out by:	mdoc-police (ru)
2006-12-29 22:30:10 +00:00
John-Mark Gurney
05f240c59c bump doc date and fix spelling...
Pointed out by:	mdoc-police (ru)
2006-12-28 22:28:28 +00:00
John-Mark Gurney
cd457d4e39 document that locks must not be aquired in f_event... (and where they
can be safely aquired)

Reminded by:	kib (by LOR #193)
MFC:	3 days
2006-12-28 19:15:12 +00:00
Pawel Jakub Dawidek
297507d08c Document MTX_NOPROFILE flag. 2006-12-21 22:42:18 +00:00
Robert Watson
66e7b3a361 Reference socket(9) from ng_ksocket(4). Reference ng_ksocket(4),
ithread(9), msleep(9), ucred(9) from socket(9).

Partly suggested by:	julian
2006-12-16 10:32:10 +00:00
Robert Watson
6a751174bd Add a basic man page for the socket(9) kernel programming interface used
by the NFS client and server, netsmb, netncp, etc.

Reviewed by:	ru
Fixed by:	ru
2006-12-15 23:35:15 +00:00
Nick Hibma
9079fff550 Align the interfaces for the various watchdogs and make the interface
behave as expected.

Also:
- Return an error if WD_PASSIVE is passed in to the ioctl as only
  WD_ACTIVE is implemented at the moment. See sys/watchdog.h for an
  explanation of the difference between WD_ACTIVE and WD_PASSIVE.
- Remove the I_HAVE_TOTALLY_LOST_MY_SENSE_OF_HUMOR define. If you've
  lost your sense of humor, than don't add a define.

Specific changes:

i80321_wdog.c
  Don't roll your own passive watchdog tickle as this would defeat the
  purpose of an active (userland) watchdog tickle.

ichwd.c / ipmi.c:
  WD_ACTIVE means active patting of the watchdog by a userland process,
  not whether the watchdog is active. See sys/watchdog.h.

kern_clock.c:
  (software watchdog) Remove a check for WD_ACTIVE as this does not make
  sense here. This reverts r1.181.
2006-12-15 21:44:49 +00:00
Mike Pritchard
9280e5fac2 Spelling fixes. 2006-12-14 14:33:13 +00:00
Ruslan Ermilov
ea0e76a28d - Fix prototype of bpf_filter().
- Document what passing it a zero buflen argument means.
2006-12-13 06:27:20 +00:00
Julian Elischer
1009bd1b0d Explicitly emphasize a facet of m_pullup() that some people seem to
frequently forget. i.e. that you can not keep using pointers to
within the old chain.
2006-12-08 23:44:30 +00:00
Ruslan Ermilov
c94d50f166 Give up on waiting for a repo-copy (no answer in 20 days), and
commit my markup fixes.

OK'ed by:	kmacy
2006-12-01 17:46:25 +00:00
Alfred Perlstein
8720d437a4 Bump .Dd, (9 year jump!)
Requested by: ru
cvs: ----------------------------------------------------------------------
2006-11-29 20:24:56 +00:00
Alfred Perlstein
82c1155773 Do a better job of documenting uio_resid. 2006-11-29 19:10:53 +00:00
David E. O'Brien
861ed04477 Clarify case body indention. 2006-11-26 21:22:49 +00:00
Warner Losh
f0bab87823 devsw() was removed by phk:
revision 1.199
	date: 2004/09/24 08:30:57;  author: phk;  state: Exp;  lines: +0 -1
	Remove the cdevsw() function which is now unused.

(the log is wrong, it was really devsw that was removed).

# we really need to actually document the functions in sys/conf.h as well
# as things like d_open...
2006-11-25 22:36:09 +00:00
Warner Losh
0cc1987013 Clarify what non-zero return values mean. 2006-11-25 22:34:01 +00:00
Warner Losh
1dfbd9c2f9 Make it clear that the device name may contain '/' characters to place
a device in a subdirectory.  Also explicitly state that the name is
constructed using fmt like printf would print it.

MFC After: 3 days
2006-11-24 13:10:30 +00:00
Yaroslav Tykhiy
91f3a6db54 Add a guideline for naming new sysctl nodes.
Discussed in:	cvs-src (some time ago)
2006-11-23 14:28:19 +00:00
Ceri Davies
9698be466e Add .Xr to p_cansee.9, remove .Xr to intro.2.
Reviewed by:	ru
Approved by:	ru
2006-11-19 13:36:04 +00:00
Ceri Davies
9bda7d940b Add manuals for cr_cansee(9) and p_cansee(9).
Thanks to Ruslan for the time he spent reviewing these.

Reviewed by:	ru
Approved by:	ru
2006-11-19 13:35:03 +00:00
Ceri Davies
5140328ad3 Have the synopsis compile.
Pointed out by:	ru
2006-11-18 17:56:59 +00:00
Pawel Jakub Dawidek
7ee07175af Change sleepq_add(9) argument from 'struct mtx *' to 'struct lock_object *',
which allows to use it with different kinds of locks. For example it allows
to implement Solaris conditions variables which will be used in ZFS port on
top of sx(9) locks.

Reviewed by:	jhb
2006-11-16 01:02:00 +00:00
Ruslan Ermilov
cd852a2996 Fix build (forgotten MUTEX_PROFILING.9 -> LOCK_PROFILING.9). 2006-11-11 08:59:34 +00:00
Ruslan Ermilov
cbdbe9c47c Replace a reference to no longer existing MUTEX_PROFILING(9) with
a LOCK_PROFILING(9).
2006-11-11 08:41:39 +00:00
Kip Macy
3246dd49fc remove man page for no longer extant option 2006-11-11 06:31:27 +00:00
Kip Macy
d3a96a51cc man page for new option 2006-11-11 06:29:36 +00:00
Ruslan Ermilov
e045a8e698 Fix markup. 2006-11-06 14:28:09 +00:00
Ruslan Ermilov
99c0121e05 Bump document date. 2006-11-06 14:26:43 +00:00
Robert Watson
800c940832 Add a new priv(9) kernel interface for checking the availability of
privilege for threads and credentials.  Unlike the existing suser(9)
interface, priv(9) exposes a named privilege identifier to the privilege
checking code, allowing more complex policies regarding the granting of
privilege to be expressed.  Two interfaces are provided, replacing the
existing suser(9) interface:

suser(td)                 ->   priv_check(td, priv)
suser_cred(cred, flags)   ->   priv_check_cred(cred, priv, flags)

A comprehensive list of currently available kernel privileges may be
found in priv.h.  New privileges are easily added as required, but the
comments on adding privileges found in priv.h and priv(9) should be read
before doing so.

The new privilege interface exposed sufficient information to the
privilege checking routine that it will now be possible for jail to
determine whether a particular privilege is granted in the check routine,
rather than relying on hints from the calling context via the
SUSER_ALLOWJAIL flag.  For now, the flag is maintained, but a new jail
check function, prison_priv_check(), is exposed from kern_jail.c and used
by the privilege check routine to determine if the privilege is permitted
in jail.  As a result, a centralized list of privileges permitted in jail
is now present in kern_jail.c.

The MAC Framework is now also able to instrument privilege checks, both
to deny privileges otherwise granted (mac_priv_check()), and to grant
privileges otherwise denied (mac_priv_grant()), permitting MAC Policy
modules to implement privilege models, as well as control a much broader
range of system behavior in order to constrain processes running with
root privilege.

The suser() and suser_cred() functions remain implemented, now in terms
of priv_check() and the PRIV_ROOT privilege, for use during the transition
and possibly continuing use by third party kernel modules that have not
been updated.  The PRIV_DRIVER privilege exists to allow device drivers to
check privilege without adopting a more specific privilege identifier.

This change does not modify the actual security policy, rather, it
modifies the interface for privilege checks so changes to the security
policy become more feasible.

Sponsored by:		nCircle Network Security, Inc.
Obtained from:		TrustedBSD Project
Discussed on:		arch@
Reviewed (at least in part) by:	mlaier, jmg, pjd, bde, ceri,
			Alex Lyashkov <umka at sevcity dot net>,
			Skip Ford <skip dot ford at verizon dot net>,
			Antoine Brodin <antoine dot brodin at laposte dot net>
2006-11-06 13:37:19 +00:00
Pawel Jakub Dawidek
162ce1a75f When the source and destination objects for VOP_RENAME() are the same,
POSIX advice to just ignore the operation and return 0.
We already handle this case in kern_rename(), but don't give bad example -
the source is not removed.
2006-11-04 23:59:51 +00:00
Pawel Jakub Dawidek
479a8f8dd7 VOP_REMOVE() doesn't unlock vnodes nor decrease reference counts. 2006-11-04 23:58:15 +00:00
Pawel Jakub Dawidek
89780ffb72 Better English.
Submitted by:	ru
2006-11-01 12:44:28 +00:00
Pawel Jakub Dawidek
2c0ea12df5 - Document two new function g_alloc_bio() and g_duplicate_bio().
- Bump modification date.
- Update copyright years.
2006-11-01 12:42:14 +00:00
Pawel Jakub Dawidek
c4639cb3d8 Document BIO_FLUSH request. 2006-11-01 12:34:35 +00:00
Pawel Jakub Dawidek
1d2aee20b8 Add a new disk flag - DISKFLAG_CANFLUSHCACHE, which indicates that the disk
can handle BIO_FLUSH requests.

Sponsored by:	home.pl
2006-10-31 21:12:43 +00:00
Maxim Konovalov
efc7cb843b o Fix incorrect function name (kobj_free -> kobj_delete).
Obtained from:	DragonFlyBSD
MFC after:	1 week
2006-10-28 10:57:35 +00:00
Ruslan Ermilov
aa7331bf20 Bump document date for the previous change. 2006-10-21 16:08:21 +00:00
Ruslan Ermilov
a341ab7170 Add missing "const" qualifiers.
Submitted by:	bde
2006-10-19 11:03:44 +00:00
Daniel Gerzo
627a09e3c1 Expand "don't".
Approved by: trhodes (mentor), keramida (mentor)
MFC after: 3 days
2006-10-16 07:59:05 +00:00
Pawel Jakub Dawidek
a1a72ac75a Explain that using 64bit arguments on 32bit architectures with CTRx()
macros is a bad idea.
2006-10-15 12:40:27 +00:00
Ruslan Ermilov
72377e4c4b Sort MAN and MLINKS lists. 2006-10-05 12:40:44 +00:00
John-Mark Gurney
32d5d9ffc9 sort MLINKS properly
Pointed out by:	ru
2006-10-05 08:55:35 +00:00
Ruslan Ermilov
74a603eb00 Polish markup and some wording.
Discussed with:	jmg (also reviewed by him)
2006-10-05 08:42:07 +00:00
John-Mark Gurney
b5cc2eb72f forgot to update the date... 2006-10-04 20:17:14 +00:00
John-Mark Gurney
90db62aca6 add man page talking about how to interface w/ the kqueue system so others
can write additional filters...

mdoc police please!
2006-10-04 20:16:23 +00:00
Andre Oppermann
b2c1b09193 Connect hash(9) to the build and add MLINKS for all functions.
Pointed out by:	ru
2006-10-02 11:51:25 +00:00
Konstantin Belousov
7251f55777 Remove long untrue note about storing state information inside free items.
OKed by:	rwatson, tegge
Approved by:	pjd (mentor)
MFC after:	1 week
2006-10-02 07:27:00 +00:00
Ruslan Ermilov
bd84dd2f8f Revise markup. 2006-09-30 17:09:59 +00:00
Warner Losh
fa81ece897 Document config_intrhook.
MFC After: 250 millifortnights
2006-09-25 20:12:13 +00:00
Ruslan Ermilov
81ae4b8da9 Markup fixes. 2006-09-18 15:24:20 +00:00
Ruslan Ermilov
a3a57e81b3 Correct the list of bus_space_*_stream_[1248] functions in the
STREAM FUNCTIONS section:

- Really list only and all *_stream_* functions.
- Don't list their arguments (it's pointless).
2006-09-18 14:31:03 +00:00
Warner Losh
32494417a8 Bump date, per ru@ 2006-09-12 15:48:22 +00:00
Warner Losh
788de9d472 Add note about identify routines needing to use BUS_ADD_CHILD rather
than device_add_child.  The latter is only for busses adding children,
not children drivers telling a bus that they have an instance...
2006-09-11 22:17:18 +00:00
Ruslan Ermilov
590fd053c0 Document that bits are numbered from 1 in the %b format argument. 2006-09-08 14:05:03 +00:00
John-Mark Gurney
d1c32d02b6 now that we have bus_get_dma_tag, document it's requirement in
bus_dma_tag_create
2006-09-03 00:31:21 +00:00
Ruslan Ermilov
07bf564cab - Fix some bugs in the descriptions of DMA sync operations.
- Tweak some text so it's less likely to confuse the reader.

OK'ed by:	scottl
2006-08-31 19:38:52 +00:00
Pawel Jakub Dawidek
44689dc087 Update. 2006-08-26 11:32:40 +00:00
Pav Lucistnik
2eec31dfb4 - Talk about memory allocation in interrupt context
- Add uam to see also

Submitted by:	Devon H. O'Dell <devon.odell@coyotepoint.com>
2006-08-25 19:04:42 +00:00
Konstantin Belousov
653ed924e4 Note that LK_UPGRADE may drop the shared lock before taking the
exclusive one.

Reviewed and edited by:	tegge
MFC after:	3 days
Approved by:	pjd (mentor)
2006-08-21 12:45:19 +00:00
David E. O'Brien
c157a036a9 Add an extension to the UINT & ULONG types. The XINT & XLONG types behave
the same, except sysctl(8) will print out the values in hex.
2006-08-12 23:33:10 +00:00
David E. O'Brien
b470b929f3 Fix bug preventing the proper displaying of the CTLFLAG_WR option. 2006-08-12 20:09:33 +00:00
Maxim Konovalov
1cb58a0783 o GC MT_FTABLE removed in rev. 1.192 mbuf.h.
o Correct MT_HEADER define.
2006-07-24 07:32:23 +00:00
Florent Thoumie
f1acac210b Fix typo (s/writeer/writer/). 2006-07-17 10:39:20 +00:00
Maxim Konovalov
533baf579b o Sort sx(9) MLINKS. 2006-07-12 19:12:16 +00:00
Pawel Jakub Dawidek
d8e7058159 Document sx_xlocked(9).
Submitted by:	ssouhlal
2006-07-12 15:40:35 +00:00
Joel Dahl
b4b4e2e0fe Gah. Replace another instance of "Developer's Handbook" with
"Architecture Handbook".
2006-07-11 16:26:40 +00:00
Joel Dahl
ca5195cb7a The TrustedBSD MAC Framework is documented in the Architecture handbook,
not in the Developers handbook.

Submitted by:	Samy Al Bahra
2006-07-10 20:51:30 +00:00
Maxim Konovalov
88fd7e1d61 o Fix MTX_SYSINIT prototype.
PR:		kern/99956
Submitted by:	Arne Woerner
MFC after:	1 week
2006-07-09 09:46:43 +00:00
Maxim Konovalov
f3a331b7c8 o Remove LK_REENABLE and LK_NOPAUSE lockinit(9) flags, add LK_NOSHARE.
MFC after:	1 week
2006-06-20 21:41:14 +00:00
Maxim Konovalov
ce916253e4 o Catch up v_flag split and replace VSYSTEM by VV_SYSTEM.
Inspired by:	jkoshy's commit to vgone.9
2006-06-08 04:39:02 +00:00
Joseph Koshy
b415bf77aa Catch up with the rename of symbol VDOOMED to VI_DOOMED in revision
1.198 of "sys/sys/vnode.h".  Remove a cross-reference to a manual
page that never existed.

---------------------------------------------------------------------- CVS:
PR:              Fill this in if a GNATS PR is affected by the
change.  CVS: Submitted by:    Fill this in if someone else sent
in the change.  CVS: Reviewed by:     Fill this in if someone else
reviewed your modification.  CVS: Approved by:     Fill this in if
you needed approval for this commit.  CVS: Obtained from:   Fill
this in if the change is from third party software.  CVS: MFC after:
N [day[s]|week[s]|month[s]] CVS:    Fill in to get MFC notification
later. (days assumed unless specified) CVS:
---------------------------------------------------------------------- CVS:
Enter Log.  Lines beginning with `CVS:' are removed automatically
2006-06-07 16:51:54 +00:00
Pawel Jakub Dawidek
3b72821f02 Document more bits.
Reviewed by:	brd
2006-06-03 23:39:13 +00:00
Warner Losh
9f14302d3c Add a stub man page for device_get_sysctl{_ctx,tree}. Needs some
work, but is better than nothing.  Any help appreciated.
2006-05-23 22:11:20 +00:00
Pawel Jakub Dawidek
265803d0ba Document missing CRYPTO_F_ flags. 2006-05-23 08:43:28 +00:00
Pawel Jakub Dawidek
71ee05c835 Update HMAC algorithms. 2006-05-17 18:58:25 +00:00
Pawel Jakub Dawidek
f3326d72d0 Update manual page: cri_rnd field is gone, cri_mlen field was added. 2006-05-17 18:44:37 +00:00
Giorgos Keramidas
3c0ebd45a5 Consistently use `superuser privileges' instead of its singular
form here and its plural there.

Submitted by:	Rostislav Krasny <rosti.bsd@gmail.com>
MFC after: 	3 days
2006-05-16 22:58:43 +00:00
Wilko Bulte
7a0761c19c Remove reference to Alpha architecture. 2006-05-15 20:58:05 +00:00
John-Mark Gurney
74c9ea0c37 match w/ prototype...
MFC after:	3 days
2006-05-08 04:25:35 +00:00
Giorgos Keramidas
b1cc10206c Typo. 2006-04-29 00:43:23 +00:00
Giorgos Keramidas
f4006aff16 Fix a couple of typos and other minor nits
Reviewed by:	rwatson
2006-04-28 23:21:36 +00:00
Robert Watson
8a1f412960 Fix typo.
MFC after:	1 month
Submitted by:	Antoine Brodin <antoine dot brodin@laposte dot net>
2006-04-28 19:43:44 +00:00
Robert Watson
dba9e9ccbf Add a basic man page for the sysctl(9) macro interfaces. Previously man
pages existed only for the dynamic sysctl interfaces.  There's probably
more complete and accurate content, better advice, etc, that could be added
here.

Per scottl's suggest, add a small piece of moralizing text regarding the
fact that sysctl names quickly get embedded in system configuration files,
libraries, third party applications, and even books, so renaming and
removing names after they've been published is a tricky issue.

MFC after:	1 month
2006-04-28 10:45:27 +00:00
Scott Long
4905491fe3 Add a section about locking protocol for busdma. 2006-04-28 08:36:49 +00:00
John-Mark Gurney
af3b868186 document the various bus_space_*_stream_? functions... 2006-04-22 03:58:41 +00:00
John Baldwin
c1ffaf8c9a Add MLINKS for rwlock(9). 2006-04-19 21:09:39 +00:00
John Baldwin
96cb5f9912 Document rw_try_upgrade() and rw_downgrade(). 2006-04-19 21:09:17 +00:00
John Baldwin
0b79fedb9b Various nits and fixups so that the text reads smoother in several places.
Also, more closely match the prototypes in sys/rwlock.h and add a BUGS
section.
2006-04-19 20:43:35 +00:00
John Baldwin
9fc7158c3c Trim a couple of xrefs. 2006-04-19 20:41:56 +00:00
John Baldwin
8ba7a3578b - Sleep/wakeup operate on threads now, not processes.
- Describe msleep() as the primary sleep function now rather than tsleep()
  and describe tsleep() and msleep_spin() as variations.
- Try to make the description of msleep() a bit closer to English
  (sentences with actual subjects, etc.)
- Document that a priority of 0 now prevents the thread's priority from
  being altered.
- Add a history note for wakeup_one().
2006-04-17 19:11:12 +00:00
Maxim Konovalov
be9365a9f2 o Fix prototype for SYSCALL_MODULE(9): the third argument
is a pointer to struct sysent.  Correct its description.

PR:		docs/84790
Submitted by:	Dirk Gouders
MFC after:	2 weeks
2006-04-15 12:04:18 +00:00
Pawel Jakub Dawidek
0590475331 Remove redundant 'from'. 2006-04-10 18:19:29 +00:00
Pawel Jakub Dawidek
1deaec4368 Document CRD_F_KEY_EXPLICIT flag. While here more flags description more
readable.

MFC after:	2 weeks
2006-04-10 18:17:43 +00:00
John-Mark Gurney
18f1afb9f4 add links for the functions documented in bus_space.9... 2006-04-04 22:56:08 +00:00
Peter Wemm
401dafd6b0 Update pmap_remove_pages(9) doc. 2006-04-03 21:17:36 +00:00
Dag-Erling Smørgrav
a41d535d17 Correct the requirements for g_new_consumer().
Approved by:	phk
2006-03-17 13:13:18 +00:00
Sam Leffler
47e2996e8b promote fast ipsec's m_clone routine for public use; it is renamed
m_unshare and the caller can now control how mbufs are allocated

Reviewed by:	andre, luigi, mlaier
MFC after:	1 week
2006-03-15 21:11:11 +00:00
Andre Oppermann
2433924ce1 Import OpenBSD's manual page to the sys/sys/hash.c functions imported two
days earlier.

Obtained from:	OpenBSD
2006-03-14 17:19:09 +00:00
Hiroki Sato
999b97c5e7 Fix version number when the feature was added.
Submitted by:	Yoshihiko Sarumaru (mistral at imasy dot or dot jp)
PR:		docs/93801 and docs/93803
MFC after:	2 days
2006-03-07 18:25:03 +00:00
Ruslan Ermilov
a26fc5727b Fix types of time_second and time_uptime variables. 2006-03-02 19:47:41 +00:00
Olivier Houchard
d1bd38bb45 Note that BUS_DMA_COHERENT currently only affects sparc64 and arm.
Suggested by:	scottl
2006-03-01 23:56:18 +00:00
John-Mark Gurney
6f56dcd441 update examples to use the correct terms that was never updated when the
earlier descriptions were gone over...

MFC after:	3 days
2006-02-28 19:58:57 +00:00
John-Mark Gurney
235811bfea allow timo to be 0 when mtx is not NULL (KASSERT allowed this as
pointed out by jhb)

Reviewed by:	jhb
MFC after:	3 days
2006-02-22 20:50:33 +00:00
Pawel Jakub Dawidek
b81709d11c Document how to find a short description of a memory type. 2006-02-17 09:11:41 +00:00
Joel Dahl
fda40672d0 .Pp before .Sh is redundant.
Reviewed by:	ru
2006-02-13 21:34:19 +00:00
Gleb Smirnoff
38fdbc1679 Xref rwlock(9).
Reviewed by:	ru
2006-02-01 20:30:55 +00:00
Gleb Smirnoff
3182fc7b3e Document read/write locks.
Reviewed by:	jhb, ru
2006-02-01 19:39:25 +00:00
Christian Brueffer
b88c6e8756 Xref redzone(9) 2006-01-31 17:29:27 +00:00
Max Laier
dad5bb6485 sys/linker.h needs sys/systm.h as a requirement.
Submitted by:	 gallatin
2006-01-31 16:59:52 +00:00
Pawel Jakub Dawidek
847a2a1716 Add buffer corruption protection (RedZone) for kernel's malloc(9).
It detects both: buffer underflows and buffer overflows bugs at runtime
(on free(9) and realloc(9)) and prints backtraces from where memory was
allocated and from where it was freed.

Tested by:	kris
2006-01-31 11:09:21 +00:00
Max Laier
6aec1278dc firmware(9) is a subsystem to load binary data into the kernel via a
specially crafted module.  There are several handrolled sollutions to this
problem in the tree already which will be replaced with this.  They include
iwi(4), ipw(4), ispfw(4) and digi(4).

No objection from:	arch
MFC after:		2 weeks
X-MFC after:		some drivers have been converted
2006-01-29 02:52:42 +00:00
Warner Losh
daff7d3b12 Bump date to Sept 20, the date of the last content change 2006-01-18 05:48:45 +00:00
Ruslan Ermilov
01be9cf125 Fix a misspelled reference. 2006-01-13 11:24:08 +00:00
John Baldwin
61d963bc57 - Don't list sleep() in the NAME section as we haven't had a sleep()
function in years.
- Change the 'ident' paramters to 'wchan' to match <sys/systm.h>.
- Use 'otherwise' in place of 'else' in one place so that this reads like
  English rather than C.
- Document the new msleep_spin() function.
- Add history notes for msleep() and msleep_spin().
2006-01-03 17:00:38 +00:00
Robert Watson
fdd3cfa0aa Back out VFS_LOCK_GIANT.9:1.4, due to losing a race in change/update
against revision 1.3.  No need to include mount.h twice, once will be
quite enough.

Pointed out by:	simon
2006-01-03 14:00:22 +00:00
Ian Dowse
0a9a8c2efa Add basic documentation for many of the kernel USB functions that
USB device drivers use to talk to USB devices. This is probably
still a bit rough and it does not yet include the functions specific
to HID, ethernet, hubs, host controller drivers, task threads or
debugging.
2005-12-31 03:53:02 +00:00
Pawel Jakub Dawidek
104a3dc0eb Update manual page after last memguard changes.
Glanced at by:	simon
2005-12-30 12:28:19 +00:00
Pawel Jakub Dawidek
7b53693f42 Document CTR6() macro. 2005-12-27 11:12:51 +00:00
Robert Watson
92dc287fdd Add missing mount.h include to VFS_LOCK_GIANT() man page.
Submitted by:	Wojciech A. Koszek <dunstan at freebsd dot czest dot pl>
MFC after:	3 days
2005-12-24 08:25:15 +00:00
Poul-Henning Kamp
49091c48d5 Make sbuf_copyin() return the number of bytes copied on success.
Submitted by:	"Wojciech A. Koszek" <dunstan@freebsd.czest.pl>
2005-12-23 11:49:53 +00:00
Simon L. B. Nielsen
b5c4679c1a VFS_LOCK_GIANT and VFS_UNLOCK_GIANT are actually defined in sys/mount.h,
so also include sys/mount.h in SYNOPSIS.

PR:		docs/90541
Submitted by:	Wojciech A. Koszek dunstan^freebsd.czest.pl
MFC after:	1 week
2005-12-18 08:07:30 +00:00
Ruslan Ermilov
a5b0d9050a [mdoc] add missing space before a punctuation type argument. 2005-12-13 17:07:52 +00:00
Scott Long
71bb1f9b0c More review and adjustment for reality that should have happened 3 years
ago.  Document the real behavior of bus_dma_tag_create, bus_dmamap_load,
and other functions.  Also document their arguments and return values.

MFC After: 3 days
2005-12-05 23:25:59 +00:00
John Baldwin
267b051a81 - Use .fn to markup untimeout in two places it was missing.
- Reword a confusing sentence.

PR:		docs/89810
Submitted by:	Marius Nuennerich marius dot nuennerich at gmx dot net
MFC after:	3 days
2005-12-01 19:16:35 +00:00
Joel Dahl
19797b2256 s/5.5/6.0/ in HISTORY section.
Discussed with:	ru
2005-11-24 09:25:10 +00:00
Andre Oppermann
cb752e17a9 Remove references to MEXT_ADD_REF, MEXT_REM_REF and MEXT_IS_REF
which were removed with rev. 1.179 of mbuf.h.

Sponsored by:	TCP/IP Optimization Fundraise 2005
2005-11-18 17:04:49 +00:00
Ruslan Ermilov
72d835d0a0 Unbreak and fix markup. 2005-11-18 14:01:11 +00:00
Ruslan Ermilov
78ad54210f -mdoc sweep. 2005-11-18 10:56:28 +00:00
John Baldwin
2ddd41fbec - Clarify when the softc is allocated. It is allocated when a device is
probed and attached, not on the first call to device_get_softc().
- Add a cross reference to DEVICE_PROBE regarding the caveats of using the
  softc in a driver's probe routine.
- Fix a grammar bogon.

PR:		docs/87176 (1)
Submitted by:	Devon H. O'Dell dodell at offmyserver dot com (1)
MFC after:	3 days
2005-10-13 16:57:53 +00:00
John Baldwin
10ebc7c038 - When bintime was added to this manpage, standalone .Nm changed from
microtime to bintime.  However, one standaline .Nm wasn't changed, and as
  a result, the manpage claimed that bintime was added in both 5.0 and 3.0.
  Fix by listing microtime explicitly.
- Fix a grammar bogon.

PR:		docs/87147 (1)
Submitted by:	Matthew Luckie (1)
MFC after:	3 days
2005-10-13 16:01:28 +00:00
Giorgos Keramidas
d3d902048c Fix a syntax nit (superfluous 'a').
Submitted by:	Anders Hanssen <anders@rethink.no>
2005-10-11 16:05:35 +00:00
John Baldwin
eefd941ba2 Update this manpage:
- Remove references to cpu_critical_*() as they no longer exist.
- Explain that any preemptions that occur during a critical section are
  deferred until the current thread exits the section.
- Remove a bogus example usage of a critical section.
- Note that one can interlock critical sections with spin mutexes in
  certain situations.

MFC after:	3 days
2005-10-05 19:48:21 +00:00
Ruslan Ermilov
bf5a89d1d5 Sort MLINKS. 2005-09-28 07:32:43 +00:00
Max Laier
b6de9e91bd Remove bridge(4) from the tree. if_bridge(4) is a full functional
replacement and has additional features which make it superior.

Discussed on:	-arch
Reviewed by:	thompsa
X-MFC-after:	never (RELENG_6 as transition period)
2005-09-27 18:10:43 +00:00
John Baldwin
4ea211a4f4 - Document atomic_fetchadd(9) and add a MLINK.
- Add arm and ppc to the list of archs not supporting operations on 64-bit
  integers.
- Update the sample code for acquiring a mutex to be more recent and to
  take into account the recent atomic_foo_ptr() changes.

MFC after:	1 week
2005-09-27 17:59:29 +00:00
Robert Watson
6b8a3687a1 Add discussion of Giant, the MPSAFE flag, and NDHASGIANT() to namei(9).
Add a VFS_LOCK_GIANT(9)/VFS_UNLOCK_GIANT(9) man page.

Discussed with:	jeff
MFC after:	3 days
2005-09-21 10:19:57 +00:00
Warner Losh
097fcfeb8f Sprinkle a few stars where they belong. 2005-09-20 02:38:43 +00:00
John Baldwin
a30c1e0a0b Various and sundry improvements:
- Replace 'process' with 'thread' everywhere.
- Update several places to note that that the fact that default mutexes
  may adaptively spin isn't necessarily MD, but is just part of the
  implementation as a whole.
- Clarify the text about MTX_SPIN mutexes only being appropriate for
  INTR_FAST interrupts or other low level scheduler code to make the
  jargon more FreeBSD-ish rather than BSD/OS-ish.
- Also, note that it is possible that interrupts aren't blocked but just
  deferred when a spin lock is held (the whole blocked vs. deferred bit is
  an MD implementation detail).
- Remove statements saying that spin locks must be released in the exact
  opposite order that they were acquired.  This stopped being true several
  years ago when we first added critical sections that stored their state
  in the current thread rather than in struct mtx.
- Note that a mutex must be initialized before it is passed to any other
  mutex function, not just mtx_lock.
- Clarify that mtx_trylock() only operates on MTX_DEF mutexes.
- Simplify the text about possible preemption during a mtx_unlock().
- Use complete English sentences in place of phrases in a few places.
- Clarify that it isn't ever safe to sleep with a mutex held.  The kernel
  tends to panic when you do that.

Requested by:	scottl (7)
MFC after:	3 days
2005-09-13 15:16:50 +00:00
Gleb Smirnoff
d04304d155 Make callout_reset() return a non-zero value if a pending callout
was rescheduled. If there was no pending callout, then return 0.

Reviewed by:	iedowse, cperciva
2005-09-08 14:20:39 +00:00
Scott Long
a79d1e8314 Fix a few small problems and bump the date.
Submitted by: ru
2005-09-01 19:14:41 +00:00
Scott Long
6f3d270147 More clarification on how bus_dmamap_sync works. Fix bogus text concerning
bus_dmamem_alloc.
2005-08-31 16:55:00 +00:00