Prepping kernel export tables for various uses.
This commit is contained in:
14
src/xenia/kernel/util/export_table_post.inc
Normal file
14
src/xenia/kernel/util/export_table_post.inc
Normal file
@@ -0,0 +1,14 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
* 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 export table.
|
||||
|
||||
|
||||
#undef FLAG
|
||||
#undef XE_EXPORT
|
||||
35
src/xenia/kernel/util/export_table_pre.inc
Normal file
35
src/xenia/kernel/util/export_table_pre.inc
Normal file
@@ -0,0 +1,35 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
* 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 export table.
|
||||
* Use this to build tables of exports:
|
||||
*
|
||||
* // Build the export table used for resolution.
|
||||
* #include <xenia/kernel/util/export_table_pre.inc>
|
||||
* static KernelExport my_module_export_table[] = {
|
||||
* #include <xenia/kernel/modules/my_module/my_module_table.inc>
|
||||
* };
|
||||
* #include <xenia/kernel/util/export_table_post.inc>
|
||||
* export_resolver_->RegisterTable(
|
||||
* "my_module.xex",
|
||||
* my_module_export_table, XECOUNT(my_module_export_table));
|
||||
*/
|
||||
|
||||
|
||||
#define XE_EXPORT(module, ordinal, name, signature, type, flags) \
|
||||
{ \
|
||||
ordinal, \
|
||||
KernelExport::type, \
|
||||
flags, \
|
||||
#signature, \
|
||||
#name, \
|
||||
}
|
||||
|
||||
#define FLAG(t) kXEKernelExportFlag##t
|
||||
7
src/xenia/kernel/util/sources.gypi
Normal file
7
src/xenia/kernel/util/sources.gypi
Normal file
@@ -0,0 +1,7 @@
|
||||
# Copyright 2013 Ben Vanik. All Rights Reserved.
|
||||
{
|
||||
'sources': [
|
||||
'export_table_post.inc',
|
||||
'export_table_pre.inc',
|
||||
],
|
||||
}
|
||||
Reference in New Issue
Block a user