blob: 3b2575139cd4cca8d300e5e865635039b49a1f91 (
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
#ifndef __SYS_VFS_H
#define __SYS_VFS_H
#include <stdint.h>
#define VFS_MODULE_MAX 128
#define VFS_MODULE_NAME_MAX 64
#define VFS_SYMBOL_INIT _init
#define VFS_SYMBOL_START _start
#define VFS_STRINGIFY(X) #X
#define VFS_TOSTRING(X) VFS_STRINGIFY(X)
#define VFS_MODULE_DEFINE_START(f) \
extern "C" void VFS_SYMBOL_START(void* args) \
{ \
f(args); \
}
#ifdef __cplusplus
extern "C"
{
#endif
extern const char* VFS_ROOT;
extern const char* VFS_ROOT_BIN;
extern const char* VFS_ROOT_DATA;
extern const char* VFS_ROOT_MSG;
enum VfsMessages
{
VFS_MSG_REGISTER_MSGQ,
VFS_MSG_RESOLVE_MSGQ,
VFS_MSG_EXEC,
};
struct VfsSystemModule
{
const char module[VFS_MODULE_NAME_MAX];
void (*init)(void*);
void (*start)(void*);
};
extern VfsSystemModule VFS_MODULES[VFS_MODULE_MAX];
extern uint64_t VFS_LAST_ADDRESS;
#ifdef __cplusplus
}
#endif
#endif
|