From owner-svn-src-all@FreeBSD.ORG Sun Sep 5 14:47:46 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6FF3010656CA; Sun, 5 Sep 2010 14:47:46 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5F76F8FC17; Sun, 5 Sep 2010 14:47:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o85ElkiF084801; Sun, 5 Sep 2010 14:47:46 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o85ElkEh084799; Sun, 5 Sep 2010 14:47:46 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201009051447.o85ElkEh084799@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 5 Sep 2010 14:47:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212233 - head/share/man/man9 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Sep 2010 14:47:46 -0000 Author: kib Date: Sun Sep 5 14:47:46 2010 New Revision: 212233 URL: http://svn.freebsd.org/changeset/base/212233 Log: Document MAKEDEV_ETERNAL. MFC after: 3 days Modified: head/share/man/man9/make_dev.9 Modified: head/share/man/man9/make_dev.9 ============================================================================== --- head/share/man/man9/make_dev.9 Sun Sep 5 14:37:29 2010 (r212232) +++ head/share/man/man9/make_dev.9 Sun Sep 5 14:47:46 2010 (r212233) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 6, 2010 +.Dd September 5, 2010 .Dt MAKE_DEV 9 .Os .Sh NAME @@ -135,6 +135,7 @@ The following values are currently accep MAKEDEV_REF reference the created device MAKEDEV_NOWAIT do not sleep, may return NULL MAKEDEV_WAITOK allow the function to sleep to satisfy malloc +MAKEDEV_ETERNAL created device will be never destroyed .Ed .Pp The @@ -154,6 +155,18 @@ the device created is destroyed immediat drops his reference to cdev. .Pp The +.Dv MAKEDEV_ETERNAL +flag allows the kernel to not acquire some locks when translating system +calls into the cdevsw methods calls. +It is responsibility of the driver author to make sure that +.Fn destroy_dev +is never called on the returned cdev. +For the convenience, use the +.Dv MAKEDEV_ETERNAL_KLD +flag for the code that can be compiled into kernel or loaded +(and unloaded) as loadable module. +.Pp +The .Fn make_dev_cred function is equivalent to the call .Bd -literal -offset indent