summaryrefslogtreecommitdiffstats
path: root/testsuite/stripped-module.h
blob: 83986b2c44b373fdda71d76f93d8ae407352ac2f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#pragma once

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))

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];
};

/*                                padding */
#define MODULE_NAME_OFFSET_64 4 + 4           + 2 * 8
#define MODULE_NAME_OFFSET_32 4 + 2 * 4