creator-level saving new files in fat
[quarnos.git] / modules / module.h
blob014cfc5f1f7a7bcf867fa1a5b87777a7c6b2ccee
1 namespace modules {
2 class module {
3 public:
4 typedef enum {
5 module_kernel_space,
6 module_user_space,
7 module_network
8 } module_type;
9 private:
10 char *mname;
11 module *requires;
13 module_type mtype;
15 union {
16 struct {
17 void *code_start;
18 int code_size;
20 void *data_start;
21 int data_size;
23 void *bss_start;
24 int bss_size;
25 } kernel_space;
26 } __attribute((transparent_union));
27 public:
28 module(const char *, module_type);
30 void set_kernel_space(void *, int, void *, int, void *, int);