Lucas De Marchi | e8fd8fe | 2012-07-18 10:19:48 -0300 | [diff] [blame] | 1 | #pragma once |
Lucas De Marchi | 53646fc | 2012-01-26 02:09:28 -0200 | [diff] [blame] | 2 | |
| 3 | enum module_state |
| 4 | { |
| 5 | MODULE_STATE_LIVE, |
| 6 | MODULE_STATE_COMING, |
| 7 | MODULE_STATE_GOING, |
| 8 | }; |
| 9 | |
| 10 | struct list_head { |
| 11 | struct list_head *next, *prev; |
| 12 | }; |
| 13 | |
| 14 | #define MODULE_NAME_LEN (64 - sizeof(unsigned long)) |
Lucas De Marchi | fca5b9b | 2012-06-21 11:30:56 -0300 | [diff] [blame] | 15 | |
Lucas De Marchi | 53646fc | 2012-01-26 02:09:28 -0200 | [diff] [blame] | 16 | struct module |
| 17 | { |
| 18 | enum module_state state; |
| 19 | |
| 20 | /* Member of list of modules */ |
| 21 | struct list_head list; |
| 22 | |
| 23 | /* Unique handle for this module */ |
| 24 | char name[MODULE_NAME_LEN]; |
| 25 | }; |
| 26 | |
Lucas De Marchi | fca5b9b | 2012-06-21 11:30:56 -0300 | [diff] [blame] | 27 | /* padding */ |
| 28 | #define MODULE_NAME_OFFSET_64 4 + 4 + 2 * 8 |
| 29 | #define MODULE_NAME_OFFSET_32 4 + 2 * 4 |