From owner-freebsd-current@FreeBSD.ORG Mon Aug 27 07:55:59 2012 Return-Path: Delivered-To: current@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9E3611065670 for ; Mon, 27 Aug 2012 07:55:59 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id CCD7E8FC14 for ; Mon, 27 Aug 2012 07:55:58 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id KAA06510; Mon, 27 Aug 2012 10:55:49 +0300 (EEST) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1T5uAm-000G5S-Uu; Mon, 27 Aug 2012 10:55:49 +0300 Message-ID: <503B2803.1010104@FreeBSD.org> Date: Mon, 27 Aug 2012 10:55:47 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:14.0) Gecko/20120728 Thunderbird/14.0 MIME-Version: 1.0 To: Luigi Rizzo References: <20120827073403.GA49223@onelab2.iet.unipi.it> In-Reply-To: <20120827073403.GA49223@onelab2.iet.unipi.it> X-Enigmail-Version: 1.4.3 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: current@FreeBSD.org Subject: Re: per file descriptor device callbacks ? 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, 27 Aug 2012 07:55:59 -0000 on 27/08/2012 10:34 Luigi Rizzo said the following: > This requires to track calls to open/ioctl/poll/mmap/close. > The difficulty i have is with mmap() and close(), because FreeBSD > seems to handle these calls per-cdev rather than per-file-descriptor > (for instance, no 'struct file' argument is available in mmap(), and > the d_close method is only called on the last close() on the device). devfs_set_cdevpriv(9), etc -- Andriy Gapon