Subject: Re: Call for review: The New Block/Character Device Switch Configuration
To: MAEKAWA Masahide <>
From: Bill Studenmund <>
List: tech-kern
Date: 06/28/2001 12:20:17
On Thu, 28 Jun 2001, MAEKAWA Masahide wrote:

> - Are interfaces to each devices necessary to be global? What do you think
>   that exists kludge hacks to avoid namespace conflicts?

Which "hacks" are you refering to?

> 3.1.	Ideas
> The bdevsw/cdevsw tables are dealed with in the abstract to support
> to attach/detach the bdevsw/cdevsw data dynamically. Each drivers should
> use devsw_get(9) and devsw_lookup(9) to get the device interface instead of
> accessing them directly.
> The initial bdevsw/cdevsw tables are generated automatically by config(8)
> Each bdevsw/cdevsw entry is a set of device interface functions and
> is put as a structure data in each drivers source.
> The structure data only refers to bdevsw/cdevsw interfaces. Now each
> interfaces are not global functions but local functions in their source.
> I.e. all interfaces are declared as a static function. If necessary to access
> the interface, we must access it via its structure data. Again, we must not
> access the interfaces directly now.

I think making all of the routines static would be a bad idea. ddb and kdb
don't deal well with static routines - traces will show ?? for routine
names, which is quite cryptic. :-)

Take care,