Commit Graph

1725 Commits

Author SHA1 Message Date
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
Scott Long
1cb112ab25 Clarify the description of the bus_dmasync_op_t operation flags. This has
been misleading and even wrong since the import of the page.
2005-08-26 18:19:01 +00:00
Craig Rodrigues
8ddda52485 Update man page to reflect the fact that VOP_LISTEXTATTR
does not return a list of ASCII NUL terminated strings.
Instead, a list of attribute names is returned, where each
list entry consists of one byte for the name length, followed
by the name, without a terminating ASCII NUL.
This in similar to change 1.17 to extattr_get_file.2

Reviewed by:	rwatson, ru
2005-08-19 12:17:47 +00:00
Murray Stokely
abf91c46d8 Fix typo.
PR:		docs/84660
Submitted by:	Dirk Gouders <gouders@et.bocholt.fh-ge.de>
MFC after:	3 days
2005-08-09 13:55:21 +00:00
Brian Somers
fff86fc443 Fix a typo 2005-08-09 11:55:18 +00:00
Brian Somers
893446fe00 Mention how to ensure that a device hasn't already been identified 2005-08-09 11:14:21 +00:00
Brian Somers
b47668b3ec Fix a couple of typos 2005-08-09 10:30:25 +00:00
Brian Somers
e9b0dcda1a Remove a bogus word 2005-08-08 12:16:53 +00:00
Sam Leffler
9c3fd40489 describe m_align 2005-08-08 00:50:25 +00:00
Christian Brueffer
6fc6b69327 Mention that the softc is zeroed after allocation.
Noticed by:	sam
MFC after:	3 days
2005-08-02 13:54:52 +00:00
Giorgos Keramidas
6fb9b618f5 Fix all the spelling mistakes I could find in the man pages for words
that have at least 3 characters.

MFC after:	1 week
Thanks to:	Music band ``Chingon''
		for keeping me company while searching for these.
2005-07-31 03:30:48 +00:00
Scott Long
bf392eb4b9 Don't cross-reference VFS_START.9 2005-07-27 02:08:59 +00:00
Scott Long
e91f1998a1 Now that VFS_START.9 has been removed, don't try to reference it from the
Makefile.
2005-07-27 02:08:21 +00:00
Hiten Pandya
5e5cdff0f6 Remove the VFS_START(9) manual page because it's no longer relevant. The
entry point was removed as its only consumer was MFS.

Approved by:	re (hrs)
2005-07-26 23:57:37 +00:00
Craig Rodrigues
0167ce0d1d Fix two small grammar mistakes.
Approved by:	das (mentor)
2005-07-22 00:28:22 +00:00
Poul-Henning Kamp
636d90fc5c Make the facility for recognizing BIOS-signatures more general
and return a printable representation.

This fixes recognition of the PC Engines WRAP and improves the
recognition of the Soekris boards (Bios version can now be
seen in the dmesg output for instance).

Also, add watchdog support for PCM-582x platforms.

Submitted by:	Adrian Steinmann <ast@marabu.ch>
Slightly changed by:	phk
PR:	81360
2005-07-21 09:48:37 +00:00
Hiten Pandya
571dba6ec9 Use 'manual page' instead of 'man page' for consistency.
Approved by:	re (hrs)
2005-06-28 20:15:19 +00:00
Ruslan Ermilov
05c89c23e9 Overhaul the markup.
OK'ed by:	imp
Approved by:	re (blanket)
2005-06-25 08:59:05 +00:00
Ruslan Ermilov
a4be0b3cc1 (Mostly) markup fixes.
Approved by:	re (blanket)
2005-06-16 18:46:17 +00:00
Ruslan Ermilov
4f06896130 Assorted markup fixes and minor wordsmithing.
Approved by:	re
2005-06-15 13:31:23 +00:00
Hiten Pandya
d3f9f75425 Add a cross-reference to the pmap_page_init(9) manual page.
Approved by:	re
2005-06-15 00:21:02 +00:00
Warner Losh
751c35718a Don a flack jacket and start to document the FreeBSD bus_space
implementation.  I took the NetBSD man page, and hacked it to, I hope,
to reflect the preliminary version of the bus space that Justin Gibbs
committed as part of the CAM integration in FreeBSD 3.0.

This isn't perfect, but it is better than we have now (which is, ahem,
nothing).  Please coordinate changes to the file through me through
the 6.0 release.

Approved by: re (blanket for this one file)
2005-06-14 03:40:01 +00:00
Hiten Pandya
30de9c50b0 Update prototype for function pmap_init(), it no longer has the arguments
phys_start and phys_end.

Remove a stale documentation not about dis/uncontiguous memory.

