From owner-freebsd-current@FreeBSD.ORG Mon Sep 8 10:04:21 2008 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EE7391065678 for ; Mon, 8 Sep 2008 10:04:21 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.terabit.net.ua (mail.terabit.net.ua [195.137.202.147]) by mx1.freebsd.org (Postfix) with ESMTP id 9523A8FC33 for ; Mon, 8 Sep 2008 10:04:21 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from skuns.zoral.com.ua ([91.193.166.194] helo=mail.zoral.com.ua) by mail.terabit.net.ua with esmtp (Exim 4.63 (FreeBSD)) (envelope-from ) id 1KcdbW-0007nB-Rm; Mon, 08 Sep 2008 13:04:19 +0300 Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id m88A4Fd5077678 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 8 Sep 2008 13:04:15 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.2/8.14.2) with ESMTP id m88A4Fgd016476; Mon, 8 Sep 2008 13:04:15 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.3/8.14.3/Submit) id m88A4F0O016475; Mon, 8 Sep 2008 13:04:15 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 8 Sep 2008 13:04:15 +0300 From: Kostik Belousov To: vehemens Message-ID: <20080908100415.GI2038@deviant.kiev.zoral.com.ua> References: <200809080202.00664.vehemens@verizon.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="dTkSHzxTYb3Y+Ghp" Content-Disposition: inline In-Reply-To: <200809080202.00664.vehemens@verizon.net> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: ClamAV version 0.93.3, clamav-milter version 0.93.3 on skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua X-Virus-Scanned: mail.terabit.net.ua 1KcdbW-0007nB-Rm 58a8c007c64fbf05f7a68c8a5157fafb X-Terabit: YES Cc: freebsd-current@freebsd.org Subject: Re: bsd versus linux device drivers X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Sep 2008 10:04:22 -0000 --dTkSHzxTYb3Y+Ghp Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Sep 08, 2008 at 02:02:00AM -0700, vehemens wrote: > In linux drivers, there is a one to one relationship to an open and a cal= ling=20 > argument structure called struct file. It provides a private data pointe= r=20 > that allows the driver to preserve unique state information across other= =20 > calls such as read/write/ioctl/mmap/close etc. >=20 > For bsd drivers, my understanding there is not an equivalent. As a resul= t it=20 > is not possible to preserve different state information for multiple open= s by=20 > the same thread of the same device major/minor #'s. >=20 > Is this correct, or did i miss something? There is devfs_{get,set}_cdevpriv() KPI. Still no manpage, I shall fix this ASAP. --dTkSHzxTYb3Y+Ghp Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAkjE+J4ACgkQC3+MBN1Mb4gR3ACfQA8cNNf3Bv8AIyzgxDSrh2mc /OwAoLSoliWNUTM76Kvq2rh1W5e7gWYc =qsQh -----END PGP SIGNATURE----- --dTkSHzxTYb3Y+Ghp--