From owner-freebsd-current@FreeBSD.ORG Mon Sep 8 08:56:44 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 CD85F1065671 for ; Mon, 8 Sep 2008 08:56:44 +0000 (UTC) (envelope-from vehemens@verizon.net) Received: from vms173001pub.verizon.net (vms173001pub.verizon.net [206.46.173.1]) by mx1.freebsd.org (Postfix) with ESMTP id B0F698FC21 for ; Mon, 8 Sep 2008 08:56:44 +0000 (UTC) (envelope-from vehemens@verizon.net) Received: from sam ([71.107.33.191]) by vms173001.mailsrvcs.net (Sun Java System Messaging Server 6.2-6.01 (built Apr 3 2006)) with ESMTPA id <0K6V002R7CU95I36@vms173001.mailsrvcs.net> for freebsd-current@freebsd.org; Mon, 08 Sep 2008 03:56:33 -0500 (CDT) Date: Mon, 08 Sep 2008 02:02:00 -0700 From: vehemens To: freebsd-current@freebsd.org Message-id: <200809080202.00664.vehemens@verizon.net> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7bit Content-disposition: inline User-Agent: KMail/1.9.10 Subject: 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 08:56:44 -0000 In linux drivers, there is a one to one relationship to an open and a calling argument structure called struct file. It provides a private data pointer that allows the driver to preserve unique state information across other calls such as read/write/ioctl/mmap/close etc. For bsd drivers, my understanding there is not an equivalent. As a result it is not possible to preserve different state information for multiple opens by the same thread of the same device major/minor #'s. Is this correct, or did i miss something?