]> Git Repo - qemu.git/blame - module.h
LSI SCSI qdev conversion
[qemu.git] / module.h
CommitLineData
0bfe3ca5
AL
1/*
2 * QEMU Module Infrastructure
3 *
4 * Copyright IBM, Corp. 2009
5 *
6 * Authors:
7 * Anthony Liguori <[email protected]>
8 *
9 * This work is licensed under the terms of the GNU GPL, version 2. See
10 * the COPYING file in the top-level directory.
11 *
12 */
13
14#ifndef QEMU_MODULE_H
15#define QEMU_MODULE_H
16
17/* This should not be used directly. Use block_init etc. instead. */
18#define module_init(function, type) \
19static void __attribute__((constructor)) do_qemu_init_ ## function(void) { \
20 register_module_init(function, type); \
21}
22
23typedef enum {
24 MODULE_INIT_BLOCK,
25 MODULE_INIT_DEVICE
26} module_init_type;
27
28#define block_init(function) module_init(function, MODULE_INIT_BLOCK)
29#define device_init(function) module_init(function, MODULE_INIT_DEVICE)
30
31void register_module_init(void (*fn)(void), module_init_type type);
32
33void module_call_init(module_init_type type);
34
35#endif
This page took 0.026211 seconds and 4 git commands to generate.