github.com/Andyfoo/golang/x/sys@v0.0.0-20190901054642-57c1bf301704/unix/zsyscall_freebsd_amd64.go (about)

     1  // go run mksyscall.go -tags freebsd,amd64 syscall_bsd.go syscall_freebsd.go syscall_freebsd_amd64.go
     2  // Code generated by the command above; see README.md. DO NOT EDIT.
     3  
     4  // +build freebsd,amd64
     5  
     6  package unix
     7  
     8  import (
     9  	"syscall"
    10  	"unsafe"
    11  )
    12  
    13  var _ syscall.Errno
    14  
    15  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    16  
    17  func getgroups(ngid int, gid *_Gid_t) (n int, err error) {
    18  	r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
    19  	n = int(r0)
    20  	if e1 != 0 {
    21  		err = errnoErr(e1)
    22  	}
    23  	return
    24  }
    25  
    26  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    27  
    28  func setgroups(ngid int, gid *_Gid_t) (err error) {
    29  	_, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
    30  	if e1 != 0 {
    31  		err = errnoErr(e1)
    32  	}
    33  	return
    34  }
    35  
    36  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    37  
    38  func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
    39  	r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
    40  	wpid = int(r0)
    41  	if e1 != 0 {
    42  		err = errnoErr(e1)
    43  	}
    44  	return
    45  }
    46  
    47  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    48  
    49  func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
    50  	r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
    51  	fd = int(r0)
    52  	if e1 != 0 {
    53  		err = errnoErr(e1)
    54  	}
    55  	return
    56  }
    57  
    58  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    59  
    60  func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
    61  	_, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))
    62  	if e1 != 0 {
    63  		err = errnoErr(e1)
    64  	}
    65  	return
    66  }
    67  
    68  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    69  
    70  func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
    71  	_, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))
    72  	if e1 != 0 {
    73  		err = errnoErr(e1)
    74  	}
    75  	return
    76  }
    77  
    78  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    79  
    80  func socket(domain int, typ int, proto int) (fd int, err error) {
    81  	r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))
    82  	fd = int(r0)
    83  	if e1 != 0 {
    84  		err = errnoErr(e1)
    85  	}
    86  	return
    87  }
    88  
    89  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    90  
    91  func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {
    92  	_, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
    93  	if e1 != 0 {
    94  		err = errnoErr(e1)
    95  	}
    96  	return
    97  }
    98  
    99  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   100  
   101  func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {
   102  	_, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
   103  	if e1 != 0 {
   104  		err = errnoErr(e1)
   105  	}
   106  	return
   107  }
   108  
   109  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   110  
   111  func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
   112  	_, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
   113  	if e1 != 0 {
   114  		err = errnoErr(e1)
   115  	}
   116  	return
   117  }
   118  
   119  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   120  
   121  func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
   122  	_, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
   123  	if e1 != 0 {
   124  		err = errnoErr(e1)
   125  	}
   126  	return
   127  }
   128  
   129  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   130  
   131  func Shutdown(s int, how int) (err error) {
   132  	_, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(s), uintptr(how), 0)
   133  	if e1 != 0 {
   134  		err = errnoErr(e1)
   135  	}
   136  	return
   137  }
   138  
   139  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   140  
   141  func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
   142  	_, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
   143  	if e1 != 0 {
   144  		err = errnoErr(e1)
   145  	}
   146  	return
   147  }
   148  
   149  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   150  
   151  func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {
   152  	var _p0 unsafe.Pointer
   153  	if len(p) > 0 {
   154  		_p0 = unsafe.Pointer(&p[0])
   155  	} else {
   156  		_p0 = unsafe.Pointer(&_zero)
   157  	}
   158  	r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
   159  	n = int(r0)
   160  	if e1 != 0 {
   161  		err = errnoErr(e1)
   162  	}
   163  	return
   164  }
   165  
   166  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   167  
   168  func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {
   169  	var _p0 unsafe.Pointer
   170  	if len(buf) > 0 {
   171  		_p0 = unsafe.Pointer(&buf[0])
   172  	} else {
   173  		_p0 = unsafe.Pointer(&_zero)
   174  	}
   175  	_, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
   176  	if e1 != 0 {
   177  		err = errnoErr(e1)
   178  	}
   179  	return
   180  }
   181  
   182  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   183  
   184  func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
   185  	r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
   186  	n = int(r0)
   187  	if e1 != 0 {
   188  		err = errnoErr(e1)
   189  	}
   190  	return
   191  }
   192  
   193  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   194  
   195  func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
   196  	r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
   197  	n = int(r0)
   198  	if e1 != 0 {
   199  		err = errnoErr(e1)
   200  	}
   201  	return
   202  }
   203  
   204  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   205  
   206  func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error) {
   207  	r0, _, e1 := Syscall6(SYS_KEVENT, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout)))
   208  	n = int(r0)
   209  	if e1 != 0 {
   210  		err = errnoErr(e1)
   211  	}
   212  	return
   213  }
   214  
   215  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   216  
   217  func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
   218  	var _p0 unsafe.Pointer
   219  	if len(mib) > 0 {
   220  		_p0 = unsafe.Pointer(&mib[0])
   221  	} else {
   222  		_p0 = unsafe.Pointer(&_zero)
   223  	}
   224  	_, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
   225  	if e1 != 0 {
   226  		err = errnoErr(e1)
   227  	}
   228  	return
   229  }
   230  
   231  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   232  
   233  func utimes(path string, timeval *[2]Timeval) (err error) {
   234  	var _p0 *byte
   235  	_p0, err = BytePtrFromString(path)
   236  	if err != nil {
   237  		return
   238  	}
   239  	_, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0)
   240  	if e1 != 0 {
   241  		err = errnoErr(e1)
   242  	}
   243  	return
   244  }
   245  
   246  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   247  
   248  func futimes(fd int, timeval *[2]Timeval) (err error) {
   249  	_, _, e1 := Syscall(SYS_FUTIMES, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0)
   250  	if e1 != 0 {
   251  		err = errnoErr(e1)
   252  	}
   253  	return
   254  }
   255  
   256  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   257  
   258  func fcntl(fd int, cmd int, arg int) (val int, err error) {
   259  	r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg))
   260  	val = int(r0)
   261  	if e1 != 0 {
   262  		err = errnoErr(e1)
   263  	}
   264  	return
   265  }
   266  
   267  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   268  
   269  func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
   270  	r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
   271  	n = int(r0)
   272  	if e1 != 0 {
   273  		err = errnoErr(e1)
   274  	}
   275  	return
   276  }
   277  
   278  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   279  
   280  func Madvise(b []byte, behav int) (err error) {
   281  	var _p0 unsafe.Pointer
   282  	if len(b) > 0 {
   283  		_p0 = unsafe.Pointer(&b[0])
   284  	} else {
   285  		_p0 = unsafe.Pointer(&_zero)
   286  	}
   287  	_, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(behav))
   288  	if e1 != 0 {
   289  		err = errnoErr(e1)
   290  	}
   291  	return
   292  }
   293  
   294  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   295  
   296  func Mlock(b []byte) (err error) {
   297  	var _p0 unsafe.Pointer
   298  	if len(b) > 0 {
   299  		_p0 = unsafe.Pointer(&b[0])
   300  	} else {
   301  		_p0 = unsafe.Pointer(&_zero)
   302  	}
   303  	_, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
   304  	if e1 != 0 {
   305  		err = errnoErr(e1)
   306  	}
   307  	return
   308  }
   309  
   310  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   311  
   312  func Mlockall(flags int) (err error) {
   313  	_, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
   314  	if e1 != 0 {
   315  		err = errnoErr(e1)
   316  	}
   317  	return
   318  }
   319  
   320  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   321  
   322  func Mprotect(b []byte, prot int) (err error) {
   323  	var _p0 unsafe.Pointer
   324  	if len(b) > 0 {
   325  		_p0 = unsafe.Pointer(&b[0])
   326  	} else {
   327  		_p0 = unsafe.Pointer(&_zero)
   328  	}
   329  	_, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
   330  	if e1 != 0 {
   331  		err = errnoErr(e1)
   332  	}
   333  	return
   334  }
   335  
   336  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   337  
   338  func Msync(b []byte, flags int) (err error) {
   339  	var _p0 unsafe.Pointer
   340  	if len(b) > 0 {
   341  		_p0 = unsafe.Pointer(&b[0])
   342  	} else {
   343  		_p0 = unsafe.Pointer(&_zero)
   344  	}
   345  	_, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags))
   346  	if e1 != 0 {
   347  		err = errnoErr(e1)
   348  	}
   349  	return
   350  }
   351  
   352  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   353  
   354  func Munlock(b []byte) (err error) {
   355  	var _p0 unsafe.Pointer
   356  	if len(b) > 0 {
   357  		_p0 = unsafe.Pointer(&b[0])
   358  	} else {
   359  		_p0 = unsafe.Pointer(&_zero)
   360  	}
   361  	_, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
   362  	if e1 != 0 {
   363  		err = errnoErr(e1)
   364  	}
   365  	return
   366  }
   367  
   368  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   369  
   370  func Munlockall() (err error) {
   371  	_, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
   372  	if e1 != 0 {
   373  		err = errnoErr(e1)
   374  	}
   375  	return
   376  }
   377  
   378  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   379  
   380  func pipe2(p *[2]_C_int, flags int) (err error) {
   381  	_, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
   382  	if e1 != 0 {
   383  		err = errnoErr(e1)
   384  	}
   385  	return
   386  }
   387  
   388  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   389  
   390  func ptrace(request int, pid int, addr uintptr, data int) (err error) {
   391  	_, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
   392  	if e1 != 0 {
   393  		err = errnoErr(e1)
   394  	}
   395  	return
   396  }
   397  
   398  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   399  
   400  func Getcwd(buf []byte) (n int, err error) {
   401  	var _p0 unsafe.Pointer
   402  	if len(buf) > 0 {
   403  		_p0 = unsafe.Pointer(&buf[0])
   404  	} else {
   405  		_p0 = unsafe.Pointer(&_zero)
   406  	}
   407  	r0, _, e1 := Syscall(SYS___GETCWD, uintptr(_p0), uintptr(len(buf)), 0)
   408  	n = int(r0)
   409  	if e1 != 0 {
   410  		err = errnoErr(e1)
   411  	}
   412  	return
   413  }
   414  
   415  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   416  
   417  func ioctl(fd int, req uint, arg uintptr) (err error) {
   418  	_, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
   419  	if e1 != 0 {
   420  		err = errnoErr(e1)
   421  	}
   422  	return
   423  }
   424  
   425  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   426  
   427  func Access(path string, mode uint32) (err error) {
   428  	var _p0 *byte
   429  	_p0, err = BytePtrFromString(path)
   430  	if err != nil {
   431  		return
   432  	}
   433  	_, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
   434  	if e1 != 0 {
   435  		err = errnoErr(e1)
   436  	}
   437  	return
   438  }
   439  
   440  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   441  
   442  func Adjtime(delta *Timeval, olddelta *Timeval) (err error) {
   443  	_, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0)
   444  	if e1 != 0 {
   445  		err = errnoErr(e1)
   446  	}
   447  	return
   448  }
   449  
   450  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   451  
   452  func CapEnter() (err error) {
   453  	_, _, e1 := Syscall(SYS_CAP_ENTER, 0, 0, 0)
   454  	if e1 != 0 {
   455  		err = errnoErr(e1)
   456  	}
   457  	return
   458  }
   459  
   460  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   461  
   462  func capRightsGet(version int, fd int, rightsp *CapRights) (err error) {
   463  	_, _, e1 := Syscall(SYS___CAP_RIGHTS_GET, uintptr(version), uintptr(fd), uintptr(unsafe.Pointer(rightsp)))
   464  	if e1 != 0 {
   465  		err = errnoErr(e1)
   466  	}
   467  	return
   468  }
   469  
   470  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   471  
   472  func capRightsLimit(fd int, rightsp *CapRights) (err error) {
   473  	_, _, e1 := Syscall(SYS_CAP_RIGHTS_LIMIT, uintptr(fd), uintptr(unsafe.Pointer(rightsp)), 0)
   474  	if e1 != 0 {
   475  		err = errnoErr(e1)
   476  	}
   477  	return
   478  }
   479  
   480  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   481  
   482  func Chdir(path string) (err error) {
   483  	var _p0 *byte
   484  	_p0, err = BytePtrFromString(path)
   485  	if err != nil {
   486  		return
   487  	}
   488  	_, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
   489  	if e1 != 0 {
   490  		err = errnoErr(e1)
   491  	}
   492  	return
   493  }
   494  
   495  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   496  
   497  func Chflags(path string, flags int) (err error) {
   498  	var _p0 *byte
   499  	_p0, err = BytePtrFromString(path)
   500  	if err != nil {
   501  		return
   502  	}
   503  	_, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
   504  	if e1 != 0 {
   505  		err = errnoErr(e1)
   506  	}
   507  	return
   508  }
   509  
   510  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   511  
   512  func Chmod(path string, mode uint32) (err error) {
   513  	var _p0 *byte
   514  	_p0, err = BytePtrFromString(path)
   515  	if err != nil {
   516  		return
   517  	}
   518  	_, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
   519  	if e1 != 0 {
   520  		err = errnoErr(e1)
   521  	}
   522  	return
   523  }
   524  
   525  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   526  
   527  func Chown(path string, uid int, gid int) (err error) {
   528  	var _p0 *byte
   529  	_p0, err = BytePtrFromString(path)
   530  	if err != nil {
   531  		return
   532  	}
   533  	_, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
   534  	if e1 != 0 {
   535  		err = errnoErr(e1)
   536  	}
   537  	return
   538  }
   539  
   540  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   541  
   542  func Chroot(path string) (err error) {
   543  	var _p0 *byte
   544  	_p0, err = BytePtrFromString(path)
   545  	if err != nil {
   546  		return
   547  	}
   548  	_, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
   549  	if e1 != 0 {
   550  		err = errnoErr(e1)
   551  	}
   552  	return
   553  }
   554  
   555  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   556  
   557  func Close(fd int) (err error) {
   558  	_, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
   559  	if e1 != 0 {
   560  		err = errnoErr(e1)
   561  	}
   562  	return
   563  }
   564  
   565  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   566  
   567  func Dup(fd int) (nfd int, err error) {
   568  	r0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0)
   569  	nfd = int(r0)
   570  	if e1 != 0 {
   571  		err = errnoErr(e1)
   572  	}
   573  	return
   574  }
   575  
   576  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   577  
   578  func Dup2(from int, to int) (err error) {
   579  	_, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0)
   580  	if e1 != 0 {
   581  		err = errnoErr(e1)
   582  	}
   583  	return
   584  }
   585  
   586  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   587  
   588  func Exit(code int) {
   589  	Syscall(SYS_EXIT, uintptr(code), 0, 0)
   590  	return
   591  }
   592  
   593  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   594  
   595  func ExtattrGetFd(fd int, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
   596  	var _p0 *byte
   597  	_p0, err = BytePtrFromString(attrname)
   598  	if err != nil {
   599  		return
   600  	}
   601  	r0, _, e1 := Syscall6(SYS_EXTATTR_GET_FD, uintptr(fd), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p0)), uintptr(data), uintptr(nbytes), 0)
   602  	ret = int(r0)
   603  	if e1 != 0 {
   604  		err = errnoErr(e1)
   605  	}
   606  	return
   607  }
   608  
   609  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   610  
   611  func ExtattrSetFd(fd int, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
   612  	var _p0 *byte
   613  	_p0, err = BytePtrFromString(attrname)
   614  	if err != nil {
   615  		return
   616  	}
   617  	r0, _, e1 := Syscall6(SYS_EXTATTR_SET_FD, uintptr(fd), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p0)), uintptr(data), uintptr(nbytes), 0)
   618  	ret = int(r0)
   619  	if e1 != 0 {
   620  		err = errnoErr(e1)
   621  	}
   622  	return
   623  }
   624  
   625  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   626  
   627  func ExtattrDeleteFd(fd int, attrnamespace int, attrname string) (err error) {
   628  	var _p0 *byte
   629  	_p0, err = BytePtrFromString(attrname)
   630  	if err != nil {
   631  		return
   632  	}
   633  	_, _, e1 := Syscall(SYS_EXTATTR_DELETE_FD, uintptr(fd), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p0)))
   634  	if e1 != 0 {
   635  		err = errnoErr(e1)
   636  	}
   637  	return
   638  }
   639  
   640  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   641  
   642  func ExtattrListFd(fd int, attrnamespace int, data uintptr, nbytes int) (ret int, err error) {
   643  	r0, _, e1 := Syscall6(SYS_EXTATTR_LIST_FD, uintptr(fd), uintptr(attrnamespace), uintptr(data), uintptr(nbytes), 0, 0)
   644  	ret = int(r0)
   645  	if e1 != 0 {
   646  		err = errnoErr(e1)
   647  	}
   648  	return
   649  }
   650  
   651  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   652  
   653  func ExtattrGetFile(file string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
   654  	var _p0 *byte
   655  	_p0, err = BytePtrFromString(file)
   656  	if err != nil {
   657  		return
   658  	}
   659  	var _p1 *byte
   660  	_p1, err = BytePtrFromString(attrname)
   661  	if err != nil {
   662  		return
   663  	}
   664  	r0, _, e1 := Syscall6(SYS_EXTATTR_GET_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)
   665  	ret = int(r0)
   666  	if e1 != 0 {
   667  		err = errnoErr(e1)
   668  	}
   669  	return
   670  }
   671  
   672  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   673  
   674  func ExtattrSetFile(file string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
   675  	var _p0 *byte
   676  	_p0, err = BytePtrFromString(file)
   677  	if err != nil {
   678  		return
   679  	}
   680  	var _p1 *byte
   681  	_p1, err = BytePtrFromString(attrname)
   682  	if err != nil {
   683  		return
   684  	}
   685  	r0, _, e1 := Syscall6(SYS_EXTATTR_SET_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)
   686  	ret = int(r0)
   687  	if e1 != 0 {
   688  		err = errnoErr(e1)
   689  	}
   690  	return
   691  }
   692  
   693  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   694  
   695  func ExtattrDeleteFile(file string, attrnamespace int, attrname string) (err error) {
   696  	var _p0 *byte
   697  	_p0, err = BytePtrFromString(file)
   698  	if err != nil {
   699  		return
   700  	}
   701  	var _p1 *byte
   702  	_p1, err = BytePtrFromString(attrname)
   703  	if err != nil {
   704  		return
   705  	}
   706  	_, _, e1 := Syscall(SYS_EXTATTR_DELETE_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)))
   707  	if e1 != 0 {
   708  		err = errnoErr(e1)
   709  	}
   710  	return
   711  }
   712  
   713  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   714  
   715  func ExtattrListFile(file string, attrnamespace int, data uintptr, nbytes int) (ret int, err error) {
   716  	var _p0 *byte
   717  	_p0, err = BytePtrFromString(file)
   718  	if err != nil {
   719  		return
   720  	}
   721  	r0, _, e1 := Syscall6(SYS_EXTATTR_LIST_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(data), uintptr(nbytes), 0, 0)
   722  	ret = int(r0)
   723  	if e1 != 0 {
   724  		err = errnoErr(e1)
   725  	}
   726  	return
   727  }
   728  
   729  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   730  
   731  func ExtattrGetLink(link string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
   732  	var _p0 *byte
   733  	_p0, err = BytePtrFromString(link)
   734  	if err != nil {
   735  		return
   736  	}
   737  	var _p1 *byte
   738  	_p1, err = BytePtrFromString(attrname)
   739  	if err != nil {
   740  		return
   741  	}
   742  	r0, _, e1 := Syscall6(SYS_EXTATTR_GET_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)
   743  	ret = int(r0)
   744  	if e1 != 0 {
   745  		err = errnoErr(e1)
   746  	}
   747  	return
   748  }
   749  
   750  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   751  
   752  func ExtattrSetLink(link string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
   753  	var _p0 *byte
   754  	_p0, err = BytePtrFromString(link)
   755  	if err != nil {
   756  		return
   757  	}
   758  	var _p1 *byte
   759  	_p1, err = BytePtrFromString(attrname)
   760  	if err != nil {
   761  		return
   762  	}
   763  	r0, _, e1 := Syscall6(SYS_EXTATTR_SET_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)
   764  	ret = int(r0)
   765  	if e1 != 0 {
   766  		err = errnoErr(e1)
   767  	}
   768  	return
   769  }
   770  
   771  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   772  
   773  func ExtattrDeleteLink(link string, attrnamespace int, attrname string) (err error) {
   774  	var _p0 *byte
   775  	_p0, err = BytePtrFromString(link)
   776  	if err != nil {
   777  		return
   778  	}
   779  	var _p1 *byte
   780  	_p1, err = BytePtrFromString(attrname)
   781  	if err != nil {
   782  		return
   783  	}
   784  	_, _, e1 := Syscall(SYS_EXTATTR_DELETE_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)))
   785  	if e1 != 0 {
   786  		err = errnoErr(e1)
   787  	}
   788  	return
   789  }
   790  
   791  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   792  
   793  func ExtattrListLink(link string, attrnamespace int, data uintptr, nbytes int) (ret int, err error) {
   794  	var _p0 *byte
   795  	_p0, err = BytePtrFromString(link)
   796  	if err != nil {
   797  		return
   798  	}
   799  	r0, _, e1 := Syscall6(SYS_EXTATTR_LIST_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(data), uintptr(nbytes), 0, 0)
   800  	ret = int(r0)
   801  	if e1 != 0 {
   802  		err = errnoErr(e1)
   803  	}
   804  	return
   805  }
   806  
   807  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   808  
   809  func Fadvise(fd int, offset int64, length int64, advice int) (err error) {
   810  	_, _, e1 := Syscall6(SYS_POSIX_FADVISE, uintptr(fd), uintptr(offset), uintptr(length), uintptr(advice), 0, 0)
   811  	if e1 != 0 {
   812  		err = errnoErr(e1)
   813  	}
   814  	return
   815  }
   816  
   817  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   818  
   819  func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
   820  	var _p0 *byte
   821  	_p0, err = BytePtrFromString(path)
   822  	if err != nil {
   823  		return
   824  	}
   825  	_, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
   826  	if e1 != 0 {
   827  		err = errnoErr(e1)
   828  	}
   829  	return
   830  }
   831  
   832  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   833  
   834  func Fchdir(fd int) (err error) {
   835  	_, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
   836  	if e1 != 0 {
   837  		err = errnoErr(e1)
   838  	}
   839  	return
   840  }
   841  
   842  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   843  
   844  func Fchflags(fd int, flags int) (err error) {
   845  	_, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0)
   846  	if e1 != 0 {
   847  		err = errnoErr(e1)
   848  	}
   849  	return
   850  }
   851  
   852  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   853  
   854  func Fchmod(fd int, mode uint32) (err error) {
   855  	_, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
   856  	if e1 != 0 {
   857  		err = errnoErr(e1)
   858  	}
   859  	return
   860  }
   861  
   862  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   863  
   864  func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
   865  	var _p0 *byte
   866  	_p0, err = BytePtrFromString(path)
   867  	if err != nil {
   868  		return
   869  	}
   870  	_, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
   871  	if e1 != 0 {
   872  		err = errnoErr(e1)
   873  	}
   874  	return
   875  }
   876  
   877  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   878  
   879  func Fchown(fd int, uid int, gid int) (err error) {
   880  	_, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
   881  	if e1 != 0 {
   882  		err = errnoErr(e1)
   883  	}
   884  	return
   885  }
   886  
   887  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   888  
   889  func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
   890  	var _p0 *byte
   891  	_p0, err = BytePtrFromString(path)
   892  	if err != nil {
   893  		return
   894  	}
   895  	_, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
   896  	if e1 != 0 {
   897  		err = errnoErr(e1)
   898  	}
   899  	return
   900  }
   901  
   902  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   903  
   904  func Flock(fd int, how int) (err error) {
   905  	_, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
   906  	if e1 != 0 {
   907  		err = errnoErr(e1)
   908  	}
   909  	return
   910  }
   911  
   912  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   913  
   914  func Fpathconf(fd int, name int) (val int, err error) {
   915  	r0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0)
   916  	val = int(r0)
   917  	if e1 != 0 {
   918  		err = errnoErr(e1)
   919  	}
   920  	return
   921  }
   922  
   923  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   924  
   925  func fstat(fd int, stat *stat_freebsd11_t) (err error) {
   926  	_, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
   927  	if e1 != 0 {
   928  		err = errnoErr(e1)
   929  	}
   930  	return
   931  }
   932  
   933  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   934  
   935  func fstat_freebsd12(fd int, stat *Stat_t) (err error) {
   936  	_, _, e1 := Syscall(SYS_FSTAT_FREEBSD12, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
   937  	if e1 != 0 {
   938  		err = errnoErr(e1)
   939  	}
   940  	return
   941  }
   942  
   943  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   944  
   945  func fstatat(fd int, path string, stat *stat_freebsd11_t, flags int) (err error) {
   946  	var _p0 *byte
   947  	_p0, err = BytePtrFromString(path)
   948  	if err != nil {
   949  		return
   950  	}
   951  	_, _, e1 := Syscall6(SYS_FSTATAT, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)
   952  	if e1 != 0 {
   953  		err = errnoErr(e1)
   954  	}
   955  	return
   956  }
   957  
   958  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   959  
   960  func fstatat_freebsd12(fd int, path string, stat *Stat_t, flags int) (err error) {
   961  	var _p0 *byte
   962  	_p0, err = BytePtrFromString(path)
   963  	if err != nil {
   964  		return
   965  	}
   966  	_, _, e1 := Syscall6(SYS_FSTATAT_FREEBSD12, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)
   967  	if e1 != 0 {
   968  		err = errnoErr(e1)
   969  	}
   970  	return
   971  }
   972  
   973  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   974  
   975  func fstatfs(fd int, stat *statfs_freebsd11_t) (err error) {
   976  	_, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
   977  	if e1 != 0 {
   978  		err = errnoErr(e1)
   979  	}
   980  	return
   981  }
   982  
   983  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   984  
   985  func fstatfs_freebsd12(fd int, stat *Statfs_t) (err error) {
   986  	_, _, e1 := Syscall(SYS_FSTATFS_FREEBSD12, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
   987  	if e1 != 0 {
   988  		err = errnoErr(e1)
   989  	}
   990  	return
   991  }
   992  
   993  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   994  
   995  func Fsync(fd int) (err error) {
   996  	_, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
   997  	if e1 != 0 {
   998  		err = errnoErr(e1)
   999  	}
  1000  	return
  1001  }
  1002  
  1003  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1004  
  1005  func Ftruncate(fd int, length int64) (err error) {
  1006  	_, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), 0)
  1007  	if e1 != 0 {
  1008  		err = errnoErr(e1)
  1009  	}
  1010  	return
  1011  }
  1012  
  1013  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1014  
  1015  func getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
  1016  	var _p0 unsafe.Pointer
  1017  	if len(buf) > 0 {
  1018  		_p0 = unsafe.Pointer(&buf[0])
  1019  	} else {
  1020  		_p0 = unsafe.Pointer(&_zero)
  1021  	}
  1022  	r0, _, e1 := Syscall6(SYS_GETDIRENTRIES, uintptr(fd), uintptr(_p0), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0)
  1023  	n = int(r0)
  1024  	if e1 != 0 {
  1025  		err = errnoErr(e1)
  1026  	}
  1027  	return
  1028  }
  1029  
  1030  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1031  
  1032  func getdirentries_freebsd12(fd int, buf []byte, basep *uint64) (n int, err error) {
  1033  	var _p0 unsafe.Pointer
  1034  	if len(buf) > 0 {
  1035  		_p0 = unsafe.Pointer(&buf[0])
  1036  	} else {
  1037  		_p0 = unsafe.Pointer(&_zero)
  1038  	}
  1039  	r0, _, e1 := Syscall6(SYS_GETDIRENTRIES_FREEBSD12, uintptr(fd), uintptr(_p0), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0)
  1040  	n = int(r0)
  1041  	if e1 != 0 {
  1042  		err = errnoErr(e1)
  1043  	}
  1044  	return
  1045  }
  1046  
  1047  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1048  
  1049  func Getdtablesize() (size int) {
  1050  	r0, _, _ := Syscall(SYS_GETDTABLESIZE, 0, 0, 0)
  1051  	size = int(r0)
  1052  	return
  1053  }
  1054  
  1055  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1056  
  1057  func Getegid() (egid int) {
  1058  	r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0)
  1059  	egid = int(r0)
  1060  	return
  1061  }
  1062  
  1063  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1064  
  1065  func Geteuid() (uid int) {
  1066  	r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0)
  1067  	uid = int(r0)
  1068  	return
  1069  }
  1070  
  1071  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1072  
  1073  func Getgid() (gid int) {
  1074  	r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0)
  1075  	gid = int(r0)
  1076  	return
  1077  }
  1078  
  1079  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1080  
  1081  func Getpgid(pid int) (pgid int, err error) {
  1082  	r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
  1083  	pgid = int(r0)
  1084  	if e1 != 0 {
  1085  		err = errnoErr(e1)
  1086  	}
  1087  	return
  1088  }
  1089  
  1090  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1091  
  1092  func Getpgrp() (pgrp int) {
  1093  	r0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0)
  1094  	pgrp = int(r0)
  1095  	return
  1096  }
  1097  
  1098  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1099  
  1100  func Getpid() (pid int) {
  1101  	r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)
  1102  	pid = int(r0)
  1103  	return
  1104  }
  1105  
  1106  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1107  
  1108  func Getppid() (ppid int) {
  1109  	r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)
  1110  	ppid = int(r0)
  1111  	return
  1112  }
  1113  
  1114  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1115  
  1116  func Getpriority(which int, who int) (prio int, err error) {
  1117  	r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
  1118  	prio = int(r0)
  1119  	if e1 != 0 {
  1120  		err = errnoErr(e1)
  1121  	}
  1122  	return
  1123  }
  1124  
  1125  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1126  
  1127  func Getrlimit(which int, lim *Rlimit) (err error) {
  1128  	_, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
  1129  	if e1 != 0 {
  1130  		err = errnoErr(e1)
  1131  	}
  1132  	return
  1133  }
  1134  
  1135  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1136  
  1137  func Getrusage(who int, rusage *Rusage) (err error) {
  1138  	_, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
  1139  	if e1 != 0 {
  1140  		err = errnoErr(e1)
  1141  	}
  1142  	return
  1143  }
  1144  
  1145  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1146  
  1147  func Getsid(pid int) (sid int, err error) {
  1148  	r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
  1149  	sid = int(r0)
  1150  	if e1 != 0 {
  1151  		err = errnoErr(e1)
  1152  	}
  1153  	return
  1154  }
  1155  
  1156  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1157  
  1158  func Gettimeofday(tv *Timeval) (err error) {
  1159  	_, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
  1160  	if e1 != 0 {
  1161  		err = errnoErr(e1)
  1162  	}
  1163  	return
  1164  }
  1165  
  1166  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1167  
  1168  func Getuid() (uid int) {
  1169  	r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
  1170  	uid = int(r0)
  1171  	return
  1172  }
  1173  
  1174  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1175  
  1176  func Issetugid() (tainted bool) {
  1177  	r0, _, _ := Syscall(SYS_ISSETUGID, 0, 0, 0)
  1178  	tainted = bool(r0 != 0)
  1179  	return
  1180  }
  1181  
  1182  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1183  
  1184  func Kill(pid int, signum syscall.Signal) (err error) {
  1185  	_, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), 0)
  1186  	if e1 != 0 {
  1187  		err = errnoErr(e1)
  1188  	}
  1189  	return
  1190  }
  1191  
  1192  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1193  
  1194  func Kqueue() (fd int, err error) {
  1195  	r0, _, e1 := Syscall(SYS_KQUEUE, 0, 0, 0)
  1196  	fd = int(r0)
  1197  	if e1 != 0 {
  1198  		err = errnoErr(e1)
  1199  	}
  1200  	return
  1201  }
  1202  
  1203  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1204  
  1205  func Lchown(path string, uid int, gid int) (err error) {
  1206  	var _p0 *byte
  1207  	_p0, err = BytePtrFromString(path)
  1208  	if err != nil {
  1209  		return
  1210  	}
  1211  	_, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
  1212  	if e1 != 0 {
  1213  		err = errnoErr(e1)
  1214  	}
  1215  	return
  1216  }
  1217  
  1218  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1219  
  1220  func Link(path string, link string) (err error) {
  1221  	var _p0 *byte
  1222  	_p0, err = BytePtrFromString(path)
  1223  	if err != nil {
  1224  		return
  1225  	}
  1226  	var _p1 *byte
  1227  	_p1, err = BytePtrFromString(link)
  1228  	if err != nil {
  1229  		return
  1230  	}
  1231  	_, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
  1232  	if e1 != 0 {
  1233  		err = errnoErr(e1)
  1234  	}
  1235  	return
  1236  }
  1237  
  1238  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1239  
  1240  func Linkat(pathfd int, path string, linkfd int, link string, flags int) (err error) {
  1241  	var _p0 *byte
  1242  	_p0, err = BytePtrFromString(path)
  1243  	if err != nil {
  1244  		return
  1245  	}
  1246  	var _p1 *byte
  1247  	_p1, err = BytePtrFromString(link)
  1248  	if err != nil {
  1249  		return
  1250  	}
  1251  	_, _, e1 := Syscall6(SYS_LINKAT, uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
  1252  	if e1 != 0 {
  1253  		err = errnoErr(e1)
  1254  	}
  1255  	return
  1256  }
  1257  
  1258  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1259  
  1260  func Listen(s int, backlog int) (err error) {
  1261  	_, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0)
  1262  	if e1 != 0 {
  1263  		err = errnoErr(e1)
  1264  	}
  1265  	return
  1266  }
  1267  
  1268  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1269  
  1270  func lstat(path string, stat *stat_freebsd11_t) (err error) {
  1271  	var _p0 *byte
  1272  	_p0, err = BytePtrFromString(path)
  1273  	if err != nil {
  1274  		return
  1275  	}
  1276  	_, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
  1277  	if e1 != 0 {
  1278  		err = errnoErr(e1)
  1279  	}
  1280  	return
  1281  }
  1282  
  1283  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1284  
  1285  func Mkdir(path string, mode uint32) (err error) {
  1286  	var _p0 *byte
  1287  	_p0, err = BytePtrFromString(path)
  1288  	if err != nil {
  1289  		return
  1290  	}
  1291  	_, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
  1292  	if e1 != 0 {
  1293  		err = errnoErr(e1)
  1294  	}
  1295  	return
  1296  }
  1297  
  1298  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1299  
  1300  func Mkdirat(dirfd int, path string, mode uint32) (err error) {
  1301  	var _p0 *byte
  1302  	_p0, err = BytePtrFromString(path)
  1303  	if err != nil {
  1304  		return
  1305  	}
  1306  	_, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
  1307  	if e1 != 0 {
  1308  		err = errnoErr(e1)
  1309  	}
  1310  	return
  1311  }
  1312  
  1313  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1314  
  1315  func Mkfifo(path string, mode uint32) (err error) {
  1316  	var _p0 *byte
  1317  	_p0, err = BytePtrFromString(path)
  1318  	if err != nil {
  1319  		return
  1320  	}
  1321  	_, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
  1322  	if e1 != 0 {
  1323  		err = errnoErr(e1)
  1324  	}
  1325  	return
  1326  }
  1327  
  1328  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1329  
  1330  func mknod(path string, mode uint32, dev int) (err error) {
  1331  	var _p0 *byte
  1332  	_p0, err = BytePtrFromString(path)
  1333  	if err != nil {
  1334  		return
  1335  	}
  1336  	_, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
  1337  	if e1 != 0 {
  1338  		err = errnoErr(e1)
  1339  	}
  1340  	return
  1341  }
  1342  
  1343  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1344  
  1345  func mknodat(fd int, path string, mode uint32, dev int) (err error) {
  1346  	var _p0 *byte
  1347  	_p0, err = BytePtrFromString(path)
  1348  	if err != nil {
  1349  		return
  1350  	}
  1351  	_, _, e1 := Syscall6(SYS_MKNODAT, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
  1352  	if e1 != 0 {
  1353  		err = errnoErr(e1)
  1354  	}
  1355  	return
  1356  }
  1357  
  1358  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1359  
  1360  func mknodat_freebsd12(fd int, path string, mode uint32, dev uint64) (err error) {
  1361  	var _p0 *byte
  1362  	_p0, err = BytePtrFromString(path)
  1363  	if err != nil {
  1364  		return
  1365  	}
  1366  	_, _, e1 := Syscall6(SYS_MKNODAT_FREEBSD12, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
  1367  	if e1 != 0 {
  1368  		err = errnoErr(e1)
  1369  	}
  1370  	return
  1371  }
  1372  
  1373  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1374  
  1375  func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
  1376  	_, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
  1377  	if e1 != 0 {
  1378  		err = errnoErr(e1)
  1379  	}
  1380  	return
  1381  }
  1382  
  1383  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1384  
  1385  func Open(path string, mode int, perm uint32) (fd int, err error) {
  1386  	var _p0 *byte
  1387  	_p0, err = BytePtrFromString(path)
  1388  	if err != nil {
  1389  		return
  1390  	}
  1391  	r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
  1392  	fd = int(r0)
  1393  	if e1 != 0 {
  1394  		err = errnoErr(e1)
  1395  	}
  1396  	return
  1397  }
  1398  
  1399  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1400  
  1401  func Openat(fdat int, path string, mode int, perm uint32) (fd int, err error) {
  1402  	var _p0 *byte
  1403  	_p0, err = BytePtrFromString(path)
  1404  	if err != nil {
  1405  		return
  1406  	}
  1407  	r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(fdat), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0)
  1408  	fd = int(r0)
  1409  	if e1 != 0 {
  1410  		err = errnoErr(e1)
  1411  	}
  1412  	return
  1413  }
  1414  
  1415  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1416  
  1417  func Pathconf(path string, name int) (val int, err error) {
  1418  	var _p0 *byte
  1419  	_p0, err = BytePtrFromString(path)
  1420  	if err != nil {
  1421  		return
  1422  	}
  1423  	r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)
  1424  	val = int(r0)
  1425  	if e1 != 0 {
  1426  		err = errnoErr(e1)
  1427  	}
  1428  	return
  1429  }
  1430  
  1431  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1432  
  1433  func Pread(fd int, p []byte, offset int64) (n int, err error) {
  1434  	var _p0 unsafe.Pointer
  1435  	if len(p) > 0 {
  1436  		_p0 = unsafe.Pointer(&p[0])
  1437  	} else {
  1438  		_p0 = unsafe.Pointer(&_zero)
  1439  	}
  1440  	r0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
  1441  	n = int(r0)
  1442  	if e1 != 0 {
  1443  		err = errnoErr(e1)
  1444  	}
  1445  	return
  1446  }
  1447  
  1448  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1449  
  1450  func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
  1451  	var _p0 unsafe.Pointer
  1452  	if len(p) > 0 {
  1453  		_p0 = unsafe.Pointer(&p[0])
  1454  	} else {
  1455  		_p0 = unsafe.Pointer(&_zero)
  1456  	}
  1457  	r0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
  1458  	n = int(r0)
  1459  	if e1 != 0 {
  1460  		err = errnoErr(e1)
  1461  	}
  1462  	return
  1463  }
  1464  
  1465  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1466  
  1467  func read(fd int, p []byte) (n int, err error) {
  1468  	var _p0 unsafe.Pointer
  1469  	if len(p) > 0 {
  1470  		_p0 = unsafe.Pointer(&p[0])
  1471  	} else {
  1472  		_p0 = unsafe.Pointer(&_zero)
  1473  	}
  1474  	r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
  1475  	n = int(r0)
  1476  	if e1 != 0 {
  1477  		err = errnoErr(e1)
  1478  	}
  1479  	return
  1480  }
  1481  
  1482  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1483  
  1484  func Readlink(path string, buf []byte) (n int, err error) {
  1485  	var _p0 *byte
  1486  	_p0, err = BytePtrFromString(path)
  1487  	if err != nil {
  1488  		return
  1489  	}
  1490  	var _p1 unsafe.Pointer
  1491  	if len(buf) > 0 {
  1492  		_p1 = unsafe.Pointer(&buf[0])
  1493  	} else {
  1494  		_p1 = unsafe.Pointer(&_zero)
  1495  	}
  1496  	r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))
  1497  	n = int(r0)
  1498  	if e1 != 0 {
  1499  		err = errnoErr(e1)
  1500  	}
  1501  	return
  1502  }
  1503  
  1504  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1505  
  1506  func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
  1507  	var _p0 *byte
  1508  	_p0, err = BytePtrFromString(path)
  1509  	if err != nil {
  1510  		return
  1511  	}
  1512  	var _p1 unsafe.Pointer
  1513  	if len(buf) > 0 {
  1514  		_p1 = unsafe.Pointer(&buf[0])
  1515  	} else {
  1516  		_p1 = unsafe.Pointer(&_zero)
  1517  	}
  1518  	r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
  1519  	n = int(r0)
  1520  	if e1 != 0 {
  1521  		err = errnoErr(e1)
  1522  	}
  1523  	return
  1524  }
  1525  
  1526  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1527  
  1528  func Rename(from string, to string) (err error) {
  1529  	var _p0 *byte
  1530  	_p0, err = BytePtrFromString(from)
  1531  	if err != nil {
  1532  		return
  1533  	}
  1534  	var _p1 *byte
  1535  	_p1, err = BytePtrFromString(to)
  1536  	if err != nil {
  1537  		return
  1538  	}
  1539  	_, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
  1540  	if e1 != 0 {
  1541  		err = errnoErr(e1)
  1542  	}
  1543  	return
  1544  }
  1545  
  1546  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1547  
  1548  func Renameat(fromfd int, from string, tofd int, to string) (err error) {
  1549  	var _p0 *byte
  1550  	_p0, err = BytePtrFromString(from)
  1551  	if err != nil {
  1552  		return
  1553  	}
  1554  	var _p1 *byte
  1555  	_p1, err = BytePtrFromString(to)
  1556  	if err != nil {
  1557  		return
  1558  	}
  1559  	_, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0)
  1560  	if e1 != 0 {
  1561  		err = errnoErr(e1)
  1562  	}
  1563  	return
  1564  }
  1565  
  1566  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1567  
  1568  func Revoke(path string) (err error) {
  1569  	var _p0 *byte
  1570  	_p0, err = BytePtrFromString(path)
  1571  	if err != nil {
  1572  		return
  1573  	}
  1574  	_, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0)
  1575  	if e1 != 0 {
  1576  		err = errnoErr(e1)
  1577  	}
  1578  	return
  1579  }
  1580  
  1581  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1582  
  1583  func Rmdir(path string) (err error) {
  1584  	var _p0 *byte
  1585  	_p0, err = BytePtrFromString(path)
  1586  	if err != nil {
  1587  		return
  1588  	}
  1589  	_, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
  1590  	if e1 != 0 {
  1591  		err = errnoErr(e1)
  1592  	}
  1593  	return
  1594  }
  1595  
  1596  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1597  
  1598  func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
  1599  	r0, _, e1 := Syscall(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence))
  1600  	newoffset = int64(r0)
  1601  	if e1 != 0 {
  1602  		err = errnoErr(e1)
  1603  	}
  1604  	return
  1605  }
  1606  
  1607  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1608  
  1609  func Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) {
  1610  	_, _, e1 := Syscall6(SYS_SELECT, uintptr(n), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
  1611  	if e1 != 0 {
  1612  		err = errnoErr(e1)
  1613  	}
  1614  	return
  1615  }
  1616  
  1617  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1618  
  1619  func Setegid(egid int) (err error) {
  1620  	_, _, e1 := RawSyscall(SYS_SETEGID, uintptr(egid), 0, 0)
  1621  	if e1 != 0 {
  1622  		err = errnoErr(e1)
  1623  	}
  1624  	return
  1625  }
  1626  
  1627  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1628  
  1629  func Seteuid(euid int) (err error) {
  1630  	_, _, e1 := RawSyscall(SYS_SETEUID, uintptr(euid), 0, 0)
  1631  	if e1 != 0 {
  1632  		err = errnoErr(e1)
  1633  	}
  1634  	return
  1635  }
  1636  
  1637  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1638  
  1639  func Setgid(gid int) (err error) {
  1640  	_, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 0, 0)
  1641  	if e1 != 0 {
  1642  		err = errnoErr(e1)
  1643  	}
  1644  	return
  1645  }
  1646  
  1647  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1648  
  1649  func Setlogin(name string) (err error) {
  1650  	var _p0 *byte
  1651  	_p0, err = BytePtrFromString(name)
  1652  	if err != nil {
  1653  		return
  1654  	}
  1655  	_, _, e1 := Syscall(SYS_SETLOGIN, uintptr(unsafe.Pointer(_p0)), 0, 0)
  1656  	if e1 != 0 {
  1657  		err = errnoErr(e1)
  1658  	}
  1659  	return
  1660  }
  1661  
  1662  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1663  
  1664  func Setpgid(pid int, pgid int) (err error) {
  1665  	_, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
  1666  	if e1 != 0 {
  1667  		err = errnoErr(e1)
  1668  	}
  1669  	return
  1670  }
  1671  
  1672  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1673  
  1674  func Setpriority(which int, who int, prio int) (err error) {
  1675  	_, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
  1676  	if e1 != 0 {
  1677  		err = errnoErr(e1)
  1678  	}
  1679  	return
  1680  }
  1681  
  1682  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1683  
  1684  func Setregid(rgid int, egid int) (err error) {
  1685  	_, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
  1686  	if e1 != 0 {
  1687  		err = errnoErr(e1)
  1688  	}
  1689  	return
  1690  }
  1691  
  1692  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1693  
  1694  func Setreuid(ruid int, euid int) (err error) {
  1695  	_, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
  1696  	if e1 != 0 {
  1697  		err = errnoErr(e1)
  1698  	}
  1699  	return
  1700  }
  1701  
  1702  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1703  
  1704  func Setresgid(rgid int, egid int, sgid int) (err error) {
  1705  	_, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid))
  1706  	if e1 != 0 {
  1707  		err = errnoErr(e1)
  1708  	}
  1709  	return
  1710  }
  1711  
  1712  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1713  
  1714  func Setresuid(ruid int, euid int, suid int) (err error) {
  1715  	_, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid))
  1716  	if e1 != 0 {
  1717  		err = errnoErr(e1)
  1718  	}
  1719  	return
  1720  }
  1721  
  1722  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1723  
  1724  func Setrlimit(which int, lim *Rlimit) (err error) {
  1725  	_, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
  1726  	if e1 != 0 {
  1727  		err = errnoErr(e1)
  1728  	}
  1729  	return
  1730  }
  1731  
  1732  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1733  
  1734  func Setsid() (pid int, err error) {
  1735  	r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
  1736  	pid = int(r0)
  1737  	if e1 != 0 {
  1738  		err = errnoErr(e1)
  1739  	}
  1740  	return
  1741  }
  1742  
  1743  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1744  
  1745  func Settimeofday(tp *Timeval) (err error) {
  1746  	_, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
  1747  	if e1 != 0 {
  1748  		err = errnoErr(e1)
  1749  	}
  1750  	return
  1751  }
  1752  
  1753  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1754  
  1755  func Setuid(uid int) (err error) {
  1756  	_, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0)
  1757  	if e1 != 0 {
  1758  		err = errnoErr(e1)
  1759  	}
  1760  	return
  1761  }
  1762  
  1763  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1764  
  1765  func stat(path string, stat *stat_freebsd11_t) (err error) {
  1766  	var _p0 *byte
  1767  	_p0, err = BytePtrFromString(path)
  1768  	if err != nil {
  1769  		return
  1770  	}
  1771  	_, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
  1772  	if e1 != 0 {
  1773  		err = errnoErr(e1)
  1774  	}
  1775  	return
  1776  }
  1777  
  1778  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1779  
  1780  func statfs(path string, stat *statfs_freebsd11_t) (err error) {
  1781  	var _p0 *byte
  1782  	_p0, err = BytePtrFromString(path)
  1783  	if err != nil {
  1784  		return
  1785  	}
  1786  	_, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
  1787  	if e1 != 0 {
  1788  		err = errnoErr(e1)
  1789  	}
  1790  	return
  1791  }
  1792  
  1793  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1794  
  1795  func statfs_freebsd12(path string, stat *Statfs_t) (err error) {
  1796  	var _p0 *byte
  1797  	_p0, err = BytePtrFromString(path)
  1798  	if err != nil {
  1799  		return
  1800  	}
  1801  	_, _, e1 := Syscall(SYS_STATFS_FREEBSD12, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
  1802  	if e1 != 0 {
  1803  		err = errnoErr(e1)
  1804  	}
  1805  	return
  1806  }
  1807  
  1808  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1809  
  1810  func Symlink(path string, link string) (err error) {
  1811  	var _p0 *byte
  1812  	_p0, err = BytePtrFromString(path)
  1813  	if err != nil {
  1814  		return
  1815  	}
  1816  	var _p1 *byte
  1817  	_p1, err = BytePtrFromString(link)
  1818  	if err != nil {
  1819  		return
  1820  	}
  1821  	_, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
  1822  	if e1 != 0 {
  1823  		err = errnoErr(e1)
  1824  	}
  1825  	return
  1826  }
  1827  
  1828  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1829  
  1830  func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
  1831  	var _p0 *byte
  1832  	_p0, err = BytePtrFromString(oldpath)
  1833  	if err != nil {
  1834  		return
  1835  	}
  1836  	var _p1 *byte
  1837  	_p1, err = BytePtrFromString(newpath)
  1838  	if err != nil {
  1839  		return
  1840  	}
  1841  	_, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
  1842  	if e1 != 0 {
  1843  		err = errnoErr(e1)
  1844  	}
  1845  	return
  1846  }
  1847  
  1848  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1849  
  1850  func Sync() (err error) {
  1851  	_, _, e1 := Syscall(SYS_SYNC, 0, 0, 0)
  1852  	if e1 != 0 {
  1853  		err = errnoErr(e1)
  1854  	}
  1855  	return
  1856  }
  1857  
  1858  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1859  
  1860  func Truncate(path string, length int64) (err error) {
  1861  	var _p0 *byte
  1862  	_p0, err = BytePtrFromString(path)
  1863  	if err != nil {
  1864  		return
  1865  	}
  1866  	_, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0)
  1867  	if e1 != 0 {
  1868  		err = errnoErr(e1)
  1869  	}
  1870  	return
  1871  }
  1872  
  1873  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1874  
  1875  func Umask(newmask int) (oldmask int) {
  1876  	r0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0)
  1877  	oldmask = int(r0)
  1878  	return
  1879  }
  1880  
  1881  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1882  
  1883  func Undelete(path string) (err error) {
  1884  	var _p0 *byte
  1885  	_p0, err = BytePtrFromString(path)
  1886  	if err != nil {
  1887  		return
  1888  	}
  1889  	_, _, e1 := Syscall(SYS_UNDELETE, uintptr(unsafe.Pointer(_p0)), 0, 0)
  1890  	if e1 != 0 {
  1891  		err = errnoErr(e1)
  1892  	}
  1893  	return
  1894  }
  1895  
  1896  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1897  
  1898  func Unlink(path string) (err error) {
  1899  	var _p0 *byte
  1900  	_p0, err = BytePtrFromString(path)
  1901  	if err != nil {
  1902  		return
  1903  	}
  1904  	_, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0)
  1905  	if e1 != 0 {
  1906  		err = errnoErr(e1)
  1907  	}
  1908  	return
  1909  }
  1910  
  1911  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1912  
  1913  func Unlinkat(dirfd int, path string, flags int) (err error) {
  1914  	var _p0 *byte
  1915  	_p0, err = BytePtrFromString(path)
  1916  	if err != nil {
  1917  		return
  1918  	}
  1919  	_, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
  1920  	if e1 != 0 {
  1921  		err = errnoErr(e1)
  1922  	}
  1923  	return
  1924  }
  1925  
  1926  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1927  
  1928  func Unmount(path string, flags int) (err error) {
  1929  	var _p0 *byte
  1930  	_p0, err = BytePtrFromString(path)
  1931  	if err != nil {
  1932  		return
  1933  	}
  1934  	_, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
  1935  	if e1 != 0 {
  1936  		err = errnoErr(e1)
  1937  	}
  1938  	return
  1939  }
  1940  
  1941  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1942  
  1943  func write(fd int, p []byte) (n int, err error) {
  1944  	var _p0 unsafe.Pointer
  1945  	if len(p) > 0 {
  1946  		_p0 = unsafe.Pointer(&p[0])
  1947  	} else {
  1948  		_p0 = unsafe.Pointer(&_zero)
  1949  	}
  1950  	r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
  1951  	n = int(r0)
  1952  	if e1 != 0 {
  1953  		err = errnoErr(e1)
  1954  	}
  1955  	return
  1956  }
  1957  
  1958  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1959  
  1960  func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {
  1961  	r0, _, e1 := Syscall6(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos))
  1962  	ret = uintptr(r0)
  1963  	if e1 != 0 {
  1964  		err = errnoErr(e1)
  1965  	}
  1966  	return
  1967  }
  1968  
  1969  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1970  
  1971  func munmap(addr uintptr, length uintptr) (err error) {
  1972  	_, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
  1973  	if e1 != 0 {
  1974  		err = errnoErr(e1)
  1975  	}
  1976  	return
  1977  }
  1978  
  1979  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1980  
  1981  func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
  1982  	r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
  1983  	n = int(r0)
  1984  	if e1 != 0 {
  1985  		err = errnoErr(e1)
  1986  	}
  1987  	return
  1988  }
  1989  
  1990  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1991  
  1992  func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
  1993  	r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
  1994  	n = int(r0)
  1995  	if e1 != 0 {
  1996  		err = errnoErr(e1)
  1997  	}
  1998  	return
  1999  }
  2000  
  2001  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  2002  
  2003  func accept4(fd int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (nfd int, err error) {
  2004  	r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
  2005  	nfd = int(r0)
  2006  	if e1 != 0 {
  2007  		err = errnoErr(e1)
  2008  	}
  2009  	return
  2010  }
  2011  
  2012  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  2013  
  2014  func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {
  2015  	var _p0 *byte
  2016  	_p0, err = BytePtrFromString(path)
  2017  	if err != nil {
  2018  		return
  2019  	}
  2020  	_, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)
  2021  	if e1 != 0 {
  2022  		err = errnoErr(e1)
  2023  	}
  2024  	return
  2025  }