From owner-freebsd-hackers Thu Jun 28 10:54:40 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from revolt.poohsticks.org (revolt.poohsticks.org [63.227.60.74]) by hub.freebsd.org (Postfix) with ESMTP id 05E2A37B406 for ; Thu, 28 Jun 2001 10:54:38 -0700 (PDT) (envelope-from drew@revolt.poohsticks.org) Received: from revolt.poohsticks.org (localhost [127.0.0.1]) by revolt.poohsticks.org (8.11.3/8.11.3) with ESMTP id f5SHrqT05567; Thu, 28 Jun 2001 11:53:52 -0600 (MDT) (envelope-from drew@revolt.poohsticks.org) Message-Id: <200106281753.f5SHrqT05567@revolt.poohsticks.org> To: Nicolas Souchu Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: processes private data In-reply-to: Your message of "Thu, 28 Jun 2001 18:25:33 +0200." <20010628182533.B17804@avon.alcove-fr> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <5564.993750832.1@revolt.poohsticks.org> Date: Thu, 28 Jun 2001 11:53:52 -0600 From: Drew Eckhardt Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In message <20010628182533.B17804@avon.alcove-fr>, nsouch@fr.alcove.com writes: >Hi folks, > >I have a char driver that must be opened by more than one process. The minor >index is not sufficient for this. Is there any process private data (void *) >in the devfs structure (or the opposite) I could point to with the minor index >of my device? No. You want to split your minor number into separate unit and instance parts, and allow each instance to be only opened once (return EBUSY). A quick fix is to continue selecting the softc structure exclusively based on unit number and to hang the necessary per instance data off that. -- Home Page For those who do, no explanation is necessary. For those who don't, no explanation is possible. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message