|
1 | 1 | module builtin |
2 | 2 |
|
3 | 3 | enum SigIndex { |
4 | | - si_signo = 0x00 |
5 | | - si_code = 0x02 |
6 | | - si_pid = 0x04 |
7 | | - si_uid = 0x05 |
| 4 | + si_signo = 0x00 |
| 5 | + si_code = 0x02 |
| 6 | + si_pid = 0x04 |
| 7 | + si_uid = 0x05 |
8 | 8 | si_status = 0x06 |
9 | | - si_size = 0x80 |
| 9 | + si_size = 0x80 |
10 | 10 | } |
11 | 11 |
|
12 | 12 | enum Signo { |
13 | | - sighup = 1 // Hangup. |
14 | | - sigint = 2 // Interactive attention signal. |
15 | | - sigquit = 3 // Quit. |
16 | | - sigill = 4 // Illegal instruction. |
17 | | - sigtrap = 5 // Trace/breakpoint trap. |
18 | | - sigabrt = 6 // Abnormal termination. |
19 | | - sigbus = 7 |
20 | | - sigfpe = 8 // Erroneous arithmetic operation. |
21 | | - sigkill = 9 // Killed. |
22 | | - sigusr1 = 10 |
23 | | - sigsegv = 11 // Invalid access to memory. |
24 | | - sigusr2 = 12 |
25 | | - sigpipe = 13 // Broken pipe. |
26 | | - sigalrm = 14 // Alarm clock. |
27 | | - sigterm = 15 // Termination request. |
| 13 | + sighup = 1 // Hangup. |
| 14 | + sigint = 2 // Interactive attention signal. |
| 15 | + sigquit = 3 // Quit. |
| 16 | + sigill = 4 // Illegal instruction. |
| 17 | + sigtrap = 5 // Trace/breakpoint trap. |
| 18 | + sigabrt = 6 // Abnormal termination. |
| 19 | + sigbus = 7 |
| 20 | + sigfpe = 8 // Erroneous arithmetic operation. |
| 21 | + sigkill = 9 // Killed. |
| 22 | + sigusr1 = 10 |
| 23 | + sigsegv = 11 // Invalid access to memory. |
| 24 | + sigusr2 = 12 |
| 25 | + sigpipe = 13 // Broken pipe. |
| 26 | + sigalrm = 14 // Alarm clock. |
| 27 | + sigterm = 15 // Termination request. |
28 | 28 | sigstkflt = 16 |
29 | | - sigchld = 17 |
30 | | - sigcont = 18 |
31 | | - sigstop = 19 |
32 | | - sigtstp = 20 |
33 | | - sigttin = 21 // Background read from control terminal. |
34 | | - sigttou = 22 // Background write to control terminal. |
35 | | - sigurg = 23 |
36 | | - sigxcpu = 24 // CPU time limit exceeded. |
37 | | - sigxfsz = 25 // File size limit exceeded. |
| 29 | + sigchld = 17 |
| 30 | + sigcont = 18 |
| 31 | + sigstop = 19 |
| 32 | + sigtstp = 20 |
| 33 | + sigttin = 21 // Background read from control terminal. |
| 34 | + sigttou = 22 // Background write to control terminal. |
| 35 | + sigurg = 23 |
| 36 | + sigxcpu = 24 // CPU time limit exceeded. |
| 37 | + sigxfsz = 25 // File size limit exceeded. |
38 | 38 | sigvtalrm = 26 // Virtual timer expired. |
39 | | - sigprof = 27 // Profiling timer expired. |
40 | | - sigwinch = 28 |
41 | | - sigpoll = 29 |
42 | | - sigsys = 31 |
| 39 | + sigprof = 27 // Profiling timer expired. |
| 40 | + sigwinch = 28 |
| 41 | + sigpoll = 29 |
| 42 | + sigsys = 31 |
43 | 43 | } |
44 | 44 |
|
45 | 45 | // List of all the errors returned by syscalls |
46 | 46 | enum Errno { |
47 | 47 | enoerror = 0x00000000 |
48 | | - eperm = 0x00000001 |
49 | | - enoent = 0x00000002 |
50 | | - esrch = 0x00000003 |
51 | | - eintr = 0x00000004 |
52 | | - eio = 0x00000005 |
53 | | - enxio = 0x00000006 |
54 | | - e2big = 0x00000007 |
55 | | - enoexec = 0x00000008 |
56 | | - ebadf = 0x00000009 |
57 | | - echild = 0x0000000a |
58 | | - eagain = 0x0000000b |
59 | | - enomem = 0x0000000c |
60 | | - eacces = 0x0000000d |
61 | | - efault = 0x0000000e |
62 | | - enotblk = 0x0000000f |
63 | | - ebusy = 0x00000010 |
64 | | - eexist = 0x00000011 |
65 | | - exdev = 0x00000012 |
66 | | - enodev = 0x00000013 |
67 | | - enotdir = 0x00000014 |
68 | | - eisdir = 0x00000015 |
69 | | - einval = 0x00000016 |
70 | | - enfile = 0x00000017 |
71 | | - emfile = 0x00000018 |
72 | | - enotty = 0x00000019 |
73 | | - etxtbsy = 0x0000001a |
74 | | - efbig = 0x0000001b |
75 | | - enospc = 0x0000001c |
76 | | - espipe = 0x0000001d |
77 | | - erofs = 0x0000001e |
78 | | - emlink = 0x0000001f |
79 | | - epipe = 0x00000020 |
80 | | - edom = 0x00000021 |
81 | | - erange = 0x00000022 |
| 48 | + eperm = 0x00000001 |
| 49 | + enoent = 0x00000002 |
| 50 | + esrch = 0x00000003 |
| 51 | + eintr = 0x00000004 |
| 52 | + eio = 0x00000005 |
| 53 | + enxio = 0x00000006 |
| 54 | + e2big = 0x00000007 |
| 55 | + enoexec = 0x00000008 |
| 56 | + ebadf = 0x00000009 |
| 57 | + echild = 0x0000000a |
| 58 | + eagain = 0x0000000b |
| 59 | + enomem = 0x0000000c |
| 60 | + eacces = 0x0000000d |
| 61 | + efault = 0x0000000e |
| 62 | + enotblk = 0x0000000f |
| 63 | + ebusy = 0x00000010 |
| 64 | + eexist = 0x00000011 |
| 65 | + exdev = 0x00000012 |
| 66 | + enodev = 0x00000013 |
| 67 | + enotdir = 0x00000014 |
| 68 | + eisdir = 0x00000015 |
| 69 | + einval = 0x00000016 |
| 70 | + enfile = 0x00000017 |
| 71 | + emfile = 0x00000018 |
| 72 | + enotty = 0x00000019 |
| 73 | + etxtbsy = 0x0000001a |
| 74 | + efbig = 0x0000001b |
| 75 | + enospc = 0x0000001c |
| 76 | + espipe = 0x0000001d |
| 77 | + erofs = 0x0000001e |
| 78 | + emlink = 0x0000001f |
| 79 | + epipe = 0x00000020 |
| 80 | + edom = 0x00000021 |
| 81 | + erange = 0x00000022 |
82 | 82 | } |
83 | 83 |
|
84 | 84 | enum MemProt { |
85 | | - prot_read = 0x1 |
86 | | - prot_write = 0x2 |
87 | | - prot_exec = 0x4 |
88 | | - prot_none = 0x0 |
| 85 | + prot_read = 0x1 |
| 86 | + prot_write = 0x2 |
| 87 | + prot_exec = 0x4 |
| 88 | + prot_none = 0x0 |
89 | 89 | prot_growsdown = 0x01000000 |
90 | | - prot_growsup = 0x02000000 |
| 90 | + prot_growsup = 0x02000000 |
91 | 91 | } |
92 | 92 |
|
93 | 93 | enum MapFlags { |
94 | | - map_shared = 0x01 |
95 | | - map_private = 0x02 |
| 94 | + map_shared = 0x01 |
| 95 | + map_private = 0x02 |
96 | 96 | map_shared_validate = 0x03 |
97 | | - map_type = 0x0f |
98 | | - map_fixed = 0x10 |
99 | | - map_file = 0x00 |
100 | | - map_anonymous = 0x20 |
101 | | - map_huge_shift = 26 |
102 | | - map_huge_mask = 0x3f |
| 97 | + map_type = 0x0f |
| 98 | + map_fixed = 0x10 |
| 99 | + map_file = 0x00 |
| 100 | + map_anonymous = 0x20 |
| 101 | + map_huge_shift = 26 |
| 102 | + map_huge_mask = 0x3f |
103 | 103 | } |
104 | 104 |
|
105 | 105 | // const ( |
@@ -208,17 +208,17 @@ const ( |
208 | 208 |
|
209 | 209 | // First argument to waitid: |
210 | 210 | enum WiWhich { |
211 | | - p_all = 0 |
212 | | - p_pid = 1 |
| 211 | + p_all = 0 |
| 212 | + p_pid = 1 |
213 | 213 | p_pgid = 2 |
214 | 214 | } |
215 | 215 |
|
216 | 216 | enum WiSiCode { |
217 | | - cld_exited = 1 // child has exited |
218 | | - cld_killed = 2 // child was killed |
219 | | - cld_dumped = 3 // child terminated abnormally |
220 | | - cld_trapped = 4 // traced child has trapped |
221 | | - cld_stopped = 5 // child has stopped |
| 217 | + cld_exited = 1 // child has exited |
| 218 | + cld_killed = 2 // child was killed |
| 219 | + cld_dumped = 3 // child terminated abnormally |
| 220 | + cld_trapped = 4 // traced child has trapped |
| 221 | + cld_stopped = 5 // child has stopped |
222 | 222 | cld_continued = 6 // stopped child has continued |
223 | 223 | } |
224 | 224 |
|
|
0 commit comments