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