github.com/ader1990/go@v0.0.0-20140630135419-8c24447fa791/src/pkg/syscall/zsyscall_solaris_amd64.go (about)

     1  // mksyscall_solaris.pl syscall_solaris.go syscall_solaris_amd64.go
     2  // MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
     3  
     4  package syscall
     5  
     6  import "unsafe"
     7  
     8  var (
     9  	modlibc      = newLazySO("libc.so")
    10  	modlibsocket = newLazySO("libsocket.so")
    11  
    12  	procgetgroups    = modlibc.NewProc("getgroups")
    13  	procsetgroups    = modlibc.NewProc("setgroups")
    14  	procfcntl        = modlibc.NewProc("fcntl")
    15  	procaccept       = modlibsocket.NewProc("accept")
    16  	procsendmsg      = modlibsocket.NewProc("sendmsg")
    17  	procAccess       = modlibc.NewProc("access")
    18  	procAdjtime      = modlibc.NewProc("adjtime")
    19  	procChdir        = modlibc.NewProc("chdir")
    20  	procChmod        = modlibc.NewProc("chmod")
    21  	procChown        = modlibc.NewProc("chown")
    22  	procChroot       = modlibc.NewProc("chroot")
    23  	procClose        = modlibc.NewProc("close")
    24  	procDup          = modlibc.NewProc("dup")
    25  	procExit         = modlibc.NewProc("exit")
    26  	procFchdir       = modlibc.NewProc("fchdir")
    27  	procFchmod       = modlibc.NewProc("fchmod")
    28  	procFchown       = modlibc.NewProc("fchown")
    29  	procFpathconf    = modlibc.NewProc("fpathconf")
    30  	procFstat        = modlibc.NewProc("fstat")
    31  	procGetdents     = modlibc.NewProc("getdents")
    32  	procGetgid       = modlibc.NewProc("getgid")
    33  	procGetpid       = modlibc.NewProc("getpid")
    34  	procGeteuid      = modlibc.NewProc("geteuid")
    35  	procGetegid      = modlibc.NewProc("getegid")
    36  	procGetppid      = modlibc.NewProc("getppid")
    37  	procGetpriority  = modlibc.NewProc("getpriority")
    38  	procGetrlimit    = modlibc.NewProc("getrlimit")
    39  	procGettimeofday = modlibc.NewProc("gettimeofday")
    40  	procGetuid       = modlibc.NewProc("getuid")
    41  	procKill         = modlibc.NewProc("kill")
    42  	procLchown       = modlibc.NewProc("lchown")
    43  	procLink         = modlibc.NewProc("link")
    44  	proclisten       = modlibsocket.NewProc("listen")
    45  	procLstat        = modlibc.NewProc("lstat")
    46  	procMkdir        = modlibc.NewProc("mkdir")
    47  	procMknod        = modlibc.NewProc("mknod")
    48  	procNanosleep    = modlibc.NewProc("nanosleep")
    49  	procOpen         = modlibc.NewProc("open")
    50  	procPathconf     = modlibc.NewProc("pathconf")
    51  	procPread        = modlibc.NewProc("pread")
    52  	procPwrite       = modlibc.NewProc("pwrite")
    53  	procread         = modlibc.NewProc("read")
    54  	procReadlink     = modlibc.NewProc("readlink")
    55  	procRename       = modlibc.NewProc("rename")
    56  	procRmdir        = modlibc.NewProc("rmdir")
    57  	proclseek        = modlibc.NewProc("lseek")
    58  	procSetegid      = modlibc.NewProc("setegid")
    59  	procSeteuid      = modlibc.NewProc("seteuid")
    60  	procSetgid       = modlibc.NewProc("setgid")
    61  	procSetpgid      = modlibc.NewProc("setpgid")
    62  	procSetpriority  = modlibc.NewProc("setpriority")
    63  	procSetregid     = modlibc.NewProc("setregid")
    64  	procSetreuid     = modlibc.NewProc("setreuid")
    65  	procSetrlimit    = modlibc.NewProc("setrlimit")
    66  	procSetsid       = modlibc.NewProc("setsid")
    67  	procSetuid       = modlibc.NewProc("setuid")
    68  	procshutdown     = modlibsocket.NewProc("shutdown")
    69  	procStat         = modlibc.NewProc("stat")
    70  	procSymlink      = modlibc.NewProc("symlink")
    71  	procSync         = modlibc.NewProc("sync")
    72  	procTruncate     = modlibc.NewProc("truncate")
    73  	procFsync        = modlibc.NewProc("fsync")
    74  	procFtruncate    = modlibc.NewProc("ftruncate")
    75  	procUmask        = modlibc.NewProc("umask")
    76  	procUnlink       = modlibc.NewProc("unlink")
    77  	procUtimes       = modlibc.NewProc("utimes")
    78  	procbind         = modlibsocket.NewProc("bind")
    79  	procconnect      = modlibsocket.NewProc("connect")
    80  	procmmap         = modlibc.NewProc("mmap")
    81  	procmunmap       = modlibc.NewProc("munmap")
    82  	procsendto       = modlibsocket.NewProc("sendto")
    83  	procsocket       = modlibsocket.NewProc("socket")
    84  	procsocketpair   = modlibsocket.NewProc("socketpair")
    85  	procwrite        = modlibc.NewProc("write")
    86  	procgetsockopt   = modlibsocket.NewProc("getsockopt")
    87  	procgetpeername  = modlibsocket.NewProc("getpeername")
    88  	procgetsockname  = modlibsocket.NewProc("getsockname")
    89  	procsetsockopt   = modlibsocket.NewProc("setsockopt")
    90  	procrecvfrom     = modlibsocket.NewProc("recvfrom")
    91  	procrecvmsg      = modlibsocket.NewProc("recvmsg")
    92  )
    93  
    94  func getgroups(ngid int, gid *_Gid_t) (n int, err error) {
    95  	r0, _, e1 := rawSysvicall6(procgetgroups.Addr(), 2, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0, 0, 0, 0)
    96  	n = int(r0)
    97  	if e1 != 0 {
    98  		err = e1
    99  	}
   100  	return
   101  }
   102  
   103  func setgroups(ngid int, gid *_Gid_t) (err error) {
   104  	_, _, e1 := rawSysvicall6(procsetgroups.Addr(), 2, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0, 0, 0, 0)
   105  	if e1 != 0 {
   106  		err = e1
   107  	}
   108  	return
   109  }
   110  
   111  func fcntl(fd int, cmd int, arg int) (val int, err error) {
   112  	r0, _, e1 := sysvicall6(procfcntl.Addr(), 3, uintptr(fd), uintptr(cmd), uintptr(arg), 0, 0, 0)
   113  	val = int(r0)
   114  	if e1 != 0 {
   115  		err = e1
   116  	}
   117  	return
   118  }
   119  
   120  func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
   121  	r0, _, e1 := sysvicall6(procaccept.Addr(), 3, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), 0, 0, 0)
   122  	fd = int(r0)
   123  	if e1 != 0 {
   124  		err = e1
   125  	}
   126  	return
   127  }
   128  
   129  func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
   130  	r0, _, e1 := sysvicall6(procsendmsg.Addr(), 3, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags), 0, 0, 0)
   131  	n = int(r0)
   132  	if e1 != 0 {
   133  		err = e1
   134  	}
   135  	return
   136  }
   137  
   138  func Access(path string, mode uint32) (err error) {
   139  	var _p0 *byte
   140  	_p0, err = BytePtrFromString(path)
   141  	if err != nil {
   142  		return
   143  	}
   144  	_, _, e1 := sysvicall6(procAccess.Addr(), 2, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0, 0, 0, 0)
   145  	if e1 != 0 {
   146  		err = e1
   147  	}
   148  	return
   149  }
   150  
   151  func Adjtime(delta *Timeval, olddelta *Timeval) (err error) {
   152  	_, _, e1 := sysvicall6(procAdjtime.Addr(), 2, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0, 0, 0, 0)
   153  	if e1 != 0 {
   154  		err = e1
   155  	}
   156  	return
   157  }
   158  
   159  func Chdir(path string) (err error) {
   160  	var _p0 *byte
   161  	_p0, err = BytePtrFromString(path)
   162  	if err != nil {
   163  		return
   164  	}
   165  	_, _, e1 := sysvicall6(procChdir.Addr(), 1, uintptr(unsafe.Pointer(_p0)), 0, 0, 0, 0, 0)
   166  	if e1 != 0 {
   167  		err = e1
   168  	}
   169  	return
   170  }
   171  
   172  func Chmod(path string, mode uint32) (err error) {
   173  	var _p0 *byte
   174  	_p0, err = BytePtrFromString(path)
   175  	if err != nil {
   176  		return
   177  	}
   178  	_, _, e1 := sysvicall6(procChmod.Addr(), 2, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0, 0, 0, 0)
   179  	if e1 != 0 {
   180  		err = e1
   181  	}
   182  	return
   183  }
   184  
   185  func Chown(path string, uid int, gid int) (err error) {
   186  	var _p0 *byte
   187  	_p0, err = BytePtrFromString(path)
   188  	if err != nil {
   189  		return
   190  	}
   191  	_, _, e1 := sysvicall6(procChown.Addr(), 3, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), 0, 0, 0)
   192  	if e1 != 0 {
   193  		err = e1
   194  	}
   195  	return
   196  }
   197  
   198  func Chroot(path string) (err error) {
   199  	var _p0 *byte
   200  	_p0, err = BytePtrFromString(path)
   201  	if err != nil {
   202  		return
   203  	}
   204  	_, _, e1 := sysvicall6(procChroot.Addr(), 1, uintptr(unsafe.Pointer(_p0)), 0, 0, 0, 0, 0)
   205  	if e1 != 0 {
   206  		err = e1
   207  	}
   208  	return
   209  }
   210  
   211  func Close(fd int) (err error) {
   212  	_, _, e1 := sysvicall6(procClose.Addr(), 1, uintptr(fd), 0, 0, 0, 0, 0)
   213  	if e1 != 0 {
   214  		err = e1
   215  	}
   216  	return
   217  }
   218  
   219  func Dup(fd int) (nfd int, err error) {
   220  	r0, _, e1 := sysvicall6(procDup.Addr(), 1, uintptr(fd), 0, 0, 0, 0, 0)
   221  	nfd = int(r0)
   222  	if e1 != 0 {
   223  		err = e1
   224  	}
   225  	return
   226  }
   227  
   228  func Exit(code int) {
   229  	sysvicall6(procExit.Addr(), 1, uintptr(code), 0, 0, 0, 0, 0)
   230  	return
   231  }
   232  
   233  func Fchdir(fd int) (err error) {
   234  	_, _, e1 := sysvicall6(procFchdir.Addr(), 1, uintptr(fd), 0, 0, 0, 0, 0)
   235  	if e1 != 0 {
   236  		err = e1
   237  	}
   238  	return
   239  }
   240  
   241  func Fchmod(fd int, mode uint32) (err error) {
   242  	_, _, e1 := sysvicall6(procFchmod.Addr(), 2, uintptr(fd), uintptr(mode), 0, 0, 0, 0)
   243  	if e1 != 0 {
   244  		err = e1
   245  	}
   246  	return
   247  }
   248  
   249  func Fchown(fd int, uid int, gid int) (err error) {
   250  	_, _, e1 := sysvicall6(procFchown.Addr(), 3, uintptr(fd), uintptr(uid), uintptr(gid), 0, 0, 0)
   251  	if e1 != 0 {
   252  		err = e1
   253  	}
   254  	return
   255  }
   256  
   257  func Fpathconf(fd int, name int) (val int, err error) {
   258  	r0, _, e1 := sysvicall6(procFpathconf.Addr(), 2, uintptr(fd), uintptr(name), 0, 0, 0, 0)
   259  	val = int(r0)
   260  	if e1 != 0 {
   261  		err = e1
   262  	}
   263  	return
   264  }
   265  
   266  func Fstat(fd int, stat *Stat_t) (err error) {
   267  	_, _, e1 := sysvicall6(procFstat.Addr(), 2, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0, 0, 0, 0)
   268  	if e1 != 0 {
   269  		err = e1
   270  	}
   271  	return
   272  }
   273  
   274  func Getdents(fd int, buf []byte, basep *uintptr) (n int, err error) {
   275  	var _p0 *byte
   276  	if len(buf) > 0 {
   277  		_p0 = &buf[0]
   278  	}
   279  	r0, _, e1 := sysvicall6(procGetdents.Addr(), 4, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0)
   280  	n = int(r0)
   281  	if e1 != 0 {
   282  		err = e1
   283  	}
   284  	return
   285  }
   286  
   287  func Getgid() (gid int) {
   288  	r0, _, _ := rawSysvicall6(procGetgid.Addr(), 0, 0, 0, 0, 0, 0, 0)
   289  	gid = int(r0)
   290  	return
   291  }
   292  
   293  func Getpid() (pid int) {
   294  	r0, _, _ := rawSysvicall6(procGetpid.Addr(), 0, 0, 0, 0, 0, 0, 0)
   295  	pid = int(r0)
   296  	return
   297  }
   298  
   299  func Geteuid() (euid int) {
   300  	r0, _, _ := sysvicall6(procGeteuid.Addr(), 0, 0, 0, 0, 0, 0, 0)
   301  	euid = int(r0)
   302  	return
   303  }
   304  
   305  func Getegid() (egid int) {
   306  	r0, _, _ := sysvicall6(procGetegid.Addr(), 0, 0, 0, 0, 0, 0, 0)
   307  	egid = int(r0)
   308  	return
   309  }
   310  
   311  func Getppid() (ppid int) {
   312  	r0, _, _ := sysvicall6(procGetppid.Addr(), 0, 0, 0, 0, 0, 0, 0)
   313  	ppid = int(r0)
   314  	return
   315  }
   316  
   317  func Getpriority(which int, who int) (n int, err error) {
   318  	r0, _, e1 := sysvicall6(procGetpriority.Addr(), 2, uintptr(which), uintptr(who), 0, 0, 0, 0)
   319  	n = int(r0)
   320  	if e1 != 0 {
   321  		err = e1
   322  	}
   323  	return
   324  }
   325  
   326  func Getrlimit(which int, lim *Rlimit) (err error) {
   327  	_, _, e1 := rawSysvicall6(procGetrlimit.Addr(), 2, uintptr(which), uintptr(unsafe.Pointer(lim)), 0, 0, 0, 0)
   328  	if e1 != 0 {
   329  		err = e1
   330  	}
   331  	return
   332  }
   333  
   334  func Gettimeofday(tv *Timeval) (err error) {
   335  	_, _, e1 := rawSysvicall6(procGettimeofday.Addr(), 1, uintptr(unsafe.Pointer(tv)), 0, 0, 0, 0, 0)
   336  	if e1 != 0 {
   337  		err = e1
   338  	}
   339  	return
   340  }
   341  
   342  func Getuid() (uid int) {
   343  	r0, _, _ := rawSysvicall6(procGetuid.Addr(), 0, 0, 0, 0, 0, 0, 0)
   344  	uid = int(r0)
   345  	return
   346  }
   347  
   348  func Kill(pid int, signum Signal) (err error) {
   349  	_, _, e1 := sysvicall6(procKill.Addr(), 2, uintptr(pid), uintptr(signum), 0, 0, 0, 0)
   350  	if e1 != 0 {
   351  		err = e1
   352  	}
   353  	return
   354  }
   355  
   356  func Lchown(path string, uid int, gid int) (err error) {
   357  	var _p0 *byte
   358  	_p0, err = BytePtrFromString(path)
   359  	if err != nil {
   360  		return
   361  	}
   362  	_, _, e1 := sysvicall6(procLchown.Addr(), 3, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), 0, 0, 0)
   363  	if e1 != 0 {
   364  		err = e1
   365  	}
   366  	return
   367  }
   368  
   369  func Link(path string, link string) (err error) {
   370  	var _p0 *byte
   371  	_p0, err = BytePtrFromString(path)
   372  	if err != nil {
   373  		return
   374  	}
   375  	var _p1 *byte
   376  	_p1, err = BytePtrFromString(link)
   377  	if err != nil {
   378  		return
   379  	}
   380  	_, _, e1 := sysvicall6(procLink.Addr(), 2, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0, 0, 0, 0)
   381  	if e1 != 0 {
   382  		err = e1
   383  	}
   384  	return
   385  }
   386  
   387  func Listen(s int, backlog int) (err error) {
   388  	_, _, e1 := sysvicall6(proclisten.Addr(), 2, uintptr(s), uintptr(backlog), 0, 0, 0, 0)
   389  	if e1 != 0 {
   390  		err = e1
   391  	}
   392  	return
   393  }
   394  
   395  func Lstat(path string, stat *Stat_t) (err error) {
   396  	var _p0 *byte
   397  	_p0, err = BytePtrFromString(path)
   398  	if err != nil {
   399  		return
   400  	}
   401  	_, _, e1 := sysvicall6(procLstat.Addr(), 2, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0, 0, 0, 0)
   402  	if e1 != 0 {
   403  		err = e1
   404  	}
   405  	return
   406  }
   407  
   408  func Mkdir(path string, mode uint32) (err error) {
   409  	var _p0 *byte
   410  	_p0, err = BytePtrFromString(path)
   411  	if err != nil {
   412  		return
   413  	}
   414  	_, _, e1 := sysvicall6(procMkdir.Addr(), 2, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0, 0, 0, 0)
   415  	if e1 != 0 {
   416  		err = e1
   417  	}
   418  	return
   419  }
   420  
   421  func Mknod(path string, mode uint32, dev int) (err error) {
   422  	var _p0 *byte
   423  	_p0, err = BytePtrFromString(path)
   424  	if err != nil {
   425  		return
   426  	}
   427  	_, _, e1 := sysvicall6(procMknod.Addr(), 3, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0, 0)
   428  	if e1 != 0 {
   429  		err = e1
   430  	}
   431  	return
   432  }
   433  
   434  func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
   435  	_, _, e1 := sysvicall6(procNanosleep.Addr(), 2, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0, 0, 0, 0)
   436  	if e1 != 0 {
   437  		err = e1
   438  	}
   439  	return
   440  }
   441  
   442  func Open(path string, mode int, perm uint32) (fd int, err error) {
   443  	var _p0 *byte
   444  	_p0, err = BytePtrFromString(path)
   445  	if err != nil {
   446  		return
   447  	}
   448  	r0, _, e1 := sysvicall6(procOpen.Addr(), 3, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0, 0)
   449  	fd = int(r0)
   450  	if e1 != 0 {
   451  		err = e1
   452  	}
   453  	return
   454  }
   455  
   456  func Pathconf(path string, name int) (val int, err error) {
   457  	var _p0 *byte
   458  	_p0, err = BytePtrFromString(path)
   459  	if err != nil {
   460  		return
   461  	}
   462  	r0, _, e1 := sysvicall6(procPathconf.Addr(), 2, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0, 0, 0, 0)
   463  	val = int(r0)
   464  	if e1 != 0 {
   465  		err = e1
   466  	}
   467  	return
   468  }
   469  
   470  func Pread(fd int, p []byte, offset int64) (n int, err error) {
   471  	var _p0 *byte
   472  	if len(p) > 0 {
   473  		_p0 = &p[0]
   474  	}
   475  	r0, _, e1 := sysvicall6(procPread.Addr(), 4, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), uintptr(offset), 0, 0)
   476  	n = int(r0)
   477  	if e1 != 0 {
   478  		err = e1
   479  	}
   480  	return
   481  }
   482  
   483  func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
   484  	var _p0 *byte
   485  	if len(p) > 0 {
   486  		_p0 = &p[0]
   487  	}
   488  	r0, _, e1 := sysvicall6(procPwrite.Addr(), 4, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), uintptr(offset), 0, 0)
   489  	n = int(r0)
   490  	if e1 != 0 {
   491  		err = e1
   492  	}
   493  	return
   494  }
   495  
   496  func read(fd int, p []byte) (n int, err error) {
   497  	var _p0 *byte
   498  	if len(p) > 0 {
   499  		_p0 = &p[0]
   500  	}
   501  	r0, _, e1 := sysvicall6(procread.Addr(), 3, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), 0, 0, 0)
   502  	n = int(r0)
   503  	if e1 != 0 {
   504  		err = e1
   505  	}
   506  	return
   507  }
   508  
   509  func Readlink(path string, buf []byte) (n int, err error) {
   510  	var _p0 *byte
   511  	_p0, err = BytePtrFromString(path)
   512  	if err != nil {
   513  		return
   514  	}
   515  	var _p1 *byte
   516  	if len(buf) > 0 {
   517  		_p1 = &buf[0]
   518  	}
   519  	r0, _, e1 := sysvicall6(procReadlink.Addr(), 3, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(len(buf)), 0, 0, 0)
   520  	n = int(r0)
   521  	if e1 != 0 {
   522  		err = e1
   523  	}
   524  	return
   525  }
   526  
   527  func Rename(from string, to string) (err error) {
   528  	var _p0 *byte
   529  	_p0, err = BytePtrFromString(from)
   530  	if err != nil {
   531  		return
   532  	}
   533  	var _p1 *byte
   534  	_p1, err = BytePtrFromString(to)
   535  	if err != nil {
   536  		return
   537  	}
   538  	_, _, e1 := sysvicall6(procRename.Addr(), 2, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0, 0, 0, 0)
   539  	if e1 != 0 {
   540  		err = e1
   541  	}
   542  	return
   543  }
   544  
   545  func Rmdir(path string) (err error) {
   546  	var _p0 *byte
   547  	_p0, err = BytePtrFromString(path)
   548  	if err != nil {
   549  		return
   550  	}
   551  	_, _, e1 := sysvicall6(procRmdir.Addr(), 1, uintptr(unsafe.Pointer(_p0)), 0, 0, 0, 0, 0)
   552  	if e1 != 0 {
   553  		err = e1
   554  	}
   555  	return
   556  }
   557  
   558  func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
   559  	r0, _, e1 := sysvicall6(proclseek.Addr(), 3, uintptr(fd), uintptr(offset), uintptr(whence), 0, 0, 0)
   560  	newoffset = int64(r0)
   561  	if e1 != 0 {
   562  		err = e1
   563  	}
   564  	return
   565  }
   566  
   567  func Setegid(egid int) (err error) {
   568  	_, _, e1 := rawSysvicall6(procSetegid.Addr(), 1, uintptr(egid), 0, 0, 0, 0, 0)
   569  	if e1 != 0 {
   570  		err = e1
   571  	}
   572  	return
   573  }
   574  
   575  func Seteuid(euid int) (err error) {
   576  	_, _, e1 := rawSysvicall6(procSeteuid.Addr(), 1, uintptr(euid), 0, 0, 0, 0, 0)
   577  	if e1 != 0 {
   578  		err = e1
   579  	}
   580  	return
   581  }
   582  
   583  func Setgid(gid int) (err error) {
   584  	_, _, e1 := rawSysvicall6(procSetgid.Addr(), 1, uintptr(gid), 0, 0, 0, 0, 0)
   585  	if e1 != 0 {
   586  		err = e1
   587  	}
   588  	return
   589  }
   590  
   591  func Setpgid(pid int, pgid int) (err error) {
   592  	_, _, e1 := rawSysvicall6(procSetpgid.Addr(), 2, uintptr(pid), uintptr(pgid), 0, 0, 0, 0)
   593  	if e1 != 0 {
   594  		err = e1
   595  	}
   596  	return
   597  }
   598  
   599  func Setpriority(which int, who int, prio int) (err error) {
   600  	_, _, e1 := sysvicall6(procSetpriority.Addr(), 3, uintptr(which), uintptr(who), uintptr(prio), 0, 0, 0)
   601  	if e1 != 0 {
   602  		err = e1
   603  	}
   604  	return
   605  }
   606  
   607  func Setregid(rgid int, egid int) (err error) {
   608  	_, _, e1 := rawSysvicall6(procSetregid.Addr(), 2, uintptr(rgid), uintptr(egid), 0, 0, 0, 0)
   609  	if e1 != 0 {
   610  		err = e1
   611  	}
   612  	return
   613  }
   614  
   615  func Setreuid(ruid int, euid int) (err error) {
   616  	_, _, e1 := rawSysvicall6(procSetreuid.Addr(), 2, uintptr(ruid), uintptr(euid), 0, 0, 0, 0)
   617  	if e1 != 0 {
   618  		err = e1
   619  	}
   620  	return
   621  }
   622  
   623  func Setrlimit(which int, lim *Rlimit) (err error) {
   624  	_, _, e1 := rawSysvicall6(procSetrlimit.Addr(), 2, uintptr(which), uintptr(unsafe.Pointer(lim)), 0, 0, 0, 0)
   625  	if e1 != 0 {
   626  		err = e1
   627  	}
   628  	return
   629  }
   630  
   631  func Setsid() (pid int, err error) {
   632  	r0, _, e1 := rawSysvicall6(procSetsid.Addr(), 0, 0, 0, 0, 0, 0, 0)
   633  	pid = int(r0)
   634  	if e1 != 0 {
   635  		err = e1
   636  	}
   637  	return
   638  }
   639  
   640  func Setuid(uid int) (err error) {
   641  	_, _, e1 := rawSysvicall6(procSetuid.Addr(), 1, uintptr(uid), 0, 0, 0, 0, 0)
   642  	if e1 != 0 {
   643  		err = e1
   644  	}
   645  	return
   646  }
   647  
   648  func Shutdown(s int, how int) (err error) {
   649  	_, _, e1 := sysvicall6(procshutdown.Addr(), 2, uintptr(s), uintptr(how), 0, 0, 0, 0)
   650  	if e1 != 0 {
   651  		err = e1
   652  	}
   653  	return
   654  }
   655  
   656  func Stat(path string, stat *Stat_t) (err error) {
   657  	var _p0 *byte
   658  	_p0, err = BytePtrFromString(path)
   659  	if err != nil {
   660  		return
   661  	}
   662  	_, _, e1 := sysvicall6(procStat.Addr(), 2, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0, 0, 0, 0)
   663  	if e1 != 0 {
   664  		err = e1
   665  	}
   666  	return
   667  }
   668  
   669  func Symlink(path string, link string) (err error) {
   670  	var _p0 *byte
   671  	_p0, err = BytePtrFromString(path)
   672  	if err != nil {
   673  		return
   674  	}
   675  	var _p1 *byte
   676  	_p1, err = BytePtrFromString(link)
   677  	if err != nil {
   678  		return
   679  	}
   680  	_, _, e1 := sysvicall6(procSymlink.Addr(), 2, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0, 0, 0, 0)
   681  	if e1 != 0 {
   682  		err = e1
   683  	}
   684  	return
   685  }
   686  
   687  func Sync() (err error) {
   688  	_, _, e1 := sysvicall6(procSync.Addr(), 0, 0, 0, 0, 0, 0, 0)
   689  	if e1 != 0 {
   690  		err = e1
   691  	}
   692  	return
   693  }
   694  
   695  func Truncate(path string, length int64) (err error) {
   696  	var _p0 *byte
   697  	_p0, err = BytePtrFromString(path)
   698  	if err != nil {
   699  		return
   700  	}
   701  	_, _, e1 := sysvicall6(procTruncate.Addr(), 2, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0, 0, 0, 0)
   702  	if e1 != 0 {
   703  		err = e1
   704  	}
   705  	return
   706  }
   707  
   708  func Fsync(fd int) (err error) {
   709  	_, _, e1 := sysvicall6(procFsync.Addr(), 1, uintptr(fd), 0, 0, 0, 0, 0)
   710  	if e1 != 0 {
   711  		err = e1
   712  	}
   713  	return
   714  }
   715  
   716  func Ftruncate(fd int, length int64) (err error) {
   717  	_, _, e1 := sysvicall6(procFtruncate.Addr(), 2, uintptr(fd), uintptr(length), 0, 0, 0, 0)
   718  	if e1 != 0 {
   719  		err = e1
   720  	}
   721  	return
   722  }
   723  
   724  func Umask(newmask int) (oldmask int) {
   725  	r0, _, _ := sysvicall6(procUmask.Addr(), 1, uintptr(newmask), 0, 0, 0, 0, 0)
   726  	oldmask = int(r0)
   727  	return
   728  }
   729  
   730  func Unlink(path string) (err error) {
   731  	var _p0 *byte
   732  	_p0, err = BytePtrFromString(path)
   733  	if err != nil {
   734  		return
   735  	}
   736  	_, _, e1 := sysvicall6(procUnlink.Addr(), 1, uintptr(unsafe.Pointer(_p0)), 0, 0, 0, 0, 0)
   737  	if e1 != 0 {
   738  		err = e1
   739  	}
   740  	return
   741  }
   742  
   743  func Utimes(path string, times *[2]Timeval) (err error) {
   744  	var _p0 *byte
   745  	_p0, err = BytePtrFromString(path)
   746  	if err != nil {
   747  		return
   748  	}
   749  	_, _, e1 := sysvicall6(procUtimes.Addr(), 2, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), 0, 0, 0, 0)
   750  	if e1 != 0 {
   751  		err = e1
   752  	}
   753  	return
   754  }
   755  
   756  func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
   757  	_, _, e1 := sysvicall6(procbind.Addr(), 3, uintptr(s), uintptr(addr), uintptr(addrlen), 0, 0, 0)
   758  	if e1 != 0 {
   759  		err = e1
   760  	}
   761  	return
   762  }
   763  
   764  func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
   765  	_, _, e1 := sysvicall6(procconnect.Addr(), 3, uintptr(s), uintptr(addr), uintptr(addrlen), 0, 0, 0)
   766  	if e1 != 0 {
   767  		err = e1
   768  	}
   769  	return
   770  }
   771  
   772  func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {
   773  	r0, _, e1 := sysvicall6(procmmap.Addr(), 6, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos))
   774  	ret = uintptr(r0)
   775  	if e1 != 0 {
   776  		err = e1
   777  	}
   778  	return
   779  }
   780  
   781  func munmap(addr uintptr, length uintptr) (err error) {
   782  	_, _, e1 := sysvicall6(procmunmap.Addr(), 2, uintptr(addr), uintptr(length), 0, 0, 0, 0)
   783  	if e1 != 0 {
   784  		err = e1
   785  	}
   786  	return
   787  }
   788  
   789  func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {
   790  	var _p0 *byte
   791  	if len(buf) > 0 {
   792  		_p0 = &buf[0]
   793  	}
   794  	_, _, e1 := sysvicall6(procsendto.Addr(), 6, uintptr(s), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
   795  	if e1 != 0 {
   796  		err = e1
   797  	}
   798  	return
   799  }
   800  
   801  func socket(domain int, typ int, proto int) (fd int, err error) {
   802  	r0, _, e1 := sysvicall6(procsocket.Addr(), 3, uintptr(domain), uintptr(typ), uintptr(proto), 0, 0, 0)
   803  	fd = int(r0)
   804  	if e1 != 0 {
   805  		err = e1
   806  	}
   807  	return
   808  }
   809  
   810  func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
   811  	_, _, e1 := rawSysvicall6(procsocketpair.Addr(), 4, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
   812  	if e1 != 0 {
   813  		err = e1
   814  	}
   815  	return
   816  }
   817  
   818  func write(fd int, p []byte) (n int, err error) {
   819  	var _p0 *byte
   820  	if len(p) > 0 {
   821  		_p0 = &p[0]
   822  	}
   823  	r0, _, e1 := sysvicall6(procwrite.Addr(), 3, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), 0, 0, 0)
   824  	n = int(r0)
   825  	if e1 != 0 {
   826  		err = e1
   827  	}
   828  	return
   829  }
   830  
   831  func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {
   832  	_, _, e1 := sysvicall6(procgetsockopt.Addr(), 5, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
   833  	if e1 != 0 {
   834  		err = e1
   835  	}
   836  	return
   837  }
   838  
   839  func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
   840  	_, _, e1 := rawSysvicall6(procgetpeername.Addr(), 3, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), 0, 0, 0)
   841  	if e1 != 0 {
   842  		err = e1
   843  	}
   844  	return
   845  }
   846  
   847  func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
   848  	_, _, e1 := sysvicall6(procgetsockname.Addr(), 3, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), 0, 0, 0)
   849  	if e1 != 0 {
   850  		err = e1
   851  	}
   852  	return
   853  }
   854  
   855  func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {
   856  	_, _, e1 := sysvicall6(procsetsockopt.Addr(), 5, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
   857  	if e1 != 0 {
   858  		err = e1
   859  	}
   860  	return
   861  }
   862  
   863  func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {
   864  	var _p0 *byte
   865  	if len(p) > 0 {
   866  		_p0 = &p[0]
   867  	}
   868  	r0, _, e1 := sysvicall6(procrecvfrom.Addr(), 6, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
   869  	n = int(r0)
   870  	if e1 != 0 {
   871  		err = e1
   872  	}
   873  	return
   874  }
   875  
   876  func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
   877  	r0, _, e1 := sysvicall6(procrecvmsg.Addr(), 3, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags), 0, 0, 0)
   878  	n = int(r0)
   879  	if e1 != 0 {
   880  		err = e1
   881  	}
   882  	return
   883  }