Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 23 May 2001 01:38:09 +0100
From:      Brian Somers <brian@Awfulhak.org>
To:        Poul-Henning Kamp <phk@critter.freebsd.dk>, Garrett Wollman <wollman@khavrinen.lcs.mit.edu>
Cc:        Brian Somers <brian@Awfulhak.org>, freebsd-arch@FreeBSD.ORG, brian@Awfulhak.org
Subject:   Re: RFC: unit_list routines 
Message-ID:  <200105230038.f4N0cAb12470@hak.lan.Awfulhak.org>
In-Reply-To: Message from Poul-Henning Kamp <phk@critter.freebsd.dk>  of "Tue, 22 May 2001 21:15:53 %2B0200." <72211.990558953@critter> 

next in thread | previous in thread | raw e-mail | index | archive | help
phk said:
> Hi Brian,
> 
> Couldn't the resource manager used for interrupts and similar
> do this as well ?

wollman said:
> The resource manager code was designed to do precisely that, and
> already exists.  It may have gotten too entwined with the bus stuff,
> though, but it was certainly my intent that you should be able to use
> it for this purpose.

There doesn't seem to be anything at all suitable there.  I assume 
you (pl.) are referring to the struct resource_list stuff declared in 
bus.h ?

The unit_list is an ordered list of ranges where the count is 
implicit and a resource id or type field have no meaning.  The idea 
is to be able to allocate and release unit numbers relatively 
frequently without obfuscating things with redundant information or 
including odd things such bus hierarchies and unit counts.

I can't see any way of deriving the two from any common set of 
routines either - the resource_list stuff needs a hierarchy by it's 
nature, and I guess the ``count'' bits are intended (eventually) for 
handling limited resources such as power - not really applicable to 
unit allocation.

Maybe I'm missing something though ?
-- 
Brian <brian@Awfulhak.org>                        <brian@[uk.]FreeBSD.org>
      <http://www.Awfulhak.org>;                   <brian@[uk.]OpenBSD.org>
Don't _EVER_ lose your sense of humour !



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?200105230038.f4N0cAb12470>