forked from embedded2013/rtenv
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsyscall_def.h
62 lines (59 loc) · 1.66 KB
/
syscall_def.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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#ifndef SYSCALL_DEF_H_20130919
#define SYSCALL_DEF_H_20130919
/* System calls */
#define SYS_CALL_FORK (0x01)
#define SYS_CALL_GETTID (0x02)
#define SYS_CALL_WRITE (0x03)
#define SYS_CALL_READ (0x04)
#define SYS_CALL_WAIT_INTR (0x05)
#define SYS_CALL_GETPRIORITY (0x06)
#define SYS_CALL_SETPRIORITY (0x07)
#define SYS_CALL_MK_NODE (0x08)
#define SYS_CALL_SLEEP (0x09)
#define SYS_CALL_GET_TASK_NAME (0x0A)
#define SYS_CALL_SET_TASK_NAME (0x0B)
#define SYS_CALL_TASK_EXIT (0x0C)
#ifdef USE_SEMIHOST
/* Refer to SYS_OPEN ARM document */
enum File_Type_t {
OPEN_RD = 0,
OPEN_RD_BIN,
OPEN_RD_ONLY,
OPEN_RD_ONLY_BIN,
OPEN_WR,
OPEN_WR_BIN,
OPEN_WR_ONLY,
OPEN_WR_ONLY_BIN,
OPEN_APPEND,
OPEN_APPEND_BIN,
OPEN_APPEND_ONLY,
OPEN_APPEND_ONLY_BIN
};
/* Referred to:
* ARM documents */
enum HOST_SYSCALL {
HOSTCALL_OPEN = 0x01,
HOSTCALL_CLOSE = 0x02,
HOSTCALL_WRITEC = 0x03,
HOSTCALL_WRITE0 = 0x04,
HOSTCALL_WRITE = 0x05,
HOSTCALL_READ = 0x06,
HOSTCALL_READC = 0x07,
HOSTCALL_ISERROR = 0x08,
HOSTCALL_ISTTY = 0x09,
HOSTCALL_SEEK = 0x0A,
HOSTCALL_FLEN = 0x0C,
HOSTCALL_REMOVE = 0x0E,
HOSTCALL_TMPNAM = 0x0D,
HOSTCALL_RENAME = 0x0F,
HOSTCALL_CLOCK = 0x10,
HOSTCALL_TIME = 0x11,
HOSTCALL_SYSTEM = 0x12,
HOSTCALL_ERRNO = 0x13,
HOSTCALL_GET_CMDLINE = 0x15,
HOSTCALL_HEAPINFO = 0x16,
HOSTCALL_ELAPSED = 0x30,
HOSTCALL_TICKFREQ = 0x31
};
#endif /* USE_SEMIHOST */
#endif /* SYSCALL_DEF_H_20130919 */