Adding ordinal enums to kernel modules.

Access via xe::kernel::modules::xboxkrnl::ordinals::MyFunction
(or just ordinals::MyFunction when in the namespace).
Some collisions occurred - just added random suffixes for now.
This commit is contained in:
Ben Vanik
2013-05-26 19:28:46 -07:00
parent 87b8ebd613
commit a332faf419
11 changed files with 114 additions and 10 deletions

View File

@@ -0,0 +1,13 @@
/**
******************************************************************************
* Xenia : Xbox 360 Emulator Research Project *
******************************************************************************
* Copyright 2013 Ben Vanik. All rights reserved. *
* Released under the BSD license - see LICENSE in the root for more details. *
******************************************************************************
*/
// Post-include file for an ordinal table.
#undef XE_EXPORT

View File

@@ -0,0 +1,27 @@
/**
******************************************************************************
* Xenia : Xbox 360 Emulator Research Project *
******************************************************************************
* Copyright 2013 Ben Vanik. All rights reserved. *
* Released under the BSD license - see LICENSE in the root for more details. *
******************************************************************************
*/
/**
* Pre-include file for an ordinal table.
* Use this to build tables of constants describing the ordinals:
*
* // Build an ordinal enum to make it easy to lookup ordinals.
* #include <xenia/kernel/util/ordinal_table_pre.inc>
* namespace ordinals {
* enum {
* #include <xenia/kernel/modules/my_module/my_module_table.inc>
* };
* } // namespace ordinals
* #include <xenia/kernel/util/ordinal_table_post.inc>
*/
#define XE_EXPORT(module, ordinal, name, signature, type, flags) \
name = ordinal

View File

@@ -3,5 +3,7 @@
'sources': [
'export_table_post.inc',
'export_table_pre.inc',
'ordinal_table_post.inc',
'ordinal_table_pre.inc',
],
}