From owner-svn-src-stable@FreeBSD.ORG Fri Jul 8 12:50:36 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F38DC106566C; Fri, 8 Jul 2011 12:50:35 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C98498FC12; Fri, 8 Jul 2011 12:50:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p68CoZ0j018988; Fri, 8 Jul 2011 12:50:35 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p68CoZlW018986; Fri, 8 Jul 2011 12:50:35 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201107081250.p68CoZlW018986@svn.freebsd.org> From: Gleb Smirnoff Date: Fri, 8 Jul 2011 12:50:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r223867 - stable/8/share/man/man9 X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Jul 2011 12:50:36 -0000 Author: glebius Date: Fri Jul 8 12:50:35 2011 New Revision: 223867 URL: http://svn.freebsd.org/changeset/base/223867 Log: Merge from head/ 220787: 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 Modified: stable/8/share/man/man9/mbuf.9 Directory Properties: stable/8/share/man/man9/ (props changed) Modified: stable/8/share/man/man9/mbuf.9 ============================================================================== --- stable/8/share/man/man9/mbuf.9 Fri Jul 8 12:19:25 2011 (r223866) +++ stable/8/share/man/man9/mbuf.9 Fri Jul 8 12:50:35 2011 (r223867) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 25, 2008 +.Dd April 18, 2011 .Dt MBUF 9 .Os .\" @@ -356,9 +356,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 @@ -366,15 +366,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 @@ -912,9 +913,9 @@ Upon success, the original chain will be 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 @@ -930,9 +931,9 @@ The original mbuf chain is always reclai 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.