From owner-freebsd-arch Mon Jun 26 23: 8:34 2000 Delivered-To: freebsd-arch@freebsd.org Received: from tele-post-20.mail.demon.net (tele-post-20.mail.demon.net [194.217.242.20]) by hub.freebsd.org (Postfix) with ESMTP id 19AA937B6D8; Mon, 26 Jun 2000 23:08:29 -0700 (PDT) (envelope-from dfr@nlsystems.com) Received: from nlsys.demon.co.uk ([158.152.125.33] helo=herring.nlsystems.com) by tele-post-20.mail.demon.net with esmtp (Exim 2.12 #2) id 136oXq-0001ui-0K; Tue, 27 Jun 2000 06:08:26 +0000 Received: from salmon.nlsystems.com (salmon.nlsystems.com [10.0.0.3]) by herring.nlsystems.com (8.9.3/8.8.8) with ESMTP id HAA08978; Tue, 27 Jun 2000 07:08:43 +0100 (BST) (envelope-from dfr@nlsystems.com) Date: Tue, 27 Jun 2000 07:12:32 +0100 (BST) From: Doug Rabson To: Alfred Perlstein Cc: John-Mark Gurney , arch@FreeBSD.ORG, dfr@FreeBSD.ORG Subject: Re: dynamic filetypes. please comment. In-Reply-To: <20000626181658.H275@fw.wintelcom.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Mon, 26 Jun 2000, Alfred Perlstein wrote: > * John-Mark Gurney [000626 17:02] wrote: > > Alfred Perlstein scribbled this message on Jun 26: > > > This idea leads us to a generic api for seqeunce number generation > > > that we can use when a subsystem needs an increasing unique number, > > > the api would look something like: > > > > > > (void)sequence_register("filetypes", starting_number); > > > mynum = sequence_next("filetypes"); /* to be used for f_type */ > > > > shouldn't we use newbus for this? and treat this like device driver > > assignment? we can "wire" down filetypes numbers using the same method > > that drivers are wired down with... > > > > Inventing another interface for one that already exists seems redundant.. > > Nice try, but I think this qualifies as interface abuse of the year. :) > > The problem is that I can't dynamically allocate the 'type' argument > to bus_alloc_resource. > > Doug, what do you think? Is there a way to dynamically make new > types? Or an easy way to make indepenant busses so that I can > allocate different sequences not pre-compiled into newbus? The type value is only interpreted by the parent (or grandparent or whatever) which actually does the allocation. If two subtrees have totally disjoint resource requirements then they could use the same numbers for resource types. -- Doug Rabson Mail: dfr@nlsystems.com Nonlinear Systems Ltd. Phone: +44 20 8442 9037 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message