Update manual page date while I am around these ends.

Reviewed by:	alc
2005-06-10 17:19:27 +00:00
Hiten Pandya
27c3fa33d9 Add manual page for newly added pmap_page_init(9) function, part of the
PMAP KPI.

Reviewed-by:	alc
2005-06-10 17:16:16 +00:00
Brooks Davis
fc74a9f93a Stop embedding struct ifnet at the top of driver softcs. Instead the
struct ifnet or the layer 2 common structure it was embedded in have
been replaced with a struct ifnet pointer to be filled by a call to the
new function, if_alloc(). The layer 2 common structure is also allocated
via if_alloc() based on the interface type. It is hung off the new
struct ifnet member, if_l2com.

This change removes the size of these structures from the kernel ABI and
will allow us to better manage them as interfaces come and go.

Other changes of note:
 - Struct arpcom is no longer referenced in normal interface code.
   Instead the Ethernet address is accessed via the IFP2ENADDR() macro.
   To enforce this ac_enaddr has been renamed to _ac_enaddr.
 - The second argument to ether_ifattach is now always the mac address
   from driver private storage rather than sometimes being ac_enaddr.

Reviewed by:	sobomax, sam
2005-06-10 16:49:24 +00:00
Brooks Davis
55d81cdbc0 Add missing Va in ifi_epoch entry. 2005-06-06 00:21:28 +00:00
Hiten Pandya
e36734401f Accomodate for parameter name change, 'cnp' to 'data'.
Submitted-by: 	Andrew R. Reiter <arr@watson.org>
2005-05-24 12:33:29 +00:00
Nate Lawson
96ab794b26 Document that the returned pointer should be freed even if the number
of items returned is 0.
2005-05-20 05:04:22 +00:00
Gleb Smirnoff
fff7ff711b Document taskqueue_drain(). 2005-05-19 18:31:42 +00:00
David E. O'Brien
6ffd2f532c Clarify the header. 2005-05-17 15:03:50 +00:00
Ruslan Ermilov
580325d4cf Recover the original Berkeley RCS id, and fix the description of
format for source files when it comes to $FreeBSD$.
2005-05-17 14:20:42 +00:00
Giorgos Keramidas
b31dd0b724 Remove a duplicate 'comment' to fix the syntax of a sentence. 2005-05-17 01:25:57 +00:00
Sam Leffler
cf82599dcc update for recent api changes 2005-05-01 02:12:44 +00:00
Gleb Smirnoff
f9e6931c3d Manpage for unit allocator functions.
Reviewed by:	phk
2005-04-20 19:11:05 +00:00
Joseph Koshy
265cd33757 Bring API documentation for sleepqueue(9) in sync with the code
in -current.

Reviewed by:	ru
2005-04-19 16:30:25 +00:00
Joseph Koshy
4c49b002e0 Document taskqueue_run_fast(). Markup 'Giant' with ".Va".
Reviewed by:	ru
2005-04-19 16:23:00 +00:00
Robert Watson
e551d45211 Modify the alq(9) alq_open() API to accept a file creation mode, rather
than defaulting the cmode argument to vn_open() to 0.  Supply a default
argument of ALQ_DEFAULT_CMODE (0600) in current callers.

Discussed with/pointed out by:	hmp
Reveiwed by:	jeff, hmp
MFC after:	3 days
2005-04-16 12:12:27 +00:00
Joseph Koshy
3bbf58f9be Add a 'SEE ALSO' section. 2005-04-15 14:46:59 +00:00
Pawel Jakub Dawidek
ba9bc36af1 Add missing links.
MFC after:	2 weeks
2005-04-15 10:57:34 +00:00
Pawel Jakub Dawidek
c5e1d51bcd Create links to crypto.9 for every crypto(9) function.
OK'ed by:	sam
MFC after:	2 weeks
2005-04-09 18:38:54 +00:00
Nate Lawson
f86f6ce6e4 Hook up new man page for devclass_get_drivers() to build
Reminded by:	ru
2005-04-07 17:27:14 +00:00
Nate Lawson
4abfd70c87 Document that devclass_get_maxunit(9) returns one greater than the current
highest unit.

Reviewed by:	dfr
MFC after:	2 weeks
2005-04-04 15:37:59 +00:00
Nate Lawson
fada20b989 Add devclass_get_drivers(9) which provides an array of pointers to driver
instances in a given devclass.  This is useful for systems that want to
call code in driver static methods, similar to device_identify().

