tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Modularizing net80211 (was: link_set info needed)
On Mon, Apr 30, 2012 at 06:52:52AM -0700, Paul Goyette wrote:
> I'd still like to find a way forward with this issue.
>
> Since we can differentiate (both at compile time and at run-time)
> between the two modes (built-in vs loaded), I'd like to propose adding
> the data to support both modes into the mod_info_t structure:
>
> typedef union {
> struct { /* For built-in modules */
> void *list_start;
> void *list_end;
> } func_list;
> const char *section; /* For loaded modules */
> } func_list_t;
> ....
> typedef struct module {
> ....
> u_int mod_fbtentries; /* DTrace FBT entrie count */
> int mod_flags;
> func_list_t mod_ctors, mod_dtors;
> #define MODFLG_MUST_FORCE 0x01
> #define MODFLG_AUTO_LOADED 0x02
>
> } module_t;
> ....
>
> Then the MODULE (or MODULE_NEW) macro can intialize the appropriate
> members of the unions, and the run-time code can find the start and end
> of the link_set section.
>
>
> Comments?
I might try to find some round tuits to look at the kernel & module
links.
But I've a more pressing request for a few days at least.
David
--
David Laight: david%l8s.co.uk@localhost
Home |
Main Index |
Thread Index |
Old Index