From owner-freebsd-arch Mon Jun 26 18:17: 3 2000 Delivered-To: freebsd-arch@freebsd.org Received: from fw.wintelcom.net (ns1.wintelcom.net [209.1.153.20]) by hub.freebsd.org (Postfix) with ESMTP id 6BFD137BDB7; Mon, 26 Jun 2000 18:17:00 -0700 (PDT) (envelope-from bright@fw.wintelcom.net) Received: (from bright@localhost) by fw.wintelcom.net (8.10.0/8.10.0) id e5R1GxW09685; Mon, 26 Jun 2000 18:16:59 -0700 (PDT) Date: Mon, 26 Jun 2000 18:16:59 -0700 From: Alfred Perlstein To: John-Mark Gurney Cc: arch@FreeBSD.ORG, dfr@FreeBSD.ORG Subject: Re: dynamic filetypes. please comment. Message-ID: <20000626181658.H275@fw.wintelcom.net> References: <20000626142428.A275@fw.wintelcom.net> <20000626170155.54803@hydrogen.funkthat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2i In-Reply-To: <20000626170155.54803@hydrogen.funkthat.com>; from gurney_j@efn.org on Mon, Jun 26, 2000 at 05:01:55PM -0700 Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG * 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? thanks, -Alfred To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message