Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 28 Feb 2001 01:34:42 -0500 (EST)
From:      Kostas Magoutis <magoutis@eecs.harvard.edu>
To:        imp@harmony.village.org
Cc:        freebsd-arch@FreeBSD.ORG
Subject:   Re: Logical device instances
Message-ID:  <200102280634.f1S6Ygq03513@wally.eecs.harvard.edu>
In-Reply-To: <200102280555.f1S5twd14711@harmony.village.org> (message from Warner Losh on Tue, 27 Feb 2001 22:55:58 -0700)
References:  <200102280048.f1S0m9n09106@wally.eecs.harvard.edu> <200102280555.f1S5twd14711@harmony.village.org>

next in thread | previous in thread | raw e-mail | index | archive | help
The minor number is still pretty static, isn't it?  I can multiplex a
single physical device but I can't create dynamic instances of it,
e.g., the files corresponding to the vnode/devnode of the device.


   Date: Tue, 27 Feb 2001 22:55:58 -0700
   From: Warner Losh <imp@harmony.village.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




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