...
Run Format

Source file src/syscall/zsyscall_darwin_arm64.go

Documentation: syscall

     1  // mksyscall.pl -tags darwin,arm64 syscall_bsd.go syscall_darwin.go syscall_darwin_arm64.go
     2  // Code generated by the command above; DO NOT EDIT.
     3  
     4  // +build darwin,arm64
     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 ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
   265  	_, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
   266  	if e1 != 0 {
   267  		err = errnoErr(e1)
   268  	}
   269  	return
   270  }
   271  
   272  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   273  
   274  func pipe() (r int, w int, err error) {
   275  	r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0)
   276  	r = int(r0)
   277  	w = int(r1)
   278  	if e1 != 0 {
   279  		err = errnoErr(e1)
   280  	}
   281  	return
   282  }
   283  
   284  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   285  
   286  func kill(pid int, signum int, posix int) (err error) {
   287  	_, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), uintptr(posix))
   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 Access(path string, mode uint32) (err error) {
   297  	var _p0 *byte
   298  	_p0, err = BytePtrFromString(path)
   299  	if err != nil {
   300  		return
   301  	}
   302  	_, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
   303  	if e1 != 0 {
   304  		err = errnoErr(e1)
   305  	}
   306  	return
   307  }
   308  
   309  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   310  
   311  func Adjtime(delta *Timeval, olddelta *Timeval) (err error) {
   312  	_, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0)
   313  	if e1 != 0 {
   314  		err = errnoErr(e1)
   315  	}
   316  	return
   317  }
   318  
   319  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   320  
   321  func Chdir(path string) (err error) {
   322  	var _p0 *byte
   323  	_p0, err = BytePtrFromString(path)
   324  	if err != nil {
   325  		return
   326  	}
   327  	_, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
   328  	if e1 != 0 {
   329  		err = errnoErr(e1)
   330  	}
   331  	return
   332  }
   333  
   334  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   335  
   336  func Chflags(path string, flags int) (err error) {
   337  	var _p0 *byte
   338  	_p0, err = BytePtrFromString(path)
   339  	if err != nil {
   340  		return
   341  	}
   342  	_, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
   343  	if e1 != 0 {
   344  		err = errnoErr(e1)
   345  	}
   346  	return
   347  }
   348  
   349  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   350  
   351  func Chmod(path string, mode uint32) (err error) {
   352  	var _p0 *byte
   353  	_p0, err = BytePtrFromString(path)
   354  	if err != nil {
   355  		return
   356  	}
   357  	_, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
   358  	if e1 != 0 {
   359  		err = errnoErr(e1)
   360  	}
   361  	return
   362  }
   363  
   364  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   365  
   366  func Chown(path string, uid int, gid int) (err error) {
   367  	var _p0 *byte
   368  	_p0, err = BytePtrFromString(path)
   369  	if err != nil {
   370  		return
   371  	}
   372  	_, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
   373  	if e1 != 0 {
   374  		err = errnoErr(e1)
   375  	}
   376  	return
   377  }
   378  
   379  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   380  
   381  func Chroot(path string) (err error) {
   382  	var _p0 *byte
   383  	_p0, err = BytePtrFromString(path)
   384  	if err != nil {
   385  		return
   386  	}
   387  	_, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
   388  	if e1 != 0 {
   389  		err = errnoErr(e1)
   390  	}
   391  	return
   392  }
   393  
   394  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   395  
   396  func Close(fd int) (err error) {
   397  	_, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
   398  	if e1 != 0 {
   399  		err = errnoErr(e1)
   400  	}
   401  	return
   402  }
   403  
   404  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   405  
   406  func Dup(fd int) (nfd int, err error) {
   407  	r0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0)
   408  	nfd = 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 Dup2(from int, to int) (err error) {
   418  	_, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0)
   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 Exchangedata(path1 string, path2 string, options int) (err error) {
   428  	var _p0 *byte
   429  	_p0, err = BytePtrFromString(path1)
   430  	if err != nil {
   431  		return
   432  	}
   433  	var _p1 *byte
   434  	_p1, err = BytePtrFromString(path2)
   435  	if err != nil {
   436  		return
   437  	}
   438  	_, _, e1 := Syscall(SYS_EXCHANGEDATA, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(options))
   439  	if e1 != 0 {
   440  		err = errnoErr(e1)
   441  	}
   442  	return
   443  }
   444  
   445  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   446  
   447  func Fchdir(fd int) (err error) {
   448  	_, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
   449  	if e1 != 0 {
   450  		err = errnoErr(e1)
   451  	}
   452  	return
   453  }
   454  
   455  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   456  
   457  func Fchflags(fd int, flags int) (err error) {
   458  	_, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0)
   459  	if e1 != 0 {
   460  		err = errnoErr(e1)
   461  	}
   462  	return
   463  }
   464  
   465  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   466  
   467  func Fchmod(fd int, mode uint32) (err error) {
   468  	_, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
   469  	if e1 != 0 {
   470  		err = errnoErr(e1)
   471  	}
   472  	return
   473  }
   474  
   475  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   476  
   477  func Fchown(fd int, uid int, gid int) (err error) {
   478  	_, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
   479  	if e1 != 0 {
   480  		err = errnoErr(e1)
   481  	}
   482  	return
   483  }
   484  
   485  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   486  
   487  func Flock(fd int, how int) (err error) {
   488  	_, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 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 Fpathconf(fd int, name int) (val int, err error) {
   498  	r0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0)
   499  	val = int(r0)
   500  	if e1 != 0 {
   501  		err = errnoErr(e1)
   502  	}
   503  	return
   504  }
   505  
   506  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   507  
   508  func Fstat(fd int, stat *Stat_t) (err error) {
   509  	_, _, e1 := Syscall(SYS_FSTAT64, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
   510  	if e1 != 0 {
   511  		err = errnoErr(e1)
   512  	}
   513  	return
   514  }
   515  
   516  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   517  
   518  func Fstatfs(fd int, stat *Statfs_t) (err error) {
   519  	_, _, e1 := Syscall(SYS_FSTATFS64, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
   520  	if e1 != 0 {
   521  		err = errnoErr(e1)
   522  	}
   523  	return
   524  }
   525  
   526  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   527  
   528  func Fsync(fd int) (err error) {
   529  	_, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
   530  	if e1 != 0 {
   531  		err = errnoErr(e1)
   532  	}
   533  	return
   534  }
   535  
   536  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   537  
   538  func Ftruncate(fd int, length int64) (err error) {
   539  	_, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), 0)
   540  	if e1 != 0 {
   541  		err = errnoErr(e1)
   542  	}
   543  	return
   544  }
   545  
   546  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   547  
   548  func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
   549  	var _p0 unsafe.Pointer
   550  	if len(buf) > 0 {
   551  		_p0 = unsafe.Pointer(&buf[0])
   552  	} else {
   553  		_p0 = unsafe.Pointer(&_zero)
   554  	}
   555  	r0, _, e1 := Syscall6(SYS_GETDIRENTRIES64, uintptr(fd), uintptr(_p0), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0)
   556  	n = int(r0)
   557  	if e1 != 0 {
   558  		err = errnoErr(e1)
   559  	}
   560  	return
   561  }
   562  
   563  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   564  
   565  func Getdtablesize() (size int) {
   566  	r0, _, _ := Syscall(SYS_GETDTABLESIZE, 0, 0, 0)
   567  	size = int(r0)
   568  	return
   569  }
   570  
   571  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   572  
   573  func Getegid() (egid int) {
   574  	r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0)
   575  	egid = int(r0)
   576  	return
   577  }
   578  
   579  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   580  
   581  func Geteuid() (uid int) {
   582  	r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0)
   583  	uid = int(r0)
   584  	return
   585  }
   586  
   587  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   588  
   589  func Getgid() (gid int) {
   590  	r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0)
   591  	gid = int(r0)
   592  	return
   593  }
   594  
   595  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   596  
   597  func Getpgid(pid int) (pgid int, err error) {
   598  	r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
   599  	pgid = int(r0)
   600  	if e1 != 0 {
   601  		err = errnoErr(e1)
   602  	}
   603  	return
   604  }
   605  
   606  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   607  
   608  func Getpgrp() (pgrp int) {
   609  	r0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0)
   610  	pgrp = int(r0)
   611  	return
   612  }
   613  
   614  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   615  
   616  func Getpid() (pid int) {
   617  	r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)
   618  	pid = int(r0)
   619  	return
   620  }
   621  
   622  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   623  
   624  func Getppid() (ppid int) {
   625  	r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)
   626  	ppid = int(r0)
   627  	return
   628  }
   629  
   630  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   631  
   632  func Getpriority(which int, who int) (prio int, err error) {
   633  	r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
   634  	prio = int(r0)
   635  	if e1 != 0 {
   636  		err = errnoErr(e1)
   637  	}
   638  	return
   639  }
   640  
   641  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   642  
   643  func Getrlimit(which int, lim *Rlimit) (err error) {
   644  	_, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
   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 Getrusage(who int, rusage *Rusage) (err error) {
   654  	_, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
   655  	if e1 != 0 {
   656  		err = errnoErr(e1)
   657  	}
   658  	return
   659  }
   660  
   661  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   662  
   663  func Getsid(pid int) (sid int, err error) {
   664  	r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
   665  	sid = 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 Getuid() (uid int) {
   675  	r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
   676  	uid = int(r0)
   677  	return
   678  }
   679  
   680  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   681  
   682  func Issetugid() (tainted bool) {
   683  	r0, _, _ := RawSyscall(SYS_ISSETUGID, 0, 0, 0)
   684  	tainted = bool(r0 != 0)
   685  	return
   686  }
   687  
   688  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   689  
   690  func Kqueue() (fd int, err error) {
   691  	r0, _, e1 := Syscall(SYS_KQUEUE, 0, 0, 0)
   692  	fd = int(r0)
   693  	if e1 != 0 {
   694  		err = errnoErr(e1)
   695  	}
   696  	return
   697  }
   698  
   699  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   700  
   701  func Lchown(path string, uid int, gid int) (err error) {
   702  	var _p0 *byte
   703  	_p0, err = BytePtrFromString(path)
   704  	if err != nil {
   705  		return
   706  	}
   707  	_, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
   708  	if e1 != 0 {
   709  		err = errnoErr(e1)
   710  	}
   711  	return
   712  }
   713  
   714  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   715  
   716  func Link(path string, link string) (err error) {
   717  	var _p0 *byte
   718  	_p0, err = BytePtrFromString(path)
   719  	if err != nil {
   720  		return
   721  	}
   722  	var _p1 *byte
   723  	_p1, err = BytePtrFromString(link)
   724  	if err != nil {
   725  		return
   726  	}
   727  	_, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
   728  	if e1 != 0 {
   729  		err = errnoErr(e1)
   730  	}
   731  	return
   732  }
   733  
   734  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   735  
   736  func Listen(s int, backlog int) (err error) {
   737  	_, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0)
   738  	if e1 != 0 {
   739  		err = errnoErr(e1)
   740  	}
   741  	return
   742  }
   743  
   744  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   745  
   746  func Lstat(path string, stat *Stat_t) (err error) {
   747  	var _p0 *byte
   748  	_p0, err = BytePtrFromString(path)
   749  	if err != nil {
   750  		return
   751  	}
   752  	_, _, e1 := Syscall(SYS_LSTAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
   753  	if e1 != 0 {
   754  		err = errnoErr(e1)
   755  	}
   756  	return
   757  }
   758  
   759  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   760  
   761  func Mkdir(path string, mode uint32) (err error) {
   762  	var _p0 *byte
   763  	_p0, err = BytePtrFromString(path)
   764  	if err != nil {
   765  		return
   766  	}
   767  	_, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
   768  	if e1 != 0 {
   769  		err = errnoErr(e1)
   770  	}
   771  	return
   772  }
   773  
   774  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   775  
   776  func Mkfifo(path string, mode uint32) (err error) {
   777  	var _p0 *byte
   778  	_p0, err = BytePtrFromString(path)
   779  	if err != nil {
   780  		return
   781  	}
   782  	_, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
   783  	if e1 != 0 {
   784  		err = errnoErr(e1)
   785  	}
   786  	return
   787  }
   788  
   789  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   790  
   791  func Mknod(path string, mode uint32, dev int) (err error) {
   792  	var _p0 *byte
   793  	_p0, err = BytePtrFromString(path)
   794  	if err != nil {
   795  		return
   796  	}
   797  	_, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
   798  	if e1 != 0 {
   799  		err = errnoErr(e1)
   800  	}
   801  	return
   802  }
   803  
   804  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   805  
   806  func Mlock(b []byte) (err error) {
   807  	var _p0 unsafe.Pointer
   808  	if len(b) > 0 {
   809  		_p0 = unsafe.Pointer(&b[0])
   810  	} else {
   811  		_p0 = unsafe.Pointer(&_zero)
   812  	}
   813  	_, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
   814  	if e1 != 0 {
   815  		err = errnoErr(e1)
   816  	}
   817  	return
   818  }
   819  
   820  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   821  
   822  func Mlockall(flags int) (err error) {
   823  	_, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
   824  	if e1 != 0 {
   825  		err = errnoErr(e1)
   826  	}
   827  	return
   828  }
   829  
   830  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   831  
   832  func Mprotect(b []byte, prot int) (err error) {
   833  	var _p0 unsafe.Pointer
   834  	if len(b) > 0 {
   835  		_p0 = unsafe.Pointer(&b[0])
   836  	} else {
   837  		_p0 = unsafe.Pointer(&_zero)
   838  	}
   839  	_, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
   840  	if e1 != 0 {
   841  		err = errnoErr(e1)
   842  	}
   843  	return
   844  }
   845  
   846  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   847  
   848  func Munlock(b []byte) (err error) {
   849  	var _p0 unsafe.Pointer
   850  	if len(b) > 0 {
   851  		_p0 = unsafe.Pointer(&b[0])
   852  	} else {
   853  		_p0 = unsafe.Pointer(&_zero)
   854  	}
   855  	_, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 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 Munlockall() (err error) {
   865  	_, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
   866  	if e1 != 0 {
   867  		err = errnoErr(e1)
   868  	}
   869  	return
   870  }
   871  
   872  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   873  
   874  func Open(path string, mode int, perm uint32) (fd int, err error) {
   875  	var _p0 *byte
   876  	_p0, err = BytePtrFromString(path)
   877  	if err != nil {
   878  		return
   879  	}
   880  	r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
   881  	fd = int(r0)
   882  	if e1 != 0 {
   883  		err = errnoErr(e1)
   884  	}
   885  	return
   886  }
   887  
   888  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   889  
   890  func Pathconf(path string, name int) (val int, err error) {
   891  	var _p0 *byte
   892  	_p0, err = BytePtrFromString(path)
   893  	if err != nil {
   894  		return
   895  	}
   896  	r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)
   897  	val = int(r0)
   898  	if e1 != 0 {
   899  		err = errnoErr(e1)
   900  	}
   901  	return
   902  }
   903  
   904  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   905  
   906  func Pread(fd int, p []byte, offset int64) (n int, err error) {
   907  	var _p0 unsafe.Pointer
   908  	if len(p) > 0 {
   909  		_p0 = unsafe.Pointer(&p[0])
   910  	} else {
   911  		_p0 = unsafe.Pointer(&_zero)
   912  	}
   913  	r0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
   914  	n = int(r0)
   915  	if e1 != 0 {
   916  		err = errnoErr(e1)
   917  	}
   918  	return
   919  }
   920  
   921  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   922  
   923  func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
   924  	var _p0 unsafe.Pointer
   925  	if len(p) > 0 {
   926  		_p0 = unsafe.Pointer(&p[0])
   927  	} else {
   928  		_p0 = unsafe.Pointer(&_zero)
   929  	}
   930  	r0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
   931  	n = int(r0)
   932  	if e1 != 0 {
   933  		err = errnoErr(e1)
   934  	}
   935  	return
   936  }
   937  
   938  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   939  
   940  func read(fd int, p []byte) (n int, err error) {
   941  	var _p0 unsafe.Pointer
   942  	if len(p) > 0 {
   943  		_p0 = unsafe.Pointer(&p[0])
   944  	} else {
   945  		_p0 = unsafe.Pointer(&_zero)
   946  	}
   947  	r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
   948  	n = int(r0)
   949  	if e1 != 0 {
   950  		err = errnoErr(e1)
   951  	}
   952  	return
   953  }
   954  
   955  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   956  
   957  func Readlink(path string, buf []byte) (n int, err error) {
   958  	var _p0 *byte
   959  	_p0, err = BytePtrFromString(path)
   960  	if err != nil {
   961  		return
   962  	}
   963  	var _p1 unsafe.Pointer
   964  	if len(buf) > 0 {
   965  		_p1 = unsafe.Pointer(&buf[0])
   966  	} else {
   967  		_p1 = unsafe.Pointer(&_zero)
   968  	}
   969  	r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))
   970  	n = int(r0)
   971  	if e1 != 0 {
   972  		err = errnoErr(e1)
   973  	}
   974  	return
   975  }
   976  
   977  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   978  
   979  func Rename(from string, to string) (err error) {
   980  	var _p0 *byte
   981  	_p0, err = BytePtrFromString(from)
   982  	if err != nil {
   983  		return
   984  	}
   985  	var _p1 *byte
   986  	_p1, err = BytePtrFromString(to)
   987  	if err != nil {
   988  		return
   989  	}
   990  	_, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
   991  	if e1 != 0 {
   992  		err = errnoErr(e1)
   993  	}
   994  	return
   995  }
   996  
   997  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   998  
   999  func Revoke(path string) (err error) {
  1000  	var _p0 *byte
  1001  	_p0, err = BytePtrFromString(path)
  1002  	if err != nil {
  1003  		return
  1004  	}
  1005  	_, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0)
  1006  	if e1 != 0 {
  1007  		err = errnoErr(e1)
  1008  	}
  1009  	return
  1010  }
  1011  
  1012  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1013  
  1014  func Rmdir(path string) (err error) {
  1015  	var _p0 *byte
  1016  	_p0, err = BytePtrFromString(path)
  1017  	if err != nil {
  1018  		return
  1019  	}
  1020  	_, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
  1021  	if e1 != 0 {
  1022  		err = errnoErr(e1)
  1023  	}
  1024  	return
  1025  }
  1026  
  1027  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1028  
  1029  func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
  1030  	r0, _, e1 := Syscall(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence))
  1031  	newoffset = int64(r0)
  1032  	if e1 != 0 {
  1033  		err = errnoErr(e1)
  1034  	}
  1035  	return
  1036  }
  1037  
  1038  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1039  
  1040  func Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) {
  1041  	_, _, e1 := Syscall6(SYS_SELECT, uintptr(n), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
  1042  	if e1 != 0 {
  1043  		err = errnoErr(e1)
  1044  	}
  1045  	return
  1046  }
  1047  
  1048  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1049  
  1050  func Setegid(egid int) (err error) {
  1051  	_, _, e1 := Syscall(SYS_SETEGID, uintptr(egid), 0, 0)
  1052  	if e1 != 0 {
  1053  		err = errnoErr(e1)
  1054  	}
  1055  	return
  1056  }
  1057  
  1058  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1059  
  1060  func Seteuid(euid int) (err error) {
  1061  	_, _, e1 := RawSyscall(SYS_SETEUID, uintptr(euid), 0, 0)
  1062  	if e1 != 0 {
  1063  		err = errnoErr(e1)
  1064  	}
  1065  	return
  1066  }
  1067  
  1068  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1069  
  1070  func Setgid(gid int) (err error) {
  1071  	_, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 0, 0)
  1072  	if e1 != 0 {
  1073  		err = errnoErr(e1)
  1074  	}
  1075  	return
  1076  }
  1077  
  1078  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1079  
  1080  func Setlogin(name string) (err error) {
  1081  	var _p0 *byte
  1082  	_p0, err = BytePtrFromString(name)
  1083  	if err != nil {
  1084  		return
  1085  	}
  1086  	_, _, e1 := Syscall(SYS_SETLOGIN, uintptr(unsafe.Pointer(_p0)), 0, 0)
  1087  	if e1 != 0 {
  1088  		err = errnoErr(e1)
  1089  	}
  1090  	return
  1091  }
  1092  
  1093  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1094  
  1095  func Setpgid(pid int, pgid int) (err error) {
  1096  	_, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
  1097  	if e1 != 0 {
  1098  		err = errnoErr(e1)
  1099  	}
  1100  	return
  1101  }
  1102  
  1103  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1104  
  1105  func Setpriority(which int, who int, prio int) (err error) {
  1106  	_, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
  1107  	if e1 != 0 {
  1108  		err = errnoErr(e1)
  1109  	}
  1110  	return
  1111  }
  1112  
  1113  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1114  
  1115  func Setprivexec(flag int) (err error) {
  1116  	_, _, e1 := Syscall(SYS_SETPRIVEXEC, uintptr(flag), 0, 0)
  1117  	if e1 != 0 {
  1118  		err = errnoErr(e1)
  1119  	}
  1120  	return
  1121  }
  1122  
  1123  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1124  
  1125  func Setregid(rgid int, egid int) (err error) {
  1126  	_, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
  1127  	if e1 != 0 {
  1128  		err = errnoErr(e1)
  1129  	}
  1130  	return
  1131  }
  1132  
  1133  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1134  
  1135  func Setreuid(ruid int, euid int) (err error) {
  1136  	_, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
  1137  	if e1 != 0 {
  1138  		err = errnoErr(e1)
  1139  	}
  1140  	return
  1141  }
  1142  
  1143  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1144  
  1145  func Setrlimit(which int, lim *Rlimit) (err error) {
  1146  	_, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
  1147  	if e1 != 0 {
  1148  		err = errnoErr(e1)
  1149  	}
  1150  	return
  1151  }
  1152  
  1153  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1154  
  1155  func Setsid() (pid int, err error) {
  1156  	r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
  1157  	pid = int(r0)
  1158  	if e1 != 0 {
  1159  		err = errnoErr(e1)
  1160  	}
  1161  	return
  1162  }
  1163  
  1164  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1165  
  1166  func Settimeofday(tp *Timeval) (err error) {
  1167  	_, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
  1168  	if e1 != 0 {
  1169  		err = errnoErr(e1)
  1170  	}
  1171  	return
  1172  }
  1173  
  1174  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1175  
  1176  func Setuid(uid int) (err error) {
  1177  	_, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0)
  1178  	if e1 != 0 {
  1179  		err = errnoErr(e1)
  1180  	}
  1181  	return
  1182  }
  1183  
  1184  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1185  
  1186  func Stat(path string, stat *Stat_t) (err error) {
  1187  	var _p0 *byte
  1188  	_p0, err = BytePtrFromString(path)
  1189  	if err != nil {
  1190  		return
  1191  	}
  1192  	_, _, e1 := Syscall(SYS_STAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
  1193  	if e1 != 0 {
  1194  		err = errnoErr(e1)
  1195  	}
  1196  	return
  1197  }
  1198  
  1199  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1200  
  1201  func Statfs(path string, stat *Statfs_t) (err error) {
  1202  	var _p0 *byte
  1203  	_p0, err = BytePtrFromString(path)
  1204  	if err != nil {
  1205  		return
  1206  	}
  1207  	_, _, e1 := Syscall(SYS_STATFS64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
  1208  	if e1 != 0 {
  1209  		err = errnoErr(e1)
  1210  	}
  1211  	return
  1212  }
  1213  
  1214  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1215  
  1216  func Symlink(path string, link string) (err error) {
  1217  	var _p0 *byte
  1218  	_p0, err = BytePtrFromString(path)
  1219  	if err != nil {
  1220  		return
  1221  	}
  1222  	var _p1 *byte
  1223  	_p1, err = BytePtrFromString(link)
  1224  	if err != nil {
  1225  		return
  1226  	}
  1227  	_, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
  1228  	if e1 != 0 {
  1229  		err = errnoErr(e1)
  1230  	}
  1231  	return
  1232  }
  1233  
  1234  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1235  
  1236  func Sync() (err error) {
  1237  	_, _, e1 := Syscall(SYS_SYNC, 0, 0, 0)
  1238  	if e1 != 0 {
  1239  		err = errnoErr(e1)
  1240  	}
  1241  	return
  1242  }
  1243  
  1244  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1245  
  1246  func Truncate(path string, length int64) (err error) {
  1247  	var _p0 *byte
  1248  	_p0, err = BytePtrFromString(path)
  1249  	if err != nil {
  1250  		return
  1251  	}
  1252  	_, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0)
  1253  	if e1 != 0 {
  1254  		err = errnoErr(e1)
  1255  	}
  1256  	return
  1257  }
  1258  
  1259  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1260  
  1261  func Umask(newmask int) (oldmask int) {
  1262  	r0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0)
  1263  	oldmask = int(r0)
  1264  	return
  1265  }
  1266  
  1267  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1268  
  1269  func Undelete(path string) (err error) {
  1270  	var _p0 *byte
  1271  	_p0, err = BytePtrFromString(path)
  1272  	if err != nil {
  1273  		return
  1274  	}
  1275  	_, _, e1 := Syscall(SYS_UNDELETE, uintptr(unsafe.Pointer(_p0)), 0, 0)
  1276  	if e1 != 0 {
  1277  		err = errnoErr(e1)
  1278  	}
  1279  	return
  1280  }
  1281  
  1282  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1283  
  1284  func Unlink(path string) (err error) {
  1285  	var _p0 *byte
  1286  	_p0, err = BytePtrFromString(path)
  1287  	if err != nil {
  1288  		return
  1289  	}
  1290  	_, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0)
  1291  	if e1 != 0 {
  1292  		err = errnoErr(e1)
  1293  	}
  1294  	return
  1295  }
  1296  
  1297  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1298  
  1299  func Unmount(path string, flags int) (err error) {
  1300  	var _p0 *byte
  1301  	_p0, err = BytePtrFromString(path)
  1302  	if err != nil {
  1303  		return
  1304  	}
  1305  	_, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
  1306  	if e1 != 0 {
  1307  		err = errnoErr(e1)
  1308  	}
  1309  	return
  1310  }
  1311  
  1312  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1313  
  1314  func write(fd int, p []byte) (n int, err error) {
  1315  	var _p0 unsafe.Pointer
  1316  	if len(p) > 0 {
  1317  		_p0 = unsafe.Pointer(&p[0])
  1318  	} else {
  1319  		_p0 = unsafe.Pointer(&_zero)
  1320  	}
  1321  	r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
  1322  	n = int(r0)
  1323  	if e1 != 0 {
  1324  		err = errnoErr(e1)
  1325  	}
  1326  	return
  1327  }
  1328  
  1329  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1330  
  1331  func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {
  1332  	r0, _, e1 := Syscall6(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos))
  1333  	ret = uintptr(r0)
  1334  	if e1 != 0 {
  1335  		err = errnoErr(e1)
  1336  	}
  1337  	return
  1338  }
  1339  
  1340  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1341  
  1342  func munmap(addr uintptr, length uintptr) (err error) {
  1343  	_, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
  1344  	if e1 != 0 {
  1345  		err = errnoErr(e1)
  1346  	}
  1347  	return
  1348  }
  1349  
  1350  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1351  
  1352  func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
  1353  	r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
  1354  	n = int(r0)
  1355  	if e1 != 0 {
  1356  		err = errnoErr(e1)
  1357  	}
  1358  	return
  1359  }
  1360  
  1361  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1362  
  1363  func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
  1364  	r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
  1365  	n = int(r0)
  1366  	if e1 != 0 {
  1367  		err = errnoErr(e1)
  1368  	}
  1369  	return
  1370  }
  1371  
  1372  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1373  
  1374  func gettimeofday(tp *Timeval) (sec int64, usec int32, err error) {
  1375  	r0, r1, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
  1376  	sec = int64(r0)
  1377  	usec = int32(r1)
  1378  	if e1 != 0 {
  1379  		err = errnoErr(e1)
  1380  	}
  1381  	return
  1382  }
  1383  

View as plain text