aboutsummaryrefslogtreecommitdiff
path: root/module.h
diff options
context:
space:
mode:
authorAnthony Liguori <aliguori@us.ibm.com>2009-05-20 18:38:09 -0500
committerAnthony Liguori <aliguori@us.ibm.com>2009-05-21 08:47:55 -0500
commitf80f9ec9a63bb2200d614feb658a77b78f9a4bba (patch)
tree59e22e0a617e392a65431b82256fb443aa6ad850 /module.h
parentf92f8afebe038a4eae9ad90a140c9529f94919a6 (diff)
Convert machine registration to use module init functions
This cleans up quite a lot of #ifdefs, extern variables, and other ugliness. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'module.h')
-rw-r--r--module.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/module.h b/module.h
index 903c95b5d3..9263f1c7e2 100644
--- a/module.h
+++ b/module.h
@@ -23,11 +23,13 @@ static void __attribute__((constructor)) do_qemu_init_ ## function(void) { \
typedef enum {
MODULE_INIT_BLOCK,
MODULE_INIT_DEVICE,
+ MODULE_INIT_MACHINE,
MODULE_INIT_MAX
} module_init_type;
#define block_init(function) module_init(function, MODULE_INIT_BLOCK)
#define device_init(function) module_init(function, MODULE_INIT_DEVICE)
+#define machine_init(function) module_init(function, MODULE_INIT_MACHINE)
void register_module_init(void (*fn)(void), module_init_type type);