make runtime compatible with wasm

This commit is contained in:
Li Jie
2025-04-08 16:50:47 +08:00
parent 7c81d9293b
commit be4737461a
183 changed files with 14122 additions and 647 deletions

View File

@@ -1151,3 +1151,167 @@ const (
SIGXCPU = Signal(0x18)
SIGXFSZ = Signal(0x19)
)
// Error table
var errors = [...]string{
1: "not owner",
2: "no such file or directory",
3: "no such process",
4: "interrupted system call",
5: "I/O error",
6: "no such device or address",
7: "arg list too long",
8: "exec format error",
9: "bad file number",
10: "no child processes",
11: "resource temporarily unavailable",
12: "not enough space",
13: "permission denied",
14: "bad address",
15: "block device required",
16: "device busy",
17: "file exists",
18: "cross-device link",
19: "no such device",
20: "not a directory",
21: "is a directory",
22: "invalid argument",
23: "file table overflow",
24: "too many open files",
25: "not a typewriter",
26: "text file busy",
27: "file too large",
28: "no space left on device",
29: "illegal seek",
30: "read-only file system",
31: "too many links",
32: "broken pipe",
33: "argument out of domain",
34: "result too large",
35: "no message of desired type",
36: "identifier removed",
37: "channel number out of range",
38: "level 2 not synchronized",
39: "level 3 halted",
40: "level 3 reset",
41: "link number out of range",
42: "protocol driver not attached",
43: "no CSI structure available",
44: "level 2 halted",
45: "deadlock condition if locked",
46: "device not ready",
47: "write-protected media",
48: "unformatted or incompatible media",
49: "no locks available",
50: "cannot Establish Connection",
52: "missing file or filesystem",
53: "requests blocked by Administrator",
55: "operation now in progress",
56: "operation already in progress",
57: "socket operation on non-socket",
58: "destination address required",
59: "message too long",
60: "protocol wrong type for socket",
61: "protocol not available",
62: "protocol not supported",
63: "socket type not supported",
64: "operation not supported on socket",
65: "protocol family not supported",
66: "addr family not supported by protocol",
67: "address already in use",
68: "can't assign requested address",
69: "network is down",
70: "network is unreachable",
71: "network dropped connection on reset",
72: "software caused connection abort",
73: "connection reset by peer",
74: "no buffer space available",
75: "socket is already connected",
76: "socket is not connected",
77: "can't send after socket shutdown",
78: "connection timed out",
79: "connection refused",
80: "host is down",
81: "no route to host",
82: "restart the system call",
83: "too many processes",
84: "too many users",
85: "too many levels of symbolic links",
86: "file name too long",
88: "disk quota exceeded",
89: "invalid file system control data detected",
90: "for future use ",
93: "item is not local to host",
94: "state not recoverable ",
95: "previous owner died ",
109: "function not implemented",
110: "media surface error",
111: "I/O completed, but needs relocation",
112: "no attribute found",
113: "security Authentication Denied",
114: "not a Trusted Program",
115: "too many references: can't splice",
116: "invalid wide character",
117: "asynchronous I/O cancelled",
118: "out of STREAMS resources",
119: "system call timed out",
120: "next message has wrong type",
121: "error in protocol",
122: "no message on stream head read q",
123: "fd not associated with a stream",
124: "unsupported attribute value",
125: "multihop is not allowed",
126: "the server link has been severed",
127: "value too large to be stored in data type",
}
// Signal table
var signals = [...]string{
1: "hangup",
2: "interrupt",
3: "quit",
4: "illegal instruction",
5: "trace/BPT trap",
6: "IOT/Abort trap",
7: "EMT trap",
8: "floating point exception",
9: "killed",
10: "bus error",
11: "segmentation fault",
12: "bad system call",
13: "broken pipe",
14: "alarm clock",
15: "terminated",
16: "urgent I/O condition",
17: "stopped (signal)",
18: "stopped",
19: "continued",
20: "child exited",
21: "stopped (tty input)",
22: "stopped (tty output)",
23: "I/O possible/complete",
24: "cputime limit exceeded",
25: "filesize limit exceeded",
27: "input device data",
28: "window size changes",
29: "power-failure",
30: "user defined signal 1",
31: "user defined signal 2",
32: "profiling timer expired",
33: "paging space low",
34: "virtual timer expired",
35: "signal 35",
36: "signal 36",
37: "signal 37",
38: "signal 38",
39: "signal 39",
48: "signal 48",
49: "signal 49",
58: "signal 58",
59: "CPU Failure Predicted",
60: "monitor mode granted",
61: "monitor mode retracted",
62: "sound completed",
63: "secure attention",
255: "signal 255",
}