From owner-freebsd-arch Tue Feb 27 21:56: 5 2001 Delivered-To: freebsd-arch@freebsd.org Received: from harmony.village.org (rover.bsdimp.com [204.144.255.66]) by hub.freebsd.org (Postfix) with ESMTP id 53ABC37B719 for ; Tue, 27 Feb 2001 21:56:03 -0800 (PST) (envelope-from imp@harmony.village.org) Received: from harmony.village.org (localhost.village.org [127.0.0.1]) by harmony.village.org (8.11.1/8.11.1) with ESMTP id f1S5twd14711; Tue, 27 Feb 2001 22:55:59 -0700 (MST) (envelope-from imp@harmony.village.org) Message-Id: <200102280555.f1S5twd14711@harmony.village.org> To: Kostas Magoutis Subject: Re: Logical device instances Cc: freebsd-arch@FreeBSD.ORG In-reply-to: Your message of "Tue, 27 Feb 2001 19:48:09 EST." <200102280048.f1S0m9n09106@wally.eecs.harvard.edu> References: <200102280048.f1S0m9n09106@wally.eecs.harvard.edu> Date: Tue, 27 Feb 2001 22:55:58 -0700 From: Warner Losh Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In message <200102280048.f1S0m9n09106@wally.eecs.harvard.edu> Kostas Magoutis writes: : I am writing a device driver for a user-level networking card. User : level code interacts with it via open, close, mmap, and ioctl. A Think minor numbers. Each instance is a different minor number. There's no way to know what "instance" was opened except by minor numbers. There's not a 1-1 correspondence between opens and closes even (think dup and/or not close on exec after a fork). If you have all of the "instances" share the same minor number, they are all the same device and are treated as such by the kernel. Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message