2012-07-18 20:19:48 +07:00
|
|
|
#pragma once
|
2012-01-26 11:09:28 +07:00
|
|
|
|
|
|
|
enum module_state
|
|
|
|
{
|
|
|
|
MODULE_STATE_LIVE,
|
|
|
|
MODULE_STATE_COMING,
|
|
|
|
MODULE_STATE_GOING,
|
|
|
|
};
|
|
|
|
|
|
|
|
struct list_head {
|
|
|
|
struct list_head *next, *prev;
|
|
|
|
};
|
|
|
|
|
|
|
|
#define MODULE_NAME_LEN (64 - sizeof(unsigned long))
|
2012-06-21 21:30:56 +07:00
|
|
|
|
2012-01-26 11:09:28 +07:00
|
|
|
struct module
|
|
|
|
{
|
|
|
|
enum module_state state;
|
|
|
|
|
|
|
|
/* Member of list of modules */
|
|
|
|
struct list_head list;
|
|
|
|
|
|
|
|
/* Unique handle for this module */
|
|
|
|
char name[MODULE_NAME_LEN];
|
|
|
|
};
|
|
|
|
|
2012-06-21 21:30:56 +07:00
|
|
|
/* padding */
|
|
|
|
#define MODULE_NAME_OFFSET_64 4 + 4 + 2 * 8
|
|
|
|
#define MODULE_NAME_OFFSET_32 4 + 2 * 4
|