blob: 0c91e0f7372dba8444fd6fdb0b3fba26718fb48c [file] [log] [blame]
Russ Coxad817922014-11-21 10:22:18 -05001// Copyright 2014 The Go Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style
3// license that can be found in the LICENSE file.
4
5package runtime
6
7const (
8 _NSIG = 32
9 _SI_USER = 1
10
11 // native_client/src/trusted/service_runtime/include/sys/errno.h
12 // The errors are mainly copied from Linux.
13 _EPERM = 1 /* Operation not permitted */
14 _ENOENT = 2 /* No such file or directory */
15 _ESRCH = 3 /* No such process */
16 _EINTR = 4 /* Interrupted system call */
17 _EIO = 5 /* I/O error */
18 _ENXIO = 6 /* No such device or address */
19 _E2BIG = 7 /* Argument list too long */
20 _ENOEXEC = 8 /* Exec format error */
21 _EBADF = 9 /* Bad file number */
22 _ECHILD = 10 /* No child processes */
23 _EAGAIN = 11 /* Try again */
24 _ENOMEM = 12 /* Out of memory */
25 _EACCES = 13 /* Permission denied */
26 _EFAULT = 14 /* Bad address */
27 _EBUSY = 16 /* Device or resource busy */
28 _EEXIST = 17 /* File exists */
29 _EXDEV = 18 /* Cross-device link */
30 _ENODEV = 19 /* No such device */
31 _ENOTDIR = 20 /* Not a directory */
32 _EISDIR = 21 /* Is a directory */
33 _EINVAL = 22 /* Invalid argument */
34 _ENFILE = 23 /* File table overflow */
35 _EMFILE = 24 /* Too many open files */
36 _ENOTTY = 25 /* Not a typewriter */
37 _EFBIG = 27 /* File too large */
38 _ENOSPC = 28 /* No space left on device */
39 _ESPIPE = 29 /* Illegal seek */
40 _EROFS = 30 /* Read-only file system */
41 _EMLINK = 31 /* Too many links */
42 _EPIPE = 32 /* Broken pipe */
43 _ENAMETOOLONG = 36 /* File name too long */
44 _ENOSYS = 38 /* Function not implemented */
45 _EDQUOT = 122 /* Quota exceeded */
46 _EDOM = 33 /* Math arg out of domain of func */
47 _ERANGE = 34 /* Math result not representable */
48 _EDEADLK = 35 /* Deadlock condition */
49 _ENOLCK = 37 /* No record locks available */
50 _ENOTEMPTY = 39 /* Directory not empty */
51 _ELOOP = 40 /* Too many symbolic links */
52 _ENOMSG = 42 /* No message of desired type */
53 _EIDRM = 43 /* Identifier removed */
54 _ECHRNG = 44 /* Channel number out of range */
55 _EL2NSYNC = 45 /* Level 2 not synchronized */
56 _EL3HLT = 46 /* Level 3 halted */
57 _EL3RST = 47 /* Level 3 reset */
58 _ELNRNG = 48 /* Link number out of range */
59 _EUNATCH = 49 /* Protocol driver not attached */
60 _ENOCSI = 50 /* No CSI structure available */
61 _EL2HLT = 51 /* Level 2 halted */
62 _EBADE = 52 /* Invalid exchange */
63 _EBADR = 53 /* Invalid request descriptor */
64 _EXFULL = 54 /* Exchange full */
65 _ENOANO = 55 /* No anode */
66 _EBADRQC = 56 /* Invalid request code */
67 _EBADSLT = 57 /* Invalid slot */
68 _EDEADLOCK = _EDEADLK /* File locking deadlock error */
69 _EBFONT = 59 /* Bad font file fmt */
70 _ENOSTR = 60 /* Device not a stream */
71 _ENODATA = 61 /* No data (for no delay io) */
72 _ETIME = 62 /* Timer expired */
73 _ENOSR = 63 /* Out of streams resources */
74 _ENONET = 64 /* Machine is not on the network */
75 _ENOPKG = 65 /* Package not installed */
76 _EREMOTE = 66 /* The object is remote */
77 _ENOLINK = 67 /* The link has been severed */
78 _EADV = 68 /* Advertise error */
79 _ESRMNT = 69 /* Srmount error */
80 _ECOMM = 70 /* Communication error on send */
81 _EPROTO = 71 /* Protocol error */
82 _EMULTIHOP = 72 /* Multihop attempted */
83 _EDOTDOT = 73 /* Cross mount point (not really error) */
84 _EBADMSG = 74 /* Trying to read unreadable message */
85 _EOVERFLOW = 75 /* Value too large for defined data type */
86 _ENOTUNIQ = 76 /* Given log. name not unique */
87 _EBADFD = 77 /* f.d. invalid for this operation */
88 _EREMCHG = 78 /* Remote address changed */
89 _ELIBACC = 79 /* Can't access a needed shared lib */
90 _ELIBBAD = 80 /* Accessing a corrupted shared lib */
91 _ELIBSCN = 81 /* .lib section in a.out corrupted */
92 _ELIBMAX = 82 /* Attempting to link in too many libs */
93 _ELIBEXEC = 83 /* Attempting to exec a shared library */
94 _EILSEQ = 84
95 _EUSERS = 87
96 _ENOTSOCK = 88 /* Socket operation on non-socket */
97 _EDESTADDRREQ = 89 /* Destination address required */
98 _EMSGSIZE = 90 /* Message too long */
99 _EPROTOTYPE = 91 /* Protocol wrong type for socket */
100 _ENOPROTOOPT = 92 /* Protocol not available */
101 _EPROTONOSUPPORT = 93 /* Unknown protocol */
102 _ESOCKTNOSUPPORT = 94 /* Socket type not supported */
103 _EOPNOTSUPP = 95 /* Operation not supported on transport endpoint */
104 _EPFNOSUPPORT = 96 /* Protocol family not supported */
105 _EAFNOSUPPORT = 97 /* Address family not supported by protocol family */
106 _EADDRINUSE = 98 /* Address already in use */
107 _EADDRNOTAVAIL = 99 /* Address not available */
108 _ENETDOWN = 100 /* Network interface is not configured */
109 _ENETUNREACH = 101 /* Network is unreachable */
110 _ENETRESET = 102
111 _ECONNABORTED = 103 /* Connection aborted */
112 _ECONNRESET = 104 /* Connection reset by peer */
113 _ENOBUFS = 105 /* No buffer space available */
114 _EISCONN = 106 /* Socket is already connected */
115 _ENOTCONN = 107 /* Socket is not connected */
116 _ESHUTDOWN = 108 /* Can't send after socket shutdown */
117 _ETOOMANYREFS = 109
118 _ETIMEDOUT = 110 /* Connection timed out */
119 _ECONNREFUSED = 111 /* Connection refused */
120 _EHOSTDOWN = 112 /* Host is down */
121 _EHOSTUNREACH = 113 /* Host is unreachable */
122 _EALREADY = 114 /* Socket already connected */
123 _EINPROGRESS = 115 /* Connection already in progress */
124 _ESTALE = 116
125 _ENOTSUP = _EOPNOTSUPP /* Not supported */
126 _ENOMEDIUM = 123 /* No medium (in tape drive) */
127 _ECANCELED = 125 /* Operation canceled. */
128 _ELBIN = 2048 /* Inode is remote (not really error) */
129 _EFTYPE = 2049 /* Inappropriate file type or format */
130 _ENMFILE = 2050 /* No more files */
131 _EPROCLIM = 2051
132 _ENOSHARE = 2052 /* No such host or network path */
133 _ECASECLASH = 2053 /* Filename exists with different case */
134 _EWOULDBLOCK = _EAGAIN /* Operation would block */
135
136 // native_client/src/trusted/service_runtime/include/bits/mman.h.
137 // NOTE: DO NOT USE native_client/src/shared/imc/nacl_imc_c.h.
138 // Those MAP_*values are different from these.
139 _PROT_NONE = 0x0
140 _PROT_READ = 0x1
141 _PROT_WRITE = 0x2
142 _PROT_EXEC = 0x4
143
144 _MAP_SHARED = 0x1
145 _MAP_PRIVATE = 0x2
146 _MAP_FIXED = 0x10
147 _MAP_ANON = 0x20
148
149 _MADV_FREE = 0
150 _SIGFPE = 8
151 _FPE_INTDIV = 0
152)
153
154type siginfo struct{}