tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/sys/dev

On Jun 2, 2011, at 11:36 PM, YAMAMOTO Takashi wrote:
>> sys/device.h has CFDRIVER_DECL, which defines (not declares) a
>> cfdriver struct.  So something like
>> #ifndef _MODULE
>> #define CFDRIVER_DECL(x) extern struct cfdriver __CONCAT(x,_cd)
>> #else
>> #define CFDRIVER_DECL(x) \
>> struct cfdriver __CONCAT(x,_cd) = { ... }
>> #endif
>> would work.  (Already working here.)
> can't it be non-conditional?
> eg. make a driver always provide the structure.
> (note that i'm autoconf-ignorant. :-)

The problem is when you have multiple attachments for a device.
Who declares foo_cd?

This of all the attachments for ehci.

maybe there needs to be a ehci_cd.o which just does the CFDRIVER_DECL and let 
the loader grab it.

Home | Main Index | Thread Index | Old Index