Reviewed by:	dfr
MFC after:	2 weeks
2005-04-04 15:26:51 +00:00
Christian Brueffer
63575b5712 Bump .Dd for the previous commit. 2005-03-28 10:28:57 +00:00
Christian Brueffer
c97dc39f02 The make_dev(9) functions no longer handle dev_ts, but struct cdevs.
PR:		78172
Submitted by:	"Wojciech A. Koszek" <dunstan@freebsd.czest.pl>
MFC after:	3 days
2005-03-28 08:57:07 +00:00
John-Mark Gurney
7ac139a904 add m_copyup function.. This can be used to help make our ip stack less
alignment restrictive, and help performance on some ethernet cards which
currently copy the entire packet a couple bytes to get the packet aligned
properly...

Wordsmithing by:	dwhite
Obtained from:	NetBSD (code only)
I'll clean it up later:	rwatson
2005-03-17 19:34:57 +00:00
Warner Losh
f3011a7c10 Clarify that the end argument meaning for rman_reserve_resource_bound
is the highest acceptable value for the ending of the resource being
allocated.  One could also believe that it is the highest starting
value of the resource.  The code definitely expects the former, but I
could find no documentation of this apart from TFSC.
2005-03-15 23:58:55 +00:00
Poul-Henning Kamp
b1b785b27d Mangle a manpage. 2005-03-14 15:38:34 +00:00
John-Mark Gurney
ada6ba6ef3 spell resource correctly...
MFC after:	3 days
2005-03-09 07:56:09 +00:00
Hiten Pandya
97ad30b96a Remove stale information in IMPLEMENTATION NOTES section about alq_open()
using the calling thread's ucred.

While I am there, fix references to my name.
2005-03-09 01:56:48 +00:00
Hiten Pandya
830d03bc97 Make note of the ktrdump(8) utility in the opening paragraph of this
manual page.

Fix indentation of code block in EXAMPLE section so the manual page
can be viewed in a 80 column window.
2005-03-08 01:37:36 +00:00
Christian Brueffer
eafe5f8307 Correct a macro name.
PR:		78171
Submitted by:	"Wojciech A. Koszek" <dunstan@freebsd.czest.pl>
MFC after:	3 days
2005-02-28 02:02:27 +00:00
Brooks Davis
bc9d299133 Change the definition of struct if_data's member ifi_epoch from wall
clock time to uptime because wall clock time may go backwards.

This is a change in the API which will impact SNMP agents who are using
ifi_epoch to set RFC2233's ifCounterDiscontinuityTime.  None are know to
exist today.  This will not impact applications that are using the
<index, epoch> tuple to verify interface uniqueness except that it
eliminates a race which could lead to a false assumption of uniqueness.

Because this is a behavior change, bump __FreeBSD_version.

Discussed with:	re (jhb, scottl)
MFC after:	3 days
Pointed out by:	pkh (way back at EuroBSDCon)
Pointy hat:	brooks
2005-02-25 19:46:41 +00:00
Gleb Smirnoff
4291a5982a Fix prototype for bpf_mtap2().
MFC after:	3 days
2005-02-25 15:58:05 +00:00
Christian Brueffer
64716bfbf4 Connect memguard(9) to the build. 2005-02-22 17:42:12 +00:00
Christian Brueffer
a3256b8880 Xref memguard(9) 2005-02-22 17:20:20 +00:00
Christian Brueffer
f8cd5f23d4 First cut at a manpage for the MemGuard debugging allocator.
most content from:	bmilekic
mdoc lessons by:	ru
2005-02-22 17:18:27 +00:00
Pawel Jakub Dawidek
6201b4ec28 Copyright year update. 2005-02-16 22:24:15 +00:00
Ruslan Ermilov
6009275136 Don't say that mtx_lock() will "sleep" if another kernel thread is
holding the mutex, say it will "block".  Later in this manual page
we say that sleeping while holding a mutex isn't allowed, and this
can be confusing.

Submitted by:	jhb
2005-02-15 23:52:35 +00:00
Ruslan Ermilov
423ac68026 Expand contractions. 2005-02-15 09:27:00 +00:00
Ruslan Ermilov
36a142c455 Expand contractions. 2005-02-13 23:45:54 +00:00
Ruslan Ermilov
59892d33e5 who's -> whose 2005-02-13 23:23:30 +00:00
Ruslan Ermilov
0227791b40 Expand *n't contractions. 2005-02-13 22:25:33 +00:00
Robert Watson
9e95400e5b Add a bit more caveat text about MUTEX_PROFILING -- try to avoid using it
with other profiling and debugging options, such as INVARIANTS, WITNESS,
kernel profiling, etc.  They all interfere with each other nastily and
will generate fairly useless results.
2005-02-11 15:17:57 +00:00
Ruslan Ermilov
6b806d21d1 Fixed the misplaced $FreeBSD$. 2005-02-09 18:07:17 +00:00
Nate Lawson
5b68bf38ab Update device_find_child(9) to return the first matching child if unit
is set to -1.

