forked from yhzhang0128/egos-2000
-
Notifications
You must be signed in to change notification settings - Fork 0
/
egos.h
33 lines (27 loc) · 961 Bytes
/
egos.h
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
#pragma once
struct earth {
/* CPU interface */
int (*intr_enable)();
int (*intr_disable)();
int (*intr_register)(void (*handler)(int));
int (*excp_register)(void (*handler)(int));
int (*mmu_alloc)(int* frame_no, int* cached_addr);
int (*mmu_free)(int pid);
int (*mmu_map)(int pid, int page_no, int frame_no, int flag);
int (*mmu_switch)(int pid);
/* Disk and tty device driver interface */
int (*disk_read)(int block_no, int nblocks, char* dst);
int (*disk_write)(int block_no, int nblocks, char* src);
int (*tty_intr)();
int (*tty_read)(char* buf, int len);
int (*tty_write)(const char *format, ...);
int (*log_info)(const char *format, ...);
int (*log_fatal)(const char *format, ...);
int (*log_success)(const char *format, ...);
int (*log_highlight)(const char *format, ...);
};
struct grass {
int work_dir_ino;
char work_dir[32 * 16];
char work_dir_name[32];
};