diff options
author | Michael Brown | 2009-03-13 01:13:38 +0100 |
---|---|---|
committer | Michael Brown | 2009-03-13 03:10:21 +0100 |
commit | 3c68ff99eaff6e0d615349bdc85ea12ad8345284 (patch) | |
tree | 969a335fe8d1685203f7bfe90d07868dcbc1fe34 /src/include/gpxe/init.h | |
parent | [tables] Redefine methods for accessing linker tables (diff) | |
download | ipxe-3c68ff99eaff6e0d615349bdc85ea12ad8345284.tar.gz ipxe-3c68ff99eaff6e0d615349bdc85ea12ad8345284.tar.xz ipxe-3c68ff99eaff6e0d615349bdc85ea12ad8345284.zip |
[tables] Incorporate table data type information into table definition
Eliminate the potential for mismatches between table names and the
table entry data type by incorporating the data type into the
definition of the table, rather than specifying it explicitly in each
table accessor method.
Diffstat (limited to 'src/include/gpxe/init.h')
-rw-r--r-- | src/include/gpxe/init.h | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/include/gpxe/init.h b/src/include/gpxe/init.h index 9ce56d77..5a51b033 100644 --- a/src/include/gpxe/init.h +++ b/src/include/gpxe/init.h @@ -14,11 +14,10 @@ struct init_fn { }; /** Initialisation function table */ -#define INIT_FNS "init_fns" +#define INIT_FNS __table ( struct init_fn, "init_fns" ) /** Declare an initialisation functon */ -#define __init_fn( init_order ) \ - __table ( struct init_fn, INIT_FNS, init_order ) +#define __init_fn( init_order ) __table_entry ( INIT_FNS, init_order ) /** @defgroup initfn_order Initialisation function ordering * @{ @@ -53,11 +52,11 @@ struct startup_fn { }; /** Startup/shutdown function table */ -#define STARTUP_FNS "startup_fns" +#define STARTUP_FNS __table ( struct startup_fn, "startup_fns" ) /** Declare a startup/shutdown function */ #define __startup_fn( startup_order ) \ - __table ( struct startup_fn, STARTUP_FNS, startup_order ) + __table_entry ( STARTUP_FNS, startup_order ) /** @defgroup startfn_order Startup/shutdown function ordering * |