From owner-freebsd-questions@FreeBSD.ORG Wed Oct 29 13:06:39 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 83F2EBF1 for ; Wed, 29 Oct 2014 13:06:39 +0000 (UTC) Received: from exprod7og124.obsmtp.com (exprod7og124.obsmtp.com [64.18.2.26]) (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 F36AC75C for ; Wed, 29 Oct 2014 13:06:38 +0000 (UTC) Received: from mail-wg0-f52.google.com ([74.125.82.52]) (using TLSv1) by exprod7ob124.postini.com ([64.18.6.12]) with SMTP ID DSNKVFDmV6pMVWnExUFpCJPcgA2UZ+Wypsvu@postini.com; Wed, 29 Oct 2014 06:06:39 PDT Received: by mail-wg0-f52.google.com with SMTP id b13so1254520wgh.39 for ; Wed, 29 Oct 2014 06:06:30 -0700 (PDT) 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=h006aFUQOMk+f1wx+7iB7QFFSl6ke0nVTVuFqd1/CiA=; b=ZP/d7Q3hVwrldIAI1XPk74v5ewKv2Agnfw0icORLzNrGdqTsnVwteQqafQBCSKggwV 5NbypDICmzntZkJ6ZJg6wWJ+ac2qP6YTOvgiMN7GUDHbGJO3wDS/nMJpRx1BG+nd32re K/brFgPH6qbEUH44PkaCpX6MAmEZ/6CJoxssl80uUtMLUG66Q3iCp00vvbf95Rk4PYEY las4zzJ0YjF/pwgxx/E7mfQlok0yFK4ERSrywyVs4Nr6JG/eRUxHTZS1m/JgIUQ/cJqX oxG2Cs1+aIMeH3dhHDB6doF3oJXJQZqtJrFQp79MrUCjLvGjwXn92Oc2YifbOdiswoH5 qiiA== X-Received: by 10.180.207.77 with SMTP id lu13mr12826224wic.12.1414587528010; Wed, 29 Oct 2014 05:58:48 -0700 (PDT) X-Gm-Message-State: ALoCoQkxz4PoxBaGllTfXqfAe+vcCoNc8eHHXNY9z+Coe5rq5Od7jqxCCWJfgcA5PDcVVd8Nu/EZTOLcmsFR7FQ8FtDP/EsGrMoOQBNrR2e2ArWvEjNlVTJ9lzFyQNt0mLOl7B559eQNuXLJEcDNCNlqB2uwl/3OMfc0CpL4b7F7+TGCYKEHPqs= X-Received: by 10.180.207.77 with SMTP id lu13mr12826206wic.12.1414587527901; Wed, 29 Oct 2014 05:58:47 -0700 (PDT) From: Sibananda Sahu MIME-Version: 1.0 X-Mailer: Microsoft Outlook 14.0 Thread-Index: Ac/zeBI0o/F6iLvPSj+8GLTEyjjdYA== Date: Wed, 29 Oct 2014 18:28:47 +0530 Message-ID: <6291be3b7bdd20e530f8cd104d225916@mail.gmail.com> 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: Wed, 29 Oct 2014 13:06:39 -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