diff options
author | glebius <glebius@FreeBSD.org> | 2011-04-18 15:30:25 +0000 |
---|---|---|
committer | glebius <glebius@FreeBSD.org> | 2011-04-18 15:30:25 +0000 |
commit | 5beb62e535aad0c224c3d8fdd98f0f8ab6dc6f1f (patch) | |
tree | e17a147d84c57bfa5af473c57f365e60cdbd40a8 | |
parent | 523be27bea7e36731ccc9de7fb0a478e1d5bd52c (diff) | |
download | FreeBSD-src-5beb62e535aad0c224c3d8fdd98f0f8ab6dc6f1f.zip FreeBSD-src-5beb62e535aad0c224c3d8fdd98f0f8ab6dc6f1f.tar.gz |
It is already seven years since mbuf allocator uses same
M_WAITOK/M_NOWAIT flags as malloc(9). Update manual page.
Submitted by: Vadim Goncharov <vadimnuclight tpu.ru>
-rw-r--r-- | share/man/man9/mbuf.9 | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/share/man/man9/mbuf.9 b/share/man/man9/mbuf.9 index 2cc15c2..b029c52 100644 --- a/share/man/man9/mbuf.9 +++ b/share/man/man9/mbuf.9 @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 7, 2010 +.Dd April 18, 2011 .Dt MBUF 9 .Os .\" @@ -371,9 +371,9 @@ on failure. The .Fa how argument is to be set to -.Dv M_WAIT +.Dv M_WAITOK or -.Dv M_DONTWAIT . +.Dv M_NOWAIT . It specifies whether the caller is willing to block if necessary. A number of other functions and macros related to .Vt mbufs @@ -381,15 +381,16 @@ have the same argument because they may at some point need to allocate new .Vt mbufs . .Pp -Programmers should be careful not to confuse the +Historical .Vt mbuf -allocation flag -.Dv M_DONTWAIT -with the -.Xr malloc 9 -allocation flag, -.Dv M_NOWAIT . -They are not the same. +allocator (See +.Sx HISTORY +section) used allocation flags +.Dv M_WAIT +and +.Dv M_DONTWAIT . +These constants are kept for compatibility +and their use in new code is discouraged. .It Fn MGETHDR mbuf how type Allocate an .Vt mbuf @@ -964,9 +965,9 @@ Upon success, the original chain will be freed and the new chain will be returned. .Fa how should be either -.Dv M_WAIT +.Dv M_WAITOK or -.Dv M_DONTWAIT , +.Dv M_NOWAIT , depending on the caller's preference. .Pp This function is especially useful in network drivers, where @@ -982,9 +983,9 @@ The original mbuf chain is always reclaimed and the reference count of any shared mbuf clusters is decremented. .Fa how should be either -.Dv M_WAIT +.Dv M_WAITOK or -.Dv M_DONTWAIT , +.Dv M_NOWAIT , depending on the caller's preference. As a side-effect of this process the returned mbuf chain may be compacted. |