summaryrefslogtreecommitdiffstats
path: root/module.h
authorAnthony Liguori <[email protected]>2009-05-20 23:38:09 (GMT)
committer Anthony Liguori <[email protected]>2009-05-21 13:47:55 (GMT)
commitf80f9ec9a63bb2200d614feb658a77b78f9a4bba (patch) (side-by-side diff)
tree59e22e0a617e392a65431b82256fb443aa6ad850 /module.h
parentf92f8afebe038a4eae9ad90a140c9529f94919a6 (diff)
downloadqemu-kvm-f80f9ec9a63bb2200d614feb658a77b78f9a4bba.zip
qemu-kvm-f80f9ec9a63bb2200d614feb658a77b78f9a4bba.tar.gz
qemu-kvm-f80f9ec9a63bb2200d614feb658a77b78f9a4bba.tar.bz2
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 <[email protected]>
Diffstat (limited to 'module.h') (more/less context) (ignore whitespace changes)
-rw-r--r--module.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/module.h b/module.h
index 903c95b..9263f1c 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);