Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 27 Feb 2001 22:55:58 -0700
From:      Warner Losh <imp@harmony.village.org>
To:        Kostas Magoutis <magoutis@eecs.harvard.edu>
Cc:        freebsd-arch@FreeBSD.ORG
Subject:   Re: Logical device instances 
Message-ID:  <200102280555.f1S5twd14711@harmony.village.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>  

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200102280555.f1S5twd14711>