Reviewed by:	dfr, imp
2005-02-08 18:00:29 +00:00
Ian Dowse
98c926b20f Add a mechanism for associating a mutex with a callout when the
callout is first initialised, using a new function callout_init_mtx().
The callout system will acquire this mutex before calling the callout
function and release it on return.

In addition, the callout system uses the mutex to avoid most of the
complications and race conditions inherent in asynchronous timer
facilities, so mutex-protected callouts have much simpler semantics.
As long as the mutex is held when invoking callout_stop() or
callout_reset(), then these functions will guarantee that the callout
will be stopped, even if softclock() had already begun to process
the callout.

Existing Giant-locked callouts will automatically pick up the new
race-free semantics. This should close a number of race conditions
in the USB code and probably other areas of the kernel too.

There should be no change in behaviour for "MP-safe" callouts; these
still need to use the techniques mentioned in timeout(9) to avoid
race conditions.
2005-02-07 02:47:33 +00:00
Christian Brueffer
f9d04d3672 Remove Xref to nonexistant cap.3
Ok'ed by:	rwatson
MFC after:	3 days
2005-02-05 14:16:35 +00:00
Christian Brueffer
82e9524e14 Xref mac_lomac.4 instead of lomac.4
MFC after:	3 days
2005-02-05 13:36:33 +00:00
Joseph Koshy
a4230398d3 Note that functions alq_flush() and alq_post() should not be called in
contexts where sleeping is disallowed.

Pointed out by:	ru
2005-02-05 02:39:07 +00:00
Pawel Jakub Dawidek
2c7f46173e Improve EIO error description and mention that it can also occur while
writting.

MFC after:	3 days
2005-02-04 11:18:46 +00:00
Joseph Koshy
2f6e95a1d2 Bring the prototype for alq_open() in line with the code.
Add a section on locking.
2005-01-30 10:21:04 +00:00
Ruslan Ermilov
1de7d3e1db Start sentences from a capital letter.
Submitted by:	Joel Dahl
2005-01-29 20:05:07 +00:00
Ruslan Ermilov
cae0500fd4 Fixed whitespace at EOL and double word.
Uncompact enumaration to make it look better.
2005-01-28 21:18:14 +00:00
Ruslan Ermilov
b0536a9ba4 Mark lists as in the rest of section 9 manpages. 2005-01-28 10:48:52 +00:00
Ruslan Ermilov
0a57ea7df2 Mark lists as in the rest of section 9 manpages.
Submitted by:	Joel Dahl (mostly)
2005-01-28 10:43:05 +00:00
Ruslan Ermilov
7d64886df5 Add a few colons.
Submitted by:	Joel Dahl
2005-01-26 20:50:52 +00:00
Ian Dowse
641a1aa10d Attempt to describe the race conditions that must be considered
when using the callout subsystem. Show how the callout_pending(),
callout_active() and callout_deactivate() macros can be used to
achieve simpler race-free callout semantics in many situations.
2005-01-23 17:42:48 +00:00
Bruce M Simpson
4d80f75020 Fix markup.
Submitted by:	ru
2005-01-22 21:54:29 +00:00
Bruce M Simpson
bf1639ee7d Add a note about the slot number not necessarily indicating the physical
location of a PCI device in the system chassis.
Remove the note about PAE.
Update document date.
Update my email address.
Update copyright.

MFC after:	1 week
2005-01-22 21:14:46 +00:00
Ruslan Ermilov
ead5223f54 Fixed punctuation in xrefs. 2005-01-21 20:48:00 +00:00
Ruslan Ermilov
feaaabdc8f Fixed xref. 2005-01-21 10:17:17 +00:00
Ruslan Ermilov
9cbda59000 Sort sections. 2005-01-21 08:36:40 +00:00
Gleb Smirnoff
c46f7b9c6f log(9) requires sys/syslog.h.
MFC after:	3 days
2005-01-20 10:26:42 +00:00
Ruslan Ermilov
324cfdb7e8 Use the standard section name. 2005-01-18 20:54:50 +00:00
Ruslan Ermilov
30849b5324 The rest of manpages spell this "PSEUDOCODE". 2005-01-18 20:37:11 +00:00
Christian Brueffer
2d4071ac8f Typo fixes.
MFC after:	3 days
2005-01-18 18:13:03 +00:00
Ruslan Ermilov
87968949e2 Folded two SEE ALSO sections into one. 2005-01-18 09:13:42 +00:00
Scott Long
824f4edf4f Document bus_dmamap_load_mbuf_sg() 2005-01-15 20:50:52 +00:00