-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathusyscall.h
More file actions
58 lines (47 loc) · 1.05 KB
/
usyscall.h
File metadata and controls
58 lines (47 loc) · 1.05 KB
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
51
52
53
54
55
56
57
#ifndef _USYSCALL_H
#define _USYSCALL_H
/* Different possible syscall opcodes */
#define SYS_TERMREAD 1
#define SYS_TERMWRITE 2
#define SYS_SPAWN 3
#define SYS_WAIT 4
#define SYS_TERMINATE 5
#define SYS_MBOXCREATE 6
#define SYS_MBOXRELEASE 7
#define SYS_MBOXSEND 8
#define SYS_MBOXRECEIVE 9
#define SYS_MBOXCONDSEND 10
#define SYS_MBOXCONDRECEIVE 11
#define SYS_SLEEP 12
#define SYS_DISKREAD 13
#define SYS_DISKWRITE 14
#define SYS_DISKSIZE 15
#define SYS_SEMCREATE 16
#define SYS_SEMP 17
#define SYS_SEMV 18
#define SYS_SEMFREE 19
#define SYS_GETTIMEOFDAY 20
#define SYS_CPUTIME 21
#define SYS_GETPID 22
#ifdef PHASE_3
#define SYS_VMINIT 24
#define SYS_VMDESTROY 25
#define SYS_HEAPALLOC 26
#define SYS_HEAPFREE 27
#define SYS_PROTECT 28
#define SYS_SHARE 29
#define SYS_COW 30
#endif
// Leave some room for growth
#define USLOSS_MAX_SYSCALLS 30
/* The USLOSS_Sysargs structure */
typedef struct USLOSS_Sysargs
{
int number;
void *arg1;
void *arg2;
void *arg3;
void *arg4;
void *arg5;
} USLOSS_Sysargs;
#endif /* _SYSCALL_H */