Date: Thu, 24 May 2001 10:59:48 +0100 (BST) From: Doug Rabson <dfr@nlsystems.com> To: Poul-Henning Kamp <phk@critter.freebsd.dk> Cc: Brian Somers <brian@Awfulhak.org>, Garrett Wollman <wollman@khavrinen.lcs.mit.edu>, <freebsd-arch@FreeBSD.ORG> Subject: Re: RFC: unit_list routines Message-ID: <Pine.BSF.4.33.0105241057530.58788-100000@herring.nlsystems.com> In-Reply-To: <3487.990636871@critter>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 23 May 2001, Poul-Henning Kamp wrote: > In message <200105231552.f4NFqwF05688@hak.lan.Awfulhak.org>, Brian Somers write > s: > > >I didn't do it that way because the ``usual'' way units are allocated > >is sequentially. Using bits when there are large numbers of units > >gets awkward. I figured what was required was something small and > >simple that would cover the requirements of most/all drivers that > >need to track their units so that it's easy to find an unused one, > >and it's easy to allocate/deallocate things. > > How does newbus allocate/manage unit numbers ? The devclass object manages them. A devclass more-or-less represents all devices which share a name. For instance if a new pci bus is discovered, the system finds the devclass for "pci" and asks for the next available unit number. This stuff pre-dates the resource manager which is being discussed which accounts for the duplicated functionality. -- Doug Rabson Mail: dfr@nlsystems.com Phone: +44 20 8348 6160 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?Pine.BSF.4.33.0105241057530.58788-100000>