...
Run Format

Source file src/syscall/zsyscall_dragonfly_amd64.go

Documentation: syscall

     1  // mksyscall.pl -dragonfly -tags dragonfly,amd64 syscall_bsd.go syscall_dragonfly.go syscall_dragonfly_amd64.go
     2  // MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
     3  
     4  // +build dragonfly,amd64
     5  
     6  package syscall
     7  
     8  import "unsafe"
     9  
    10  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    11  
    12  func getgroups(ngid int, gid *_Gid_t) (n int, err error) {
    13  	r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
    14  	n = int(r0)
    15  	if e1 != 0 {
    16  		err = errnoErr(e1)
    17  	}
    18  	return
    19  }
    20  
    21  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    22  
    23  func setgroups(ngid int, gid *_Gid_t) (err error) {
    24  	_, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
    25  	if e1 != 0 {
    26  		err = errnoErr(e1)
    27  	}
    28  	return
    29  }
    30  
    31  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    32  
    33  func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
    34  	r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
    35  	wpid = int(r0)
    36  	if e1 != 0 {
    37  		err = errnoErr(e1)
    38  	}
    39  	return
    40  }
    41  
    42  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    43  
    44  func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
    45  	r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
    46  	fd = int(r0)
    47  	if e1 != 0 {
    48  		err = errnoErr(e1)
    49  	}
    50  	return
    51  }
    52  
    53  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    54  
    55  func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
    56  	_, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))
    57  	if e1 != 0 {
    58  		err = errnoErr(e1)
    59  	}
    60  	return
    61  }
    62  
    63  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    64  
    65  func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
    66  	_, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))
    67  	if e1 != 0 {
    68  		err = errnoErr(e1)
    69  	}
    70  	return
    71  }
    72  
    73  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    74  
    75  func socket(domain int, typ int, proto int) (fd int, err error) {
    76  	r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))
    77  	fd = int(r0)
    78  	if e1 != 0 {
    79  		err = errnoErr(e1)
    80  	}
    81  	return
    82  }
    83  
    84  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    85  
    86  func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {
    87  	_, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
    88  	if e1 != 0 {
    89  		err = errnoErr(e1)
    90  	}
    91  	return
    92  }
    93  
    94  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    95  
    96  func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {
    97  	_, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
    98  	if e1 != 0 {
    99  		err = errnoErr(e1)
   100  	}
   101  	return
   102  }
   103  
   104  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   105  
   106  func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
   107  	_, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
   108  	if e1 != 0 {
   109  		err = errnoErr(e1)
   110  	}
   111  	return
   112  }
   113  
   114  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   115  
   116  func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
   117  	_, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
   118  	if e1 != 0 {
   119  		err = errnoErr(e1)
   120  	}
   121  	return
   122  }
   123  
   124  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   125  
   126  func Shutdown(s int, how int) (err error) {
   127  	_, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(s), uintptr(how), 0)
   128  	if e1 != 0 {
   129  		err = errnoErr(e1)
   130  	}
   131  	return
   132  }
   133  
   134  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   135  
   136  func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
   137  	_, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
   138  	if e1 != 0 {
   139  		err = errnoErr(e1)
   140  	}
   141  	return
   142  }
   143  
   144  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   145  
   146  func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {
   147  	var _p0 unsafe.Pointer
   148  	if len(p) > 0 {
   149  		_p0 = unsafe.Pointer(&p[0])
   150  	} else {
   151  		_p0 = unsafe.Pointer(&_zero)
   152  	}
   153  	r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
   154  	n = int(r0)
   155  	if e1 != 0 {
   156  		err = errnoErr(e1)
   157  	}
   158  	return
   159  }
   160  
   161  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   162  
   163  func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {
   164  	var _p0 unsafe.Pointer
   165  	if len(buf) > 0 {
   166  		_p0 = unsafe.Pointer(&buf[0])
   167  	} else {
   168  		_p0 = unsafe.Pointer(&_zero)
   169  	}
   170  	_, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
   171  	if e1 != 0 {
   172  		err = errnoErr(e1)
   173  	}
   174  	return
   175  }
   176  
   177  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   178  
   179  func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
   180  	r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
   181  	n = int(r0)
   182  	if e1 != 0 {
   183  		err = errnoErr(e1)
   184  	}
   185  	return
   186  }
   187  
   188  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   189  
   190  func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
   191  	r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
   192  	n = int(r0)
   193  	if e1 != 0 {
   194  		err = errnoErr(e1)
   195  	}
   196  	return
   197  }
   198  
   199  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   200  
   201  func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error) {
   202  	r0, _, e1 := Syscall6(SYS_KEVENT, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout)))
   203  	n = int(r0)
   204  	if e1 != 0 {
   205  		err = errnoErr(e1)
   206  	}
   207  	return
   208  }
   209  
   210  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   211  
   212  func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
   213  	var _p0 unsafe.Pointer
   214  	if len(mib) > 0 {
   215  		_p0 = unsafe.Pointer(&mib[0])
   216  	} else {
   217  		_p0 = unsafe.Pointer(&_zero)
   218  	}
   219  	_, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
   220  	if e1 != 0 {
   221  		err = errnoErr(e1)
   222  	}
   223  	return
   224  }
   225  
   226  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   227  
   228  func utimes(path string, timeval *[2]Timeval) (err error) {
   229  	var _p0 *byte
   230  	_p0, err = BytePtrFromString(path)
   231  	if err != nil {
   232  		return
   233  	}
   234  	_, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0)
   235  	if e1 != 0 {
   236  		err = errnoErr(e1)
   237  	}
   238  	return
   239  }
   240  
   241  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   242  
   243  func futimes(fd int, timeval *[2]Timeval) (err error) {
   244  	_, _, e1 := Syscall(SYS_FUTIMES, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0)
   245  	if e1 != 0 {
   246  		err = errnoErr(e1)
   247  	}
   248  	return
   249  }
   250  
   251  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   252  
   253  func fcntl(fd int, cmd int, arg int) (val int, err error) {
   254  	r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg))
   255  	val = int(r0)
   256  	if e1 != 0 {
   257  		err = errnoErr(e1)
   258  	}
   259  	return
   260  }
   261  
   262  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   263  
   264  func pipe() (r int, w int, err error) {
   265  	r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0)
   266  	r = int(r0)
   267  	w = int(r1)
   268  	if e1 != 0 {
   269  		err = errnoErr(e1)
   270  	}
   271  	return
   272  }
   273  
   274  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   275  
   276  func extpread(fd int, p []byte, flags int, offset int64) (n int, err error) {
   277  	var _p0 unsafe.Pointer
   278  	if len(p) > 0 {
   279  		_p0 = unsafe.Pointer(&p[0])
   280  	} else {
   281  		_p0 = unsafe.Pointer(&_zero)
   282  	}
   283  	r0, _, e1 := Syscall6(SYS_EXTPREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(offset), 0)
   284  	n = int(r0)
   285  	if e1 != 0 {
   286  		err = errnoErr(e1)
   287  	}
   288  	return
   289  }
   290  
   291  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   292  
   293  func extpwrite(fd int, p []byte, flags int, offset int64) (n int, err error) {
   294  	var _p0 unsafe.Pointer
   295  	if len(p) > 0 {
   296  		_p0 = unsafe.Pointer(&p[0])
   297  	} else {
   298  		_p0 = unsafe.Pointer(&_zero)
   299  	}
   300  	r0, _, e1 := Syscall6(SYS_EXTPWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(offset), 0)
   301  	n = int(r0)
   302  	if e1 != 0 {
   303  		err = errnoErr(e1)
   304  	}
   305  	return
   306  }
   307  
   308  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   309  
   310  func Access(path string, mode uint32) (err error) {
   311  	var _p0 *byte
   312  	_p0, err = BytePtrFromString(path)
   313  	if err != nil {
   314  		return
   315  	}
   316  	_, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
   317  	if e1 != 0 {
   318  		err = errnoErr(e1)
   319  	}
   320  	return
   321  }
   322  
   323  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   324  
   325  func Adjtime(delta *Timeval, olddelta *Timeval) (err error) {
   326  	_, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0)
   327  	if e1 != 0 {
   328  		err = errnoErr(e1)
   329  	}
   330  	return
   331  }
   332  
   333  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   334  
   335  func Chdir(path string) (err error) {
   336  	var _p0 *byte
   337  	_p0, err = BytePtrFromString(path)
   338  	if err != nil {
   339  		return
   340  	}
   341  	_, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
   342  	if e1 != 0 {
   343  		err = errnoErr(e1)
   344  	}
   345  	return
   346  }
   347  
   348  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   349  
   350  func Chflags(path string, flags int) (err error) {
   351  	var _p0 *byte
   352  	_p0, err = BytePtrFromString(path)
   353  	if err != nil {
   354  		return
   355  	}
   356  	_, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
   357  	if e1 != 0 {
   358  		err = errnoErr(e1)
   359  	}
   360  	return
   361  }
   362  
   363  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   364  
   365  func Chmod(path string, mode uint32) (err error) {
   366  	var _p0 *byte
   367  	_p0, err = BytePtrFromString(path)
   368  	if err != nil {
   369  		return
   370  	}
   371  	_, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 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 Chown(path string, uid int, gid int) (err error) {
   381  	var _p0 *byte
   382  	_p0, err = BytePtrFromString(path)
   383  	if err != nil {
   384  		return
   385  	}
   386  	_, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
   387  	if e1 != 0 {
   388  		err = errnoErr(e1)
   389  	}
   390  	return
   391  }
   392  
   393  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   394  
   395  func Chroot(path string) (err error) {
   396  	var _p0 *byte
   397  	_p0, err = BytePtrFromString(path)
   398  	if err != nil {
   399  		return
   400  	}
   401  	_, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
   402  	if e1 != 0 {
   403  		err = errnoErr(e1)
   404  	}
   405  	return
   406  }
   407  
   408  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   409  
   410  func Close(fd int) (err error) {
   411  	_, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
   412  	if e1 != 0 {
   413  		err = errnoErr(e1)
   414  	}
   415  	return
   416  }
   417  
   418  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   419  
   420  func Dup(fd int) (nfd int, err error) {
   421  	r0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0)
   422  	nfd = int(r0)
   423  	if e1 != 0 {
   424  		err = errnoErr(e1)
   425  	}
   426  	return
   427  }
   428  
   429  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   430  
   431  func Dup2(from int, to int) (err error) {
   432  	_, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0)
   433  	if e1 != 0 {
   434  		err = errnoErr(e1)
   435  	}
   436  	return
   437  }
   438  
   439  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   440  
   441  func Fchdir(fd int) (err error) {
   442  	_, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
   443  	if e1 != 0 {
   444  		err = errnoErr(e1)
   445  	}
   446  	return
   447  }
   448  
   449  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   450  
   451  func Fchflags(fd int, flags int) (err error) {
   452  	_, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0)
   453  	if e1 != 0 {
   454  		err = errnoErr(e1)
   455  	}
   456  	return
   457  }
   458  
   459  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   460  
   461  func Fchmod(fd int, mode uint32) (err error) {
   462  	_, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
   463  	if e1 != 0 {
   464  		err = errnoErr(e1)
   465  	}
   466  	return
   467  }
   468  
   469  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   470  
   471  func Fchown(fd int, uid int, gid int) (err error) {
   472  	_, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
   473  	if e1 != 0 {
   474  		err = errnoErr(e1)
   475  	}
   476  	return
   477  }
   478  
   479  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   480  
   481  func Flock(fd int, how int) (err error) {
   482  	_, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
   483  	if e1 != 0 {
   484  		err = errnoErr(e1)
   485  	}
   486  	return
   487  }
   488  
   489  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   490  
   491  func Fpathconf(fd int, name int) (val int, err error) {
   492  	r0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0)
   493  	val = int(r0)
   494  	if e1 != 0 {
   495  		err = errnoErr(e1)
   496  	}
   497  	return
   498  }
   499  
   500  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   501  
   502  func Fstat(fd int, stat *Stat_t) (err error) {
   503  	_, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 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 Fstatfs(fd int, stat *Statfs_t) (err error) {
   513  	_, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
   514  	if e1 != 0 {
   515  		err = errnoErr(e1)
   516  	}
   517  	return
   518  }
   519  
   520  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   521  
   522  func Fsync(fd int) (err error) {
   523  	_, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
   524  	if e1 != 0 {
   525  		err = errnoErr(e1)
   526  	}
   527  	return
   528  }
   529  
   530  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   531  
   532  func Ftruncate(fd int, length int64) (err error) {
   533  	_, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), 0, uintptr(length))
   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 Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
   543  	var _p0 unsafe.Pointer
   544  	if len(buf) > 0 {
   545  		_p0 = unsafe.Pointer(&buf[0])
   546  	} else {
   547  		_p0 = unsafe.Pointer(&_zero)
   548  	}
   549  	r0, _, e1 := Syscall6(SYS_GETDIRENTRIES, uintptr(fd), uintptr(_p0), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0)
   550  	n = int(r0)
   551  	if e1 != 0 {
   552  		err = errnoErr(e1)
   553  	}
   554  	return
   555  }
   556  
   557  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   558  
   559  func Getdtablesize() (size int) {
   560  	r0, _, _ := Syscall(SYS_GETDTABLESIZE, 0, 0, 0)
   561  	size = int(r0)
   562  	return
   563  }
   564  
   565  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   566  
   567  func Getegid() (egid int) {
   568  	r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0)
   569  	egid = int(r0)
   570  	return
   571  }
   572  
   573  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   574  
   575  func Geteuid() (uid int) {
   576  	r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0)
   577  	uid = int(r0)
   578  	return
   579  }
   580  
   581  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   582  
   583  func Getgid() (gid int) {
   584  	r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0)
   585  	gid = int(r0)
   586  	return
   587  }
   588  
   589  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   590  
   591  func Getpgid(pid int) (pgid int, err error) {
   592  	r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
   593  	pgid = int(r0)
   594  	if e1 != 0 {
   595  		err = errnoErr(e1)
   596  	}
   597  	return
   598  }
   599  
   600  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   601  
   602  func Getpgrp() (pgrp int) {
   603  	r0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0)
   604  	pgrp = int(r0)
   605  	return
   606  }
   607  
   608  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   609  
   610  func Getpid() (pid int) {
   611  	r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)
   612  	pid = int(r0)
   613  	return
   614  }
   615  
   616  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   617  
   618  func Getppid() (ppid int) {
   619  	r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)
   620  	ppid = int(r0)
   621  	return
   622  }
   623  
   624  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   625  
   626  func Getpriority(which int, who int) (prio int, err error) {
   627  	r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
   628  	prio = int(r0)
   629  	if e1 != 0 {
   630  		err = errnoErr(e1)
   631  	}
   632  	return
   633  }
   634  
   635  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   636  
   637  func Getrlimit(which int, lim *Rlimit) (err error) {
   638  	_, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
   639  	if e1 != 0 {
   640  		err = errnoErr(e1)
   641  	}
   642  	return
   643  }
   644  
   645  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   646  
   647  func Getrusage(who int, rusage *Rusage) (err error) {
   648  	_, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
   649  	if e1 != 0 {
   650  		err = errnoErr(e1)
   651  	}
   652  	return
   653  }
   654  
   655  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   656  
   657  func Getsid(pid int) (sid int, err error) {
   658  	r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
   659  	sid = int(r0)
   660  	if e1 != 0 {
   661  		err = errnoErr(e1)
   662  	}
   663  	return
   664  }
   665  
   666  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   667  
   668  func Gettimeofday(tv *Timeval) (err error) {
   669  	_, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
   670  	if e1 != 0 {
   671  		err = errnoErr(e1)
   672  	}
   673  	return
   674  }
   675  
   676  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   677  
   678  func Getuid() (uid int) {
   679  	r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
   680  	uid = int(r0)
   681  	return
   682  }
   683  
   684  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   685  
   686  func Issetugid() (tainted bool) {
   687  	r0, _, _ := Syscall(SYS_ISSETUGID, 0, 0, 0)
   688  	tainted = bool(r0 != 0)
   689  	return
   690  }
   691  
   692  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   693  
   694  func Kill(pid int, signum Signal) (err error) {
   695  	_, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), 0)
   696  	if e1 != 0 {
   697  		err = errnoErr(e1)
   698  	}
   699  	return
   700  }
   701  
   702  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   703  
   704  func Kqueue() (fd int, err error) {
   705  	r0, _, e1 := Syscall(SYS_KQUEUE, 0, 0, 0)
   706  	fd = int(r0)
   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 Lchown(path string, uid int, gid int) (err error) {
   716  	var _p0 *byte
   717  	_p0, err = BytePtrFromString(path)
   718  	if err != nil {
   719  		return
   720  	}
   721  	_, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
   722  	if e1 != 0 {
   723  		err = errnoErr(e1)
   724  	}
   725  	return
   726  }
   727  
   728  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   729  
   730  func Link(path string, link string) (err error) {
   731  	var _p0 *byte
   732  	_p0, err = BytePtrFromString(path)
   733  	if err != nil {
   734  		return
   735  	}
   736  	var _p1 *byte
   737  	_p1, err = BytePtrFromString(link)
   738  	if err != nil {
   739  		return
   740  	}
   741  	_, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
   742  	if e1 != 0 {
   743  		err = errnoErr(e1)
   744  	}
   745  	return
   746  }
   747  
   748  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   749  
   750  func Listen(s int, backlog int) (err error) {
   751  	_, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0)
   752  	if e1 != 0 {
   753  		err = errnoErr(e1)
   754  	}
   755  	return
   756  }
   757  
   758  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   759  
   760  func Lstat(path string, stat *Stat_t) (err error) {
   761  	var _p0 *byte
   762  	_p0, err = BytePtrFromString(path)
   763  	if err != nil {
   764  		return
   765  	}
   766  	_, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
   767  	if e1 != 0 {
   768  		err = errnoErr(e1)
   769  	}
   770  	return
   771  }
   772  
   773  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   774  
   775  func Mkdir(path string, mode uint32) (err error) {
   776  	var _p0 *byte
   777  	_p0, err = BytePtrFromString(path)
   778  	if err != nil {
   779  		return
   780  	}
   781  	_, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
   782  	if e1 != 0 {
   783  		err = errnoErr(e1)
   784  	}
   785  	return
   786  }
   787  
   788  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   789  
   790  func Mkfifo(path string, mode uint32) (err error) {
   791  	var _p0 *byte
   792  	_p0, err = BytePtrFromString(path)
   793  	if err != nil {
   794  		return
   795  	}
   796  	_, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
   797  	if e1 != 0 {
   798  		err = errnoErr(e1)
   799  	}
   800  	return
   801  }
   802  
   803  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   804  
   805  func Mknod(path string, mode uint32, dev int) (err error) {
   806  	var _p0 *byte
   807  	_p0, err = BytePtrFromString(path)
   808  	if err != nil {
   809  		return
   810  	}
   811  	_, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
   812  	if e1 != 0 {
   813  		err = errnoErr(e1)
   814  	}
   815  	return
   816  }
   817  
   818  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   819  
   820  func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
   821  	_, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
   822  	if e1 != 0 {
   823  		err = errnoErr(e1)
   824  	}
   825  	return
   826  }
   827  
   828  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   829  
   830  func Open(path string, mode int, perm uint32) (fd int, err error) {
   831  	var _p0 *byte
   832  	_p0, err = BytePtrFromString(path)
   833  	if err != nil {
   834  		return
   835  	}
   836  	r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
   837  	fd = int(r0)
   838  	if e1 != 0 {
   839  		err = errnoErr(e1)
   840  	}
   841  	return
   842  }
   843  
   844  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   845  
   846  func Pathconf(path string, name int) (val int, err error) {
   847  	var _p0 *byte
   848  	_p0, err = BytePtrFromString(path)
   849  	if err != nil {
   850  		return
   851  	}
   852  	r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)
   853  	val = int(r0)
   854  	if e1 != 0 {
   855  		err = errnoErr(e1)
   856  	}
   857  	return
   858  }
   859  
   860  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   861  
   862  func read(fd int, p []byte) (n int, err error) {
   863  	var _p0 unsafe.Pointer
   864  	if len(p) > 0 {
   865  		_p0 = unsafe.Pointer(&p[0])
   866  	} else {
   867  		_p0 = unsafe.Pointer(&_zero)
   868  	}
   869  	r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
   870  	n = int(r0)
   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 Readlink(path string, buf []byte) (n int, err error) {
   880  	var _p0 *byte
   881  	_p0, err = BytePtrFromString(path)
   882  	if err != nil {
   883  		return
   884  	}
   885  	var _p1 unsafe.Pointer
   886  	if len(buf) > 0 {
   887  		_p1 = unsafe.Pointer(&buf[0])
   888  	} else {
   889  		_p1 = unsafe.Pointer(&_zero)
   890  	}
   891  	r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))
   892  	n = int(r0)
   893  	if e1 != 0 {
   894  		err = errnoErr(e1)
   895  	}
   896  	return
   897  }
   898  
   899  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   900  
   901  func Rename(from string, to string) (err error) {
   902  	var _p0 *byte
   903  	_p0, err = BytePtrFromString(from)
   904  	if err != nil {
   905  		return
   906  	}
   907  	var _p1 *byte
   908  	_p1, err = BytePtrFromString(to)
   909  	if err != nil {
   910  		return
   911  	}
   912  	_, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
   913  	if e1 != 0 {
   914  		err = errnoErr(e1)
   915  	}
   916  	return
   917  }
   918  
   919  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   920  
   921  func Revoke(path string) (err error) {
   922  	var _p0 *byte
   923  	_p0, err = BytePtrFromString(path)
   924  	if err != nil {
   925  		return
   926  	}
   927  	_, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0)
   928  	if e1 != 0 {
   929  		err = errnoErr(e1)
   930  	}
   931  	return
   932  }
   933  
   934  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   935  
   936  func Rmdir(path string) (err error) {
   937  	var _p0 *byte
   938  	_p0, err = BytePtrFromString(path)
   939  	if err != nil {
   940  		return
   941  	}
   942  	_, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
   943  	if e1 != 0 {
   944  		err = errnoErr(e1)
   945  	}
   946  	return
   947  }
   948  
   949  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   950  
   951  func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
   952  	r0, _, e1 := Syscall6(SYS_LSEEK, uintptr(fd), 0, uintptr(offset), uintptr(whence), 0, 0)
   953  	newoffset = int64(r0)
   954  	if e1 != 0 {
   955  		err = errnoErr(e1)
   956  	}
   957  	return
   958  }
   959  
   960  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   961  
   962  func Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) {
   963  	_, _, e1 := Syscall6(SYS_SELECT, uintptr(n), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
   964  	if e1 != 0 {
   965  		err = errnoErr(e1)
   966  	}
   967  	return
   968  }
   969  
   970  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   971  
   972  func Setegid(egid int) (err error) {
   973  	_, _, e1 := RawSyscall(SYS_SETEGID, uintptr(egid), 0, 0)
   974  	if e1 != 0 {
   975  		err = errnoErr(e1)
   976  	}
   977  	return
   978  }
   979  
   980  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   981  
   982  func Seteuid(euid int) (err error) {
   983  	_, _, e1 := RawSyscall(SYS_SETEUID, uintptr(euid), 0, 0)
   984  	if e1 != 0 {
   985  		err = errnoErr(e1)
   986  	}
   987  	return
   988  }
   989  
   990  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   991  
   992  func Setgid(gid int) (err error) {
   993  	_, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 0, 0)
   994  	if e1 != 0 {
   995  		err = errnoErr(e1)
   996  	}
   997  	return
   998  }
   999  
  1000  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1001  
  1002  func Setlogin(name string) (err error) {
  1003  	var _p0 *byte
  1004  	_p0, err = BytePtrFromString(name)
  1005  	if err != nil {
  1006  		return
  1007  	}
  1008  	_, _, e1 := Syscall(SYS_SETLOGIN, uintptr(unsafe.Pointer(_p0)), 0, 0)
  1009  	if e1 != 0 {
  1010  		err = errnoErr(e1)
  1011  	}
  1012  	return
  1013  }
  1014  
  1015  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1016  
  1017  func Setpgid(pid int, pgid int) (err error) {
  1018  	_, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
  1019  	if e1 != 0 {
  1020  		err = errnoErr(e1)
  1021  	}
  1022  	return
  1023  }
  1024  
  1025  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1026  
  1027  func Setpriority(which int, who int, prio int) (err error) {
  1028  	_, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
  1029  	if e1 != 0 {
  1030  		err = errnoErr(e1)
  1031  	}
  1032  	return
  1033  }
  1034  
  1035  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1036  
  1037  func Setregid(rgid int, egid int) (err error) {
  1038  	_, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
  1039  	if e1 != 0 {
  1040  		err = errnoErr(e1)
  1041  	}
  1042  	return
  1043  }
  1044  
  1045  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1046  
  1047  func Setreuid(ruid int, euid int) (err error) {
  1048  	_, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
  1049  	if e1 != 0 {
  1050  		err = errnoErr(e1)
  1051  	}
  1052  	return
  1053  }
  1054  
  1055  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1056  
  1057  func Setrlimit(which int, lim *Rlimit) (err error) {
  1058  	_, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
  1059  	if e1 != 0 {
  1060  		err = errnoErr(e1)
  1061  	}
  1062  	return
  1063  }
  1064  
  1065  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1066  
  1067  func Setsid() (pid int, err error) {
  1068  	r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
  1069  	pid = int(r0)
  1070  	if e1 != 0 {
  1071  		err = errnoErr(e1)
  1072  	}
  1073  	return
  1074  }
  1075  
  1076  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1077  
  1078  func Settimeofday(tp *Timeval) (err error) {
  1079  	_, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
  1080  	if e1 != 0 {
  1081  		err = errnoErr(e1)
  1082  	}
  1083  	return
  1084  }
  1085  
  1086  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1087  
  1088  func Setuid(uid int) (err error) {
  1089  	_, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0)
  1090  	if e1 != 0 {
  1091  		err = errnoErr(e1)
  1092  	}
  1093  	return
  1094  }
  1095  
  1096  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1097  
  1098  func Stat(path string, stat *Stat_t) (err error) {
  1099  	var _p0 *byte
  1100  	_p0, err = BytePtrFromString(path)
  1101  	if err != nil {
  1102  		return
  1103  	}
  1104  	_, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
  1105  	if e1 != 0 {
  1106  		err = errnoErr(e1)
  1107  	}
  1108  	return
  1109  }
  1110  
  1111  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1112  
  1113  func Statfs(path string, stat *Statfs_t) (err error) {
  1114  	var _p0 *byte
  1115  	_p0, err = BytePtrFromString(path)
  1116  	if err != nil {
  1117  		return
  1118  	}
  1119  	_, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
  1120  	if e1 != 0 {
  1121  		err = errnoErr(e1)
  1122  	}
  1123  	return
  1124  }
  1125  
  1126  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1127  
  1128  func Symlink(path string, link string) (err error) {
  1129  	var _p0 *byte
  1130  	_p0, err = BytePtrFromString(path)
  1131  	if err != nil {
  1132  		return
  1133  	}
  1134  	var _p1 *byte
  1135  	_p1, err = BytePtrFromString(link)
  1136  	if err != nil {
  1137  		return
  1138  	}
  1139  	_, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
  1140  	if e1 != 0 {
  1141  		err = errnoErr(e1)
  1142  	}
  1143  	return
  1144  }
  1145  
  1146  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1147  
  1148  func Sync() (err error) {
  1149  	_, _, e1 := Syscall(SYS_SYNC, 0, 0, 0)
  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 Truncate(path string, length int64) (err error) {
  1159  	var _p0 *byte
  1160  	_p0, err = BytePtrFromString(path)
  1161  	if err != nil {
  1162  		return
  1163  	}
  1164  	_, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), 0, uintptr(length))
  1165  	if e1 != 0 {
  1166  		err = errnoErr(e1)
  1167  	}
  1168  	return
  1169  }
  1170  
  1171  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1172  
  1173  func Umask(newmask int) (oldmask int) {
  1174  	r0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0)
  1175  	oldmask = int(r0)
  1176  	return
  1177  }
  1178  
  1179  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1180  
  1181  func Undelete(path string) (err error) {
  1182  	var _p0 *byte
  1183  	_p0, err = BytePtrFromString(path)
  1184  	if err != nil {
  1185  		return
  1186  	}
  1187  	_, _, e1 := Syscall(SYS_UNDELETE, uintptr(unsafe.Pointer(_p0)), 0, 0)
  1188  	if e1 != 0 {
  1189  		err = errnoErr(e1)
  1190  	}
  1191  	return
  1192  }
  1193  
  1194  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1195  
  1196  func Unlink(path string) (err error) {
  1197  	var _p0 *byte
  1198  	_p0, err = BytePtrFromString(path)
  1199  	if err != nil {
  1200  		return
  1201  	}
  1202  	_, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0)
  1203  	if e1 != 0 {
  1204  		err = errnoErr(e1)
  1205  	}
  1206  	return
  1207  }
  1208  
  1209  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1210  
  1211  func Unmount(path string, flags int) (err error) {
  1212  	var _p0 *byte
  1213  	_p0, err = BytePtrFromString(path)
  1214  	if err != nil {
  1215  		return
  1216  	}
  1217  	_, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
  1218  	if e1 != 0 {
  1219  		err = errnoErr(e1)
  1220  	}
  1221  	return
  1222  }
  1223  
  1224  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1225  
  1226  func write(fd int, p []byte) (n int, err error) {
  1227  	var _p0 unsafe.Pointer
  1228  	if len(p) > 0 {
  1229  		_p0 = unsafe.Pointer(&p[0])
  1230  	} else {
  1231  		_p0 = unsafe.Pointer(&_zero)
  1232  	}
  1233  	r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
  1234  	n = int(r0)
  1235  	if e1 != 0 {
  1236  		err = errnoErr(e1)
  1237  	}
  1238  	return
  1239  }
  1240  
  1241  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1242  
  1243  func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {
  1244  	r0, _, e1 := Syscall9(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), 0, uintptr(pos), 0, 0)
  1245  	ret = uintptr(r0)
  1246  	if e1 != 0 {
  1247  		err = errnoErr(e1)
  1248  	}
  1249  	return
  1250  }
  1251  
  1252  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1253  
  1254  func munmap(addr uintptr, length uintptr) (err error) {
  1255  	_, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
  1256  	if e1 != 0 {
  1257  		err = errnoErr(e1)
  1258  	}
  1259  	return
  1260  }
  1261  
  1262  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1263  
  1264  func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
  1265  	r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
  1266  	n = int(r0)
  1267  	if e1 != 0 {
  1268  		err = errnoErr(e1)
  1269  	}
  1270  	return
  1271  }
  1272  
  1273  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1274  
  1275  func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
  1276  	r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
  1277  	n = int(r0)
  1278  	if e1 != 0 {
  1279  		err = errnoErr(e1)
  1280  	}
  1281  	return
  1282  }
  1283  
  1284  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1285  
  1286  func accept4(fd int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (nfd int, err error) {
  1287  	r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
  1288  	nfd = int(r0)
  1289  	if e1 != 0 {
  1290  		err = errnoErr(e1)
  1291  	}
  1292  	return
  1293  }
  1294  
  1295  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1296  
  1297  func utimensat(dirfd int, path string, times *[2]Timespec, flag int) (err error) {
  1298  	var _p0 *byte
  1299  	_p0, err = BytePtrFromString(path)
  1300  	if err != nil {
  1301  		return
  1302  	}
  1303  	_, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flag), 0, 0)
  1304  	if e1 != 0 {
  1305  		err = errnoErr(e1)
  1306  	}
  1307  	return
  1308  }
  1309  

View as plain text