From owner-freebsd-hackers Mon Dec 13 0:37: 3 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from mass.cdrom.com (castles516.castles.com [208.214.165.80]) by hub.freebsd.org (Postfix) with ESMTP id C88E414D76 for ; Mon, 13 Dec 1999 00:37:00 -0800 (PST) (envelope-from msmith@mass.cdrom.com) Received: from mass.cdrom.com (localhost [127.0.0.1]) by mass.cdrom.com (8.9.3/8.9.3) with ESMTP id AAA06175; Mon, 13 Dec 1999 00:39:43 -0800 (PST) (envelope-from msmith@mass.cdrom.com) Message-Id: <199912130839.AAA06175@mass.cdrom.com> X-Mailer: exmh version 2.1.1 10/15/1999 To: "Vladimir N. Silyaev" Cc: hackers@freebsd.org Subject: Re: Multiple instances of the same character device In-reply-to: Your message of "Sat, 11 Dec 1999 17:33:37 EST." <19991211173336.A635@jupiter.delta.ny.us> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Mon, 13 Dec 1999 00:39:42 -0800 From: Mike Smith Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > > The question is very simple. Is it possible to open the same character > pseudo device, for example /dev/foo0, simultaneously from other programs, and > to work with this instances independently? Not in the fashion that I believe you're trying to do, no. > I'm asked as the developer of a driver with such requirements, so please > don't complain about such technique. I think I'm going to complain anyway; this is an _extremely_ lame way to do things, and it breaks many assumptions about how files are meant to work. In your case, however, you can probably steal the 'emuldata' field in the proc structure to store a pointer to your per-instance data. At some stage, the Linux emulator will want to use this as well, and it will need to provide an API for multiple emulator plugins to use. By then I hope that we'll have convinced the VMware folks to do things properly, or have our own binary version... -- \\ Give a man a fish, and you feed him for a day. \\ Mike Smith \\ Tell him he should learn how to fish himself, \\ msmith@freebsd.org \\ and he'll hate you for a lifetime. \\ msmith@cdrom.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message