[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.
This commit is contained in:
Michael Brown
2009-03-13 00:13:38 +00:00
parent 1266d7902b
commit 3c68ff99ea
26 changed files with 185 additions and 130 deletions

View File

@@ -86,7 +86,7 @@ struct console_driver {
};
/** Console driver table */
#define CONSOLES "consoles"
#define CONSOLES __table ( struct console_driver, "consoles" )
/**
* Mark a <tt> struct console_driver </tt> as being part of the
@@ -105,7 +105,7 @@ struct console_driver {
* @endcode
*
*/
#define __console_driver __table ( struct console_driver, CONSOLES, 01 )
#define __console_driver __table_entry ( CONSOLES, 01 )
/* Function prototypes */