github.com/HaHadaxigua/yaegi@v1.0.1/stdlib/syscall/go1_16_syscall_plan9_386.go (about)

     1  // Code generated by 'yaegi extract syscall'. DO NOT EDIT.
     2  
     3  // +build go1.16,!go1.17
     4  
     5  package syscall
     6  
     7  import (
     8  	"go/constant"
     9  	"go/token"
    10  	"reflect"
    11  	"syscall"
    12  )
    13  
    14  func init() {
    15  	Symbols["syscall/syscall"] = map[string]reflect.Value{
    16  		// function, constant and variable definitions
    17  		"Await":               reflect.ValueOf(syscall.Await),
    18  		"Bind":                reflect.ValueOf(syscall.Bind),
    19  		"BytePtrFromString":   reflect.ValueOf(syscall.BytePtrFromString),
    20  		"ByteSliceFromString": reflect.ValueOf(syscall.ByteSliceFromString),
    21  		"Chdir":               reflect.ValueOf(syscall.Chdir),
    22  		"Clearenv":            reflect.ValueOf(syscall.Clearenv),
    23  		"Close":               reflect.ValueOf(syscall.Close),
    24  		"Create":              reflect.ValueOf(syscall.Create),
    25  		"DMAPPEND":            reflect.ValueOf(constant.MakeFromLiteral("1073741824", token.INT, 0)),
    26  		"DMAUTH":              reflect.ValueOf(constant.MakeFromLiteral("134217728", token.INT, 0)),
    27  		"DMDIR":               reflect.ValueOf(constant.MakeFromLiteral("2147483648", token.INT, 0)),
    28  		"DMEXCL":              reflect.ValueOf(constant.MakeFromLiteral("536870912", token.INT, 0)),
    29  		"DMEXEC":              reflect.ValueOf(constant.MakeFromLiteral("1", token.INT, 0)),
    30  		"DMMOUNT":             reflect.ValueOf(constant.MakeFromLiteral("268435456", token.INT, 0)),
    31  		"DMREAD":              reflect.ValueOf(constant.MakeFromLiteral("4", token.INT, 0)),
    32  		"DMTMP":               reflect.ValueOf(constant.MakeFromLiteral("67108864", token.INT, 0)),
    33  		"DMWRITE":             reflect.ValueOf(constant.MakeFromLiteral("2", token.INT, 0)),
    34  		"Dup":                 reflect.ValueOf(syscall.Dup),
    35  		"EACCES":              reflect.ValueOf(&syscall.EACCES).Elem(),
    36  		"EAFNOSUPPORT":        reflect.ValueOf(&syscall.EAFNOSUPPORT).Elem(),
    37  		"EBUSY":               reflect.ValueOf(&syscall.EBUSY).Elem(),
    38  		"EEXIST":              reflect.ValueOf(&syscall.EEXIST).Elem(),
    39  		"EINTR":               reflect.ValueOf(&syscall.EINTR).Elem(),
    40  		"EINVAL":              reflect.ValueOf(&syscall.EINVAL).Elem(),
    41  		"EIO":                 reflect.ValueOf(&syscall.EIO).Elem(),
    42  		"EISDIR":              reflect.ValueOf(&syscall.EISDIR).Elem(),
    43  		"EMFILE":              reflect.ValueOf(&syscall.EMFILE).Elem(),
    44  		"ENAMETOOLONG":        reflect.ValueOf(&syscall.ENAMETOOLONG).Elem(),
    45  		"ENOENT":              reflect.ValueOf(&syscall.ENOENT).Elem(),
    46  		"ENOTDIR":             reflect.ValueOf(&syscall.ENOTDIR).Elem(),
    47  		"EPERM":               reflect.ValueOf(&syscall.EPERM).Elem(),
    48  		"EPLAN9":              reflect.ValueOf(&syscall.EPLAN9).Elem(),
    49  		"ERRMAX":              reflect.ValueOf(constant.MakeFromLiteral("128", token.INT, 0)),
    50  		"ESPIPE":              reflect.ValueOf(&syscall.ESPIPE).Elem(),
    51  		"ETIMEDOUT":           reflect.ValueOf(&syscall.ETIMEDOUT).Elem(),
    52  		"Environ":             reflect.ValueOf(syscall.Environ),
    53  		"ErrBadName":          reflect.ValueOf(&syscall.ErrBadName).Elem(),
    54  		"ErrBadStat":          reflect.ValueOf(&syscall.ErrBadStat).Elem(),
    55  		"ErrShortStat":        reflect.ValueOf(&syscall.ErrShortStat).Elem(),
    56  		"Fchdir":              reflect.ValueOf(syscall.Fchdir),
    57  		"Fd2path":             reflect.ValueOf(syscall.Fd2path),
    58  		"Fixwd":               reflect.ValueOf(syscall.Fixwd),
    59  		"ForkLock":            reflect.ValueOf(&syscall.ForkLock).Elem(),
    60  		"Fstat":               reflect.ValueOf(syscall.Fstat),
    61  		"Fwstat":              reflect.ValueOf(syscall.Fwstat),
    62  		"Getegid":             reflect.ValueOf(syscall.Getegid),
    63  		"Getenv":              reflect.ValueOf(syscall.Getenv),
    64  		"Geteuid":             reflect.ValueOf(syscall.Geteuid),
    65  		"Getgid":              reflect.ValueOf(syscall.Getgid),
    66  		"Getgroups":           reflect.ValueOf(syscall.Getgroups),
    67  		"Getpagesize":         reflect.ValueOf(syscall.Getpagesize),
    68  		"Getpid":              reflect.ValueOf(syscall.Getpid),
    69  		"Getppid":             reflect.ValueOf(syscall.Getppid),
    70  		"Gettimeofday":        reflect.ValueOf(syscall.Gettimeofday),
    71  		"Getuid":              reflect.ValueOf(syscall.Getuid),
    72  		"Getwd":               reflect.ValueOf(syscall.Getwd),
    73  		"ImplementsGetwd":     reflect.ValueOf(syscall.ImplementsGetwd),
    74  		"MAFTER":              reflect.ValueOf(constant.MakeFromLiteral("2", token.INT, 0)),
    75  		"MBEFORE":             reflect.ValueOf(constant.MakeFromLiteral("1", token.INT, 0)),
    76  		"MCACHE":              reflect.ValueOf(constant.MakeFromLiteral("16", token.INT, 0)),
    77  		"MCREATE":             reflect.ValueOf(constant.MakeFromLiteral("4", token.INT, 0)),
    78  		"MMASK":               reflect.ValueOf(constant.MakeFromLiteral("23", token.INT, 0)),
    79  		"MORDER":              reflect.ValueOf(constant.MakeFromLiteral("3", token.INT, 0)),
    80  		"MREPL":               reflect.ValueOf(constant.MakeFromLiteral("0", token.INT, 0)),
    81  		"Mkdir":               reflect.ValueOf(syscall.Mkdir),
    82  		"Mount":               reflect.ValueOf(syscall.Mount),
    83  		"NewError":            reflect.ValueOf(syscall.NewError),
    84  		"NsecToTimeval":       reflect.ValueOf(syscall.NsecToTimeval),
    85  		"O_APPEND":            reflect.ValueOf(constant.MakeFromLiteral("1024", token.INT, 0)),
    86  		"O_ASYNC":             reflect.ValueOf(constant.MakeFromLiteral("0", token.INT, 0)),
    87  		"O_CLOEXEC":           reflect.ValueOf(constant.MakeFromLiteral("32", token.INT, 0)),
    88  		"O_CREAT":             reflect.ValueOf(constant.MakeFromLiteral("8192", token.INT, 0)),
    89  		"O_EXCL":              reflect.ValueOf(constant.MakeFromLiteral("4096", token.INT, 0)),
    90  		"O_NOCTTY":            reflect.ValueOf(constant.MakeFromLiteral("0", token.INT, 0)),
    91  		"O_NONBLOCK":          reflect.ValueOf(constant.MakeFromLiteral("0", token.INT, 0)),
    92  		"O_RDONLY":            reflect.ValueOf(constant.MakeFromLiteral("0", token.INT, 0)),
    93  		"O_RDWR":              reflect.ValueOf(constant.MakeFromLiteral("2", token.INT, 0)),
    94  		"O_SYNC":              reflect.ValueOf(constant.MakeFromLiteral("0", token.INT, 0)),
    95  		"O_TRUNC":             reflect.ValueOf(constant.MakeFromLiteral("16", token.INT, 0)),
    96  		"O_WRONLY":            reflect.ValueOf(constant.MakeFromLiteral("1", token.INT, 0)),
    97  		"Open":                reflect.ValueOf(syscall.Open),
    98  		"Pipe":                reflect.ValueOf(syscall.Pipe),
    99  		"Pread":               reflect.ValueOf(syscall.Pread),
   100  		"Pwrite":              reflect.ValueOf(syscall.Pwrite),
   101  		"QTAPPEND":            reflect.ValueOf(constant.MakeFromLiteral("64", token.INT, 0)),
   102  		"QTAUTH":              reflect.ValueOf(constant.MakeFromLiteral("8", token.INT, 0)),
   103  		"QTDIR":               reflect.ValueOf(constant.MakeFromLiteral("128", token.INT, 0)),
   104  		"QTEXCL":              reflect.ValueOf(constant.MakeFromLiteral("32", token.INT, 0)),
   105  		"QTFILE":              reflect.ValueOf(constant.MakeFromLiteral("0", token.INT, 0)),
   106  		"QTMOUNT":             reflect.ValueOf(constant.MakeFromLiteral("16", token.INT, 0)),
   107  		"QTTMP":               reflect.ValueOf(constant.MakeFromLiteral("4", token.INT, 0)),
   108  		"RFCENVG":             reflect.ValueOf(constant.MakeFromLiteral("2048", token.INT, 0)),
   109  		"RFCFDG":              reflect.ValueOf(constant.MakeFromLiteral("4096", token.INT, 0)),
   110  		"RFCNAMEG":            reflect.ValueOf(constant.MakeFromLiteral("1024", token.INT, 0)),
   111  		"RFENVG":              reflect.ValueOf(constant.MakeFromLiteral("2", token.INT, 0)),
   112  		"RFFDG":               reflect.ValueOf(constant.MakeFromLiteral("4", token.INT, 0)),
   113  		"RFMEM":               reflect.ValueOf(constant.MakeFromLiteral("32", token.INT, 0)),
   114  		"RFNAMEG":             reflect.ValueOf(constant.MakeFromLiteral("1", token.INT, 0)),
   115  		"RFNOMNT":             reflect.ValueOf(constant.MakeFromLiteral("16384", token.INT, 0)),
   116  		"RFNOTEG":             reflect.ValueOf(constant.MakeFromLiteral("8", token.INT, 0)),
   117  		"RFNOWAIT":            reflect.ValueOf(constant.MakeFromLiteral("64", token.INT, 0)),
   118  		"RFPROC":              reflect.ValueOf(constant.MakeFromLiteral("16", token.INT, 0)),
   119  		"RFREND":              reflect.ValueOf(constant.MakeFromLiteral("8192", token.INT, 0)),
   120  		"Read":                reflect.ValueOf(syscall.Read),
   121  		"Remove":              reflect.ValueOf(syscall.Remove),
   122  		"SIGABRT":             reflect.ValueOf(syscall.SIGABRT),
   123  		"SIGALRM":             reflect.ValueOf(syscall.SIGALRM),
   124  		"SIGHUP":              reflect.ValueOf(syscall.SIGHUP),
   125  		"SIGINT":              reflect.ValueOf(syscall.SIGINT),
   126  		"SIGKILL":             reflect.ValueOf(syscall.SIGKILL),
   127  		"SIGTERM":             reflect.ValueOf(syscall.SIGTERM),
   128  		"STATFIXLEN":          reflect.ValueOf(constant.MakeFromLiteral("49", token.INT, 0)),
   129  		"STATMAX":             reflect.ValueOf(constant.MakeFromLiteral("65535", token.INT, 0)),
   130  		"SYS_ALARM":           reflect.ValueOf(constant.MakeFromLiteral("6", token.INT, 0)),
   131  		"SYS_AWAIT":           reflect.ValueOf(constant.MakeFromLiteral("47", token.INT, 0)),
   132  		"SYS_BIND":            reflect.ValueOf(constant.MakeFromLiteral("2", token.INT, 0)),
   133  		"SYS_BRK_":            reflect.ValueOf(constant.MakeFromLiteral("24", token.INT, 0)),
   134  		"SYS_CHDIR":           reflect.ValueOf(constant.MakeFromLiteral("3", token.INT, 0)),
   135  		"SYS_CLOSE":           reflect.ValueOf(constant.MakeFromLiteral("4", token.INT, 0)),
   136  		"SYS_CREATE":          reflect.ValueOf(constant.MakeFromLiteral("22", token.INT, 0)),
   137  		"SYS_DUP":             reflect.ValueOf(constant.MakeFromLiteral("5", token.INT, 0)),
   138  		"SYS_ERRSTR":          reflect.ValueOf(constant.MakeFromLiteral("41", token.INT, 0)),
   139  		"SYS_EXEC":            reflect.ValueOf(constant.MakeFromLiteral("7", token.INT, 0)),
   140  		"SYS_EXITS":           reflect.ValueOf(constant.MakeFromLiteral("8", token.INT, 0)),
   141  		"SYS_FAUTH":           reflect.ValueOf(constant.MakeFromLiteral("10", token.INT, 0)),
   142  		"SYS_FD2PATH":         reflect.ValueOf(constant.MakeFromLiteral("23", token.INT, 0)),
   143  		"SYS_FSTAT":           reflect.ValueOf(constant.MakeFromLiteral("43", token.INT, 0)),
   144  		"SYS_FVERSION":        reflect.ValueOf(constant.MakeFromLiteral("40", token.INT, 0)),
   145  		"SYS_FWSTAT":          reflect.ValueOf(constant.MakeFromLiteral("45", token.INT, 0)),
   146  		"SYS_MOUNT":           reflect.ValueOf(constant.MakeFromLiteral("46", token.INT, 0)),
   147  		"SYS_NOTED":           reflect.ValueOf(constant.MakeFromLiteral("29", token.INT, 0)),
   148  		"SYS_NOTIFY":          reflect.ValueOf(constant.MakeFromLiteral("28", token.INT, 0)),
   149  		"SYS_NSEC":            reflect.ValueOf(constant.MakeFromLiteral("53", token.INT, 0)),
   150  		"SYS_OPEN":            reflect.ValueOf(constant.MakeFromLiteral("14", token.INT, 0)),
   151  		"SYS_OSEEK":           reflect.ValueOf(constant.MakeFromLiteral("16", token.INT, 0)),
   152  		"SYS_PIPE":            reflect.ValueOf(constant.MakeFromLiteral("21", token.INT, 0)),
   153  		"SYS_PREAD":           reflect.ValueOf(constant.MakeFromLiteral("50", token.INT, 0)),
   154  		"SYS_PWRITE":          reflect.ValueOf(constant.MakeFromLiteral("51", token.INT, 0)),
   155  		"SYS_REMOVE":          reflect.ValueOf(constant.MakeFromLiteral("25", token.INT, 0)),
   156  		"SYS_RENDEZVOUS":      reflect.ValueOf(constant.MakeFromLiteral("34", token.INT, 0)),
   157  		"SYS_RFORK":           reflect.ValueOf(constant.MakeFromLiteral("19", token.INT, 0)),
   158  		"SYS_SEEK":            reflect.ValueOf(constant.MakeFromLiteral("39", token.INT, 0)),
   159  		"SYS_SEGATTACH":       reflect.ValueOf(constant.MakeFromLiteral("30", token.INT, 0)),
   160  		"SYS_SEGBRK":          reflect.ValueOf(constant.MakeFromLiteral("12", token.INT, 0)),
   161  		"SYS_SEGDETACH":       reflect.ValueOf(constant.MakeFromLiteral("31", token.INT, 0)),
   162  		"SYS_SEGFLUSH":        reflect.ValueOf(constant.MakeFromLiteral("33", token.INT, 0)),
   163  		"SYS_SEGFREE":         reflect.ValueOf(constant.MakeFromLiteral("32", token.INT, 0)),
   164  		"SYS_SEMACQUIRE":      reflect.ValueOf(constant.MakeFromLiteral("37", token.INT, 0)),
   165  		"SYS_SEMRELEASE":      reflect.ValueOf(constant.MakeFromLiteral("38", token.INT, 0)),
   166  		"SYS_SLEEP":           reflect.ValueOf(constant.MakeFromLiteral("17", token.INT, 0)),
   167  		"SYS_STAT":            reflect.ValueOf(constant.MakeFromLiteral("42", token.INT, 0)),
   168  		"SYS_SYSR1":           reflect.ValueOf(constant.MakeFromLiteral("0", token.INT, 0)),
   169  		"SYS_TSEMACQUIRE":     reflect.ValueOf(constant.MakeFromLiteral("52", token.INT, 0)),
   170  		"SYS_UNMOUNT":         reflect.ValueOf(constant.MakeFromLiteral("35", token.INT, 0)),
   171  		"SYS_WSTAT":           reflect.ValueOf(constant.MakeFromLiteral("44", token.INT, 0)),
   172  		"S_IFBLK":             reflect.ValueOf(constant.MakeFromLiteral("24576", token.INT, 0)),
   173  		"S_IFCHR":             reflect.ValueOf(constant.MakeFromLiteral("8192", token.INT, 0)),
   174  		"S_IFDIR":             reflect.ValueOf(constant.MakeFromLiteral("16384", token.INT, 0)),
   175  		"S_IFIFO":             reflect.ValueOf(constant.MakeFromLiteral("4096", token.INT, 0)),
   176  		"S_IFLNK":             reflect.ValueOf(constant.MakeFromLiteral("40960", token.INT, 0)),
   177  		"S_IFMT":              reflect.ValueOf(constant.MakeFromLiteral("126976", token.INT, 0)),
   178  		"S_IFREG":             reflect.ValueOf(constant.MakeFromLiteral("32768", token.INT, 0)),
   179  		"S_IFSOCK":            reflect.ValueOf(constant.MakeFromLiteral("49152", token.INT, 0)),
   180  		"Seek":                reflect.ValueOf(syscall.Seek),
   181  		"Setenv":              reflect.ValueOf(syscall.Setenv),
   182  		"SlicePtrFromStrings": reflect.ValueOf(syscall.SlicePtrFromStrings),
   183  		"SocketDisableIPv6":   reflect.ValueOf(&syscall.SocketDisableIPv6).Elem(),
   184  		"Stat":                reflect.ValueOf(syscall.Stat),
   185  		"Stderr":              reflect.ValueOf(&syscall.Stderr).Elem(),
   186  		"Stdin":               reflect.ValueOf(&syscall.Stdin).Elem(),
   187  		"Stdout":              reflect.ValueOf(&syscall.Stdout).Elem(),
   188  		"StringBytePtr":       reflect.ValueOf(syscall.StringBytePtr),
   189  		"StringByteSlice":     reflect.ValueOf(syscall.StringByteSlice),
   190  		"StringSlicePtr":      reflect.ValueOf(syscall.StringSlicePtr),
   191  		"UnmarshalDir":        reflect.ValueOf(syscall.UnmarshalDir),
   192  		"Unmount":             reflect.ValueOf(syscall.Unmount),
   193  		"Unsetenv":            reflect.ValueOf(syscall.Unsetenv),
   194  		"WaitProcess":         reflect.ValueOf(syscall.WaitProcess),
   195  		"Write":               reflect.ValueOf(syscall.Write),
   196  		"Wstat":               reflect.ValueOf(syscall.Wstat),
   197  
   198  		// type definitions
   199  		"Conn":        reflect.ValueOf((*syscall.Conn)(nil)),
   200  		"Dir":         reflect.ValueOf((*syscall.Dir)(nil)),
   201  		"ErrorString": reflect.ValueOf((*syscall.ErrorString)(nil)),
   202  		"Note":        reflect.ValueOf((*syscall.Note)(nil)),
   203  		"ProcAttr":    reflect.ValueOf((*syscall.ProcAttr)(nil)),
   204  		"Qid":         reflect.ValueOf((*syscall.Qid)(nil)),
   205  		"RawConn":     reflect.ValueOf((*syscall.RawConn)(nil)),
   206  		"SysProcAttr": reflect.ValueOf((*syscall.SysProcAttr)(nil)),
   207  		"Timespec":    reflect.ValueOf((*syscall.Timespec)(nil)),
   208  		"Timeval":     reflect.ValueOf((*syscall.Timeval)(nil)),
   209  		"Waitmsg":     reflect.ValueOf((*syscall.Waitmsg)(nil)),
   210  
   211  		// interface wrapper definitions
   212  		"_Conn":    reflect.ValueOf((*_syscall_Conn)(nil)),
   213  		"_RawConn": reflect.ValueOf((*_syscall_RawConn)(nil)),
   214  	}
   215  }
   216  
   217  // _syscall_Conn is an interface wrapper for Conn type
   218  type _syscall_Conn struct {
   219  	IValue       interface{}
   220  	WSyscallConn func() (syscall.RawConn, error)
   221  }
   222  
   223  func (W _syscall_Conn) SyscallConn() (syscall.RawConn, error) {
   224  	return W.WSyscallConn()
   225  }
   226  
   227  // _syscall_RawConn is an interface wrapper for RawConn type
   228  type _syscall_RawConn struct {
   229  	IValue   interface{}
   230  	WControl func(f func(fd uintptr)) error
   231  	WRead    func(f func(fd uintptr) (done bool)) error
   232  	WWrite   func(f func(fd uintptr) (done bool)) error
   233  }
   234  
   235  func (W _syscall_RawConn) Control(f func(fd uintptr)) error {
   236  	return W.WControl(f)
   237  }
   238  func (W _syscall_RawConn) Read(f func(fd uintptr) (done bool)) error {
   239  	return W.WRead(f)
   240  }
   241  func (W _syscall_RawConn) Write(f func(fd uintptr) (done bool)) error {
   242  	return W.WWrite(f)
   243  }