[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 02:10:21 +00:00
parent 1266d7902b
commit 3c68ff99ea
26 changed files with 185 additions and 130 deletions
+2 -3
View File
@@ -64,7 +64,7 @@ process_init ( struct process *process,
}
/** Permanent process table */
#define PERMANENT_PROCESSES "processes"
#define PERMANENT_PROCESSES __table ( struct process, "processes" )
/**
* Declare a permanent process
@@ -72,7 +72,6 @@ process_init ( struct process *process,
* Permanent processes will be automatically added to the process list
* at initialisation time.
*/
#define __permanent_process \
__table ( struct process, PERMANENT_PROCESSES, 01 )
#define __permanent_process __table_entry ( PERMANENT_PROCESSES, 01 )
#endif /* _GPXE_PROCESS_H */