From owner-freebsd-questions@FreeBSD.ORG Tue Nov 4 08:43:24 2014 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 82C7FA18 for ; Tue, 4 Nov 2014 08:43:24 +0000 (UTC) Received: from exprod7og123.obsmtp.com (exprod7og123.obsmtp.com [64.18.2.24]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F060C7AF for ; Tue, 4 Nov 2014 08:43:23 +0000 (UTC) Received: from mail-wi0-f172.google.com ([209.85.212.172]) (using TLSv1) by exprod7ob123.postini.com ([64.18.6.12]) with SMTP ID DSNKVFiRpJA64cFBnrdr8i5caBAzPYP+ypM5@postini.com; Tue, 04 Nov 2014 00:43:24 PST Received: by mail-wi0-f172.google.com with SMTP id bs8so8694272wib.5 for ; Tue, 04 Nov 2014 00:43:15 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:mime-version:thread-index:date:message-id :subject:to:content-type; bh=AvcwZJa5EEbTSB95v94kmP7xvLNhIpAdX/0hiz+hsj8=; b=bAQ2ISnZXAJO7KCSCgy6HQZRVy38VmzKUpqdk4KD1eU3fNHEQq5GFb/GInGFxy7PcD pl0gy9endkE2SnK7Ynq0kIxvRk9nSHpJQCrR3YL320XlT+SRaQroBls3WPDxgasZR8tC 7laJCajEOpAIorihKExfrfRYUQY+UeG2prAdyNfpA3xCalORjfAdcDy4VBn9E4LMlU54 sZW7xzjclleGrZbq9YD2s1rPCgrTkjuhBOKGQ2Y0Ffe0px1F7JKeZYzrrl+2FSuWMobj br1xsXCVaT8wtgl+e/w8GCbg65BEmY0mk5e6aVw6zdsihERIRqvvzorQUi2pqhR0RxdH kFNA== X-Received: by 10.180.73.7 with SMTP id h7mr21713887wiv.83.1415084329736; Mon, 03 Nov 2014 22:58:49 -0800 (PST) X-Gm-Message-State: ALoCoQlTMm08MZhN/jwX7838HFIdYNsu4p4ft4Z5EDeY02A2tYNZhgRGYZZJT+pQVXvLCV6ZAD5Bj0b7fmszbViWxpFgEqVLIVEaqcprPc8gxwD+Q95rojNF+aoW2pgls0jNEVzoKVwAkjyK7ZJqwZ50YwLqh1tMZmJEPnozNvVKkVrKY1OPiJQ= X-Received: by 10.180.73.7 with SMTP id h7mr21713871wiv.83.1415084329609; Mon, 03 Nov 2014 22:58:49 -0800 (PST) From: Sibananda Sahu MIME-Version: 1.0 X-Mailer: Microsoft Outlook 14.0 Thread-Index: Ac/3/MavdJxczJPmThKj73Xm3bWhuQ== Date: Tue, 4 Nov 2014 12:28:48 +0530 Message-ID: Subject: Open file descriptor reference count implementation in driver To: freebsd-questions@freebsd.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Nov 2014 08:43:24 -0000 Hi, Can anybody suggest how can I implement the Open file descriptor reference count in a freebsd driver??? I have looked up at certain places in the cdev structure(sys/conf.h) and found two integer values: Int si_refcount; Int si_usecount; I think these are the stuffs useful for me. Can somebody explain what are the significance of the above mentioned integer values inside the cdev structure? Any help would be greatly appreciated. Thanks, Sibananda Sahu