From owner-freebsd-arch Thu May 24 3: 2:32 2001 Delivered-To: freebsd-arch@freebsd.org Received: from anchor-post-34.mail.demon.net (anchor-post-34.mail.demon.net [194.217.242.92]) by hub.freebsd.org (Postfix) with ESMTP id 25EA537B43E for ; Thu, 24 May 2001 03:02:29 -0700 (PDT) (envelope-from dfr@nlsystems.com) Received: from [62.49.251.130] (helo=herring.nlsystems.com) by anchor-post-34.mail.demon.net with esmtp (Exim 2.12 #1) id 152rwq-00076o-0Y; Thu, 24 May 2001 11:02:28 +0100 Received: from herring (herring [10.0.0.2]) by herring.nlsystems.com (8.11.2/8.11.2) with ESMTP id f4OA1C758839; Thu, 24 May 2001 11:01:12 +0100 (BST) (envelope-from dfr@nlsystems.com) Date: Thu, 24 May 2001 11:01:12 +0100 (BST) From: Doug Rabson To: Brian Somers Cc: Poul-Henning Kamp , Garrett Wollman , Subject: Re: RFC: unit_list routines In-Reply-To: <200105231702.f4NH29F07183@hak.lan.Awfulhak.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Wed, 23 May 2001, Brian Somers 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 ? > > I don't think it does. The only way to find out what's in use > (AFAIK) is by looking at every specinfo in dev_hash.... Wrong layer. The dev_hash stuff is part of the devfs layer - not all the devices which newbus manages are represented in devfs. -- 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