github.com/likebike/go--@v0.0.0-20190911215757-0bd925d16e96/go/src/syscall/zsyscall_openbsd_arm.go (about)

     1  // mksyscall.pl -l32 -openbsd -arm -tags openbsd,arm syscall_bsd.go syscall_openbsd.go syscall_openbsd_arm.go
     2  // MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
     3  
     4  // +build openbsd,arm
     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(p *[2]_C_int) (err error) {
   265  	_, _, e1 := RawSyscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 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 getdents(fd int, buf []byte) (n int, err error) {
   275  	var _p0 unsafe.Pointer
   276  	if len(buf) > 0 {
   277  		_p0 = unsafe.Pointer(&buf[0])
   278  	} else {
   279  		_p0 = unsafe.Pointer(&_zero)
   280  	}
   281  	r0, _, e1 := Syscall(SYS_GETDENTS, uintptr(fd), uintptr(_p0), uintptr(len(buf)))
   282  	n = int(r0)
   283  	if e1 != 0 {
   284  		err = errnoErr(e1)
   285  	}
   286  	return
   287  }
   288  
   289  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   290  
   291  func Access(path string, mode uint32) (err error) {
   292  	var _p0 *byte
   293  	_p0, err = BytePtrFromString(path)
   294  	if err != nil {
   295  		return
   296  	}
   297  	_, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
   298  	if e1 != 0 {
   299  		err = errnoErr(e1)
   300  	}
   301  	return
   302  }
   303  
   304  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   305  
   306  func Adjtime(delta *Timeval, olddelta *Timeval) (err error) {
   307  	_, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0)
   308  	if e1 != 0 {
   309  		err = errnoErr(e1)
   310  	}
   311  	return
   312  }
   313  
   314  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   315  
   316  func Chdir(path string) (err error) {
   317  	var _p0 *byte
   318  	_p0, err = BytePtrFromString(path)
   319  	if err != nil {
   320  		return
   321  	}
   322  	_, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
   323  	if e1 != 0 {
   324  		err = errnoErr(e1)
   325  	}
   326  	return
   327  }
   328  
   329  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   330  
   331  func Chflags(path string, flags int) (err error) {
   332  	var _p0 *byte
   333  	_p0, err = BytePtrFromString(path)
   334  	if err != nil {
   335  		return
   336  	}
   337  	_, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
   338  	if e1 != 0 {
   339  		err = errnoErr(e1)
   340  	}
   341  	return
   342  }
   343  
   344  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   345  
   346  func Chmod(path string, mode uint32) (err error) {
   347  	var _p0 *byte
   348  	_p0, err = BytePtrFromString(path)
   349  	if err != nil {
   350  		return
   351  	}
   352  	_, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
   353  	if e1 != 0 {
   354  		err = errnoErr(e1)
   355  	}
   356  	return
   357  }
   358  
   359  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   360  
   361  func Chown(path string, uid int, gid int) (err error) {
   362  	var _p0 *byte
   363  	_p0, err = BytePtrFromString(path)
   364  	if err != nil {
   365  		return
   366  	}
   367  	_, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
   368  	if e1 != 0 {
   369  		err = errnoErr(e1)
   370  	}
   371  	return
   372  }
   373  
   374  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   375  
   376  func Chroot(path string) (err error) {
   377  	var _p0 *byte
   378  	_p0, err = BytePtrFromString(path)
   379  	if err != nil {
   380  		return
   381  	}
   382  	_, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
   383  	if e1 != 0 {
   384  		err = errnoErr(e1)
   385  	}
   386  	return
   387  }
   388  
   389  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   390  
   391  func Close(fd int) (err error) {
   392  	_, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
   393  	if e1 != 0 {
   394  		err = errnoErr(e1)
   395  	}
   396  	return
   397  }
   398  
   399  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   400  
   401  func Dup(fd int) (nfd int, err error) {
   402  	r0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0)
   403  	nfd = int(r0)
   404  	if e1 != 0 {
   405  		err = errnoErr(e1)
   406  	}
   407  	return
   408  }
   409  
   410  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   411  
   412  func Dup2(from int, to int) (err error) {
   413  	_, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0)
   414  	if e1 != 0 {
   415  		err = errnoErr(e1)
   416  	}
   417  	return
   418  }
   419  
   420  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   421  
   422  func Fchdir(fd int) (err error) {
   423  	_, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
   424  	if e1 != 0 {
   425  		err = errnoErr(e1)
   426  	}
   427  	return
   428  }
   429  
   430  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   431  
   432  func Fchflags(fd int, flags int) (err error) {
   433  	_, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 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 Fchmod(fd int, mode uint32) (err error) {
   443  	_, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 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 Fchown(fd int, uid int, gid int) (err error) {
   453  	_, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
   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 Flock(fd int, how int) (err error) {
   463  	_, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
   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 Fpathconf(fd int, name int) (val int, err error) {
   473  	r0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0)
   474  	val = int(r0)
   475  	if e1 != 0 {
   476  		err = errnoErr(e1)
   477  	}
   478  	return
   479  }
   480  
   481  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   482  
   483  func Fstat(fd int, stat *Stat_t) (err error) {
   484  	_, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
   485  	if e1 != 0 {
   486  		err = errnoErr(e1)
   487  	}
   488  	return
   489  }
   490  
   491  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   492  
   493  func Fstatfs(fd int, stat *Statfs_t) (err error) {
   494  	_, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
   495  	if e1 != 0 {
   496  		err = errnoErr(e1)
   497  	}
   498  	return
   499  }
   500  
   501  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   502  
   503  func Fsync(fd int) (err error) {
   504  	_, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
   505  	if e1 != 0 {
   506  		err = errnoErr(e1)
   507  	}
   508  	return
   509  }
   510  
   511  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   512  
   513  func Ftruncate(fd int, length int64) (err error) {
   514  	_, _, e1 := Syscall6(SYS_FTRUNCATE, uintptr(fd), 0, uintptr(length), uintptr(length>>32), 0, 0)
   515  	if e1 != 0 {
   516  		err = errnoErr(e1)
   517  	}
   518  	return
   519  }
   520  
   521  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   522  
   523  func Getegid() (egid int) {
   524  	r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0)
   525  	egid = int(r0)
   526  	return
   527  }
   528  
   529  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   530  
   531  func Geteuid() (uid int) {
   532  	r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0)
   533  	uid = int(r0)
   534  	return
   535  }
   536  
   537  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   538  
   539  func Getgid() (gid int) {
   540  	r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0)
   541  	gid = int(r0)
   542  	return
   543  }
   544  
   545  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   546  
   547  func Getpgid(pid int) (pgid int, err error) {
   548  	r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
   549  	pgid = int(r0)
   550  	if e1 != 0 {
   551  		err = errnoErr(e1)
   552  	}
   553  	return
   554  }
   555  
   556  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   557  
   558  func Getpgrp() (pgrp int) {
   559  	r0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0)
   560  	pgrp = int(r0)
   561  	return
   562  }
   563  
   564  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   565  
   566  func Getpid() (pid int) {
   567  	r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)
   568  	pid = int(r0)
   569  	return
   570  }
   571  
   572  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   573  
   574  func Getppid() (ppid int) {
   575  	r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)
   576  	ppid = int(r0)
   577  	return
   578  }
   579  
   580  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   581  
   582  func Getpriority(which int, who int) (prio int, err error) {
   583  	r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
   584  	prio = int(r0)
   585  	if e1 != 0 {
   586  		err = errnoErr(e1)
   587  	}
   588  	return
   589  }
   590  
   591  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   592  
   593  func Getrlimit(which int, lim *Rlimit) (err error) {
   594  	_, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
   595  	if e1 != 0 {
   596  		err = errnoErr(e1)
   597  	}
   598  	return
   599  }
   600  
   601  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   602  
   603  func Getrusage(who int, rusage *Rusage) (err error) {
   604  	_, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
   605  	if e1 != 0 {
   606  		err = errnoErr(e1)
   607  	}
   608  	return
   609  }
   610  
   611  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   612  
   613  func Getsid(pid int) (sid int, err error) {
   614  	r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
   615  	sid = int(r0)
   616  	if e1 != 0 {
   617  		err = errnoErr(e1)
   618  	}
   619  	return
   620  }
   621  
   622  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   623  
   624  func Gettimeofday(tv *Timeval) (err error) {
   625  	_, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
   626  	if e1 != 0 {
   627  		err = errnoErr(e1)
   628  	}
   629  	return
   630  }
   631  
   632  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   633  
   634  func Getuid() (uid int) {
   635  	r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
   636  	uid = int(r0)
   637  	return
   638  }
   639  
   640  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   641  
   642  func Issetugid() (tainted bool) {
   643  	r0, _, _ := Syscall(SYS_ISSETUGID, 0, 0, 0)
   644  	tainted = bool(r0 != 0)
   645  	return
   646  }
   647  
   648  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   649  
   650  func Kill(pid int, signum Signal) (err error) {
   651  	_, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), 0)
   652  	if e1 != 0 {
   653  		err = errnoErr(e1)
   654  	}
   655  	return
   656  }
   657  
   658  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   659  
   660  func Kqueue() (fd int, err error) {
   661  	r0, _, e1 := Syscall(SYS_KQUEUE, 0, 0, 0)
   662  	fd = int(r0)
   663  	if e1 != 0 {
   664  		err = errnoErr(e1)
   665  	}
   666  	return
   667  }
   668  
   669  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   670  
   671  func Lchown(path string, uid int, gid int) (err error) {
   672  	var _p0 *byte
   673  	_p0, err = BytePtrFromString(path)
   674  	if err != nil {
   675  		return
   676  	}
   677  	_, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
   678  	if e1 != 0 {
   679  		err = errnoErr(e1)
   680  	}
   681  	return
   682  }
   683  
   684  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   685  
   686  func Link(path string, link string) (err error) {
   687  	var _p0 *byte
   688  	_p0, err = BytePtrFromString(path)
   689  	if err != nil {
   690  		return
   691  	}
   692  	var _p1 *byte
   693  	_p1, err = BytePtrFromString(link)
   694  	if err != nil {
   695  		return
   696  	}
   697  	_, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
   698  	if e1 != 0 {
   699  		err = errnoErr(e1)
   700  	}
   701  	return
   702  }
   703  
   704  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   705  
   706  func Listen(s int, backlog int) (err error) {
   707  	_, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0)
   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 Lstat(path string, stat *Stat_t) (err error) {
   717  	var _p0 *byte
   718  	_p0, err = BytePtrFromString(path)
   719  	if err != nil {
   720  		return
   721  	}
   722  	_, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
   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 Mkdir(path string, mode uint32) (err error) {
   732  	var _p0 *byte
   733  	_p0, err = BytePtrFromString(path)
   734  	if err != nil {
   735  		return
   736  	}
   737  	_, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 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 Mkfifo(path string, mode uint32) (err error) {
   747  	var _p0 *byte
   748  	_p0, err = BytePtrFromString(path)
   749  	if err != nil {
   750  		return
   751  	}
   752  	_, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 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 Mknod(path string, mode uint32, dev int) (err error) {
   762  	var _p0 *byte
   763  	_p0, err = BytePtrFromString(path)
   764  	if err != nil {
   765  		return
   766  	}
   767  	_, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
   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 Nanosleep(time *Timespec, leftover *Timespec) (err error) {
   777  	_, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
   778  	if e1 != 0 {
   779  		err = errnoErr(e1)
   780  	}
   781  	return
   782  }
   783  
   784  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   785  
   786  func Open(path string, mode int, perm uint32) (fd int, err error) {
   787  	var _p0 *byte
   788  	_p0, err = BytePtrFromString(path)
   789  	if err != nil {
   790  		return
   791  	}
   792  	r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
   793  	fd = int(r0)
   794  	if e1 != 0 {
   795  		err = errnoErr(e1)
   796  	}
   797  	return
   798  }
   799  
   800  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   801  
   802  func Pathconf(path string, name int) (val int, err error) {
   803  	var _p0 *byte
   804  	_p0, err = BytePtrFromString(path)
   805  	if err != nil {
   806  		return
   807  	}
   808  	r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)
   809  	val = int(r0)
   810  	if e1 != 0 {
   811  		err = errnoErr(e1)
   812  	}
   813  	return
   814  }
   815  
   816  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   817  
   818  func Pread(fd int, p []byte, offset int64) (n int, err error) {
   819  	var _p0 unsafe.Pointer
   820  	if len(p) > 0 {
   821  		_p0 = unsafe.Pointer(&p[0])
   822  	} else {
   823  		_p0 = unsafe.Pointer(&_zero)
   824  	}
   825  	r0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), uintptr(offset>>32))
   826  	n = int(r0)
   827  	if e1 != 0 {
   828  		err = errnoErr(e1)
   829  	}
   830  	return
   831  }
   832  
   833  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   834  
   835  func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
   836  	var _p0 unsafe.Pointer
   837  	if len(p) > 0 {
   838  		_p0 = unsafe.Pointer(&p[0])
   839  	} else {
   840  		_p0 = unsafe.Pointer(&_zero)
   841  	}
   842  	r0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), uintptr(offset>>32))
   843  	n = int(r0)
   844  	if e1 != 0 {
   845  		err = errnoErr(e1)
   846  	}
   847  	return
   848  }
   849  
   850  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   851  
   852  func read(fd int, p []byte) (n int, err error) {
   853  	var _p0 unsafe.Pointer
   854  	if len(p) > 0 {
   855  		_p0 = unsafe.Pointer(&p[0])
   856  	} else {
   857  		_p0 = unsafe.Pointer(&_zero)
   858  	}
   859  	r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
   860  	n = int(r0)
   861  	if e1 != 0 {
   862  		err = errnoErr(e1)
   863  	}
   864  	return
   865  }
   866  
   867  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   868  
   869  func Readlink(path string, buf []byte) (n int, err error) {
   870  	var _p0 *byte
   871  	_p0, err = BytePtrFromString(path)
   872  	if err != nil {
   873  		return
   874  	}
   875  	var _p1 unsafe.Pointer
   876  	if len(buf) > 0 {
   877  		_p1 = unsafe.Pointer(&buf[0])
   878  	} else {
   879  		_p1 = unsafe.Pointer(&_zero)
   880  	}
   881  	r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))
   882  	n = int(r0)
   883  	if e1 != 0 {
   884  		err = errnoErr(e1)
   885  	}
   886  	return
   887  }
   888  
   889  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   890  
   891  func Rename(from string, to string) (err error) {
   892  	var _p0 *byte
   893  	_p0, err = BytePtrFromString(from)
   894  	if err != nil {
   895  		return
   896  	}
   897  	var _p1 *byte
   898  	_p1, err = BytePtrFromString(to)
   899  	if err != nil {
   900  		return
   901  	}
   902  	_, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
   903  	if e1 != 0 {
   904  		err = errnoErr(e1)
   905  	}
   906  	return
   907  }
   908  
   909  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   910  
   911  func Revoke(path string) (err error) {
   912  	var _p0 *byte
   913  	_p0, err = BytePtrFromString(path)
   914  	if err != nil {
   915  		return
   916  	}
   917  	_, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0)
   918  	if e1 != 0 {
   919  		err = errnoErr(e1)
   920  	}
   921  	return
   922  }
   923  
   924  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   925  
   926  func Rmdir(path string) (err error) {
   927  	var _p0 *byte
   928  	_p0, err = BytePtrFromString(path)
   929  	if err != nil {
   930  		return
   931  	}
   932  	_, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
   933  	if e1 != 0 {
   934  		err = errnoErr(e1)
   935  	}
   936  	return
   937  }
   938  
   939  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   940  
   941  func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
   942  	r0, r1, e1 := Syscall6(SYS_LSEEK, uintptr(fd), 0, uintptr(offset), uintptr(offset>>32), uintptr(whence), 0)
   943  	newoffset = int64(int64(r1)<<32 | int64(r0))
   944  	if e1 != 0 {
   945  		err = errnoErr(e1)
   946  	}
   947  	return
   948  }
   949  
   950  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   951  
   952  func Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) {
   953  	_, _, e1 := Syscall6(SYS_SELECT, uintptr(n), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
   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 Setegid(egid int) (err error) {
   963  	_, _, e1 := RawSyscall(SYS_SETEGID, uintptr(egid), 0, 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 Seteuid(euid int) (err error) {
   973  	_, _, e1 := RawSyscall(SYS_SETEUID, uintptr(euid), 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 Setgid(gid int) (err error) {
   983  	_, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 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 Setlogin(name string) (err error) {
   993  	var _p0 *byte
   994  	_p0, err = BytePtrFromString(name)
   995  	if err != nil {
   996  		return
   997  	}
   998  	_, _, e1 := Syscall(SYS_SETLOGIN, uintptr(unsafe.Pointer(_p0)), 0, 0)
   999  	if e1 != 0 {
  1000  		err = errnoErr(e1)
  1001  	}
  1002  	return
  1003  }
  1004  
  1005  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1006  
  1007  func Setpgid(pid int, pgid int) (err error) {
  1008  	_, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 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 Setpriority(which int, who int, prio int) (err error) {
  1018  	_, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
  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 Setregid(rgid int, egid int) (err error) {
  1028  	_, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
  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 Setreuid(ruid int, euid int) (err error) {
  1038  	_, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 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 Setrlimit(which int, lim *Rlimit) (err error) {
  1048  	_, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 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 Setsid() (pid int, err error) {
  1058  	r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
  1059  	pid = int(r0)
  1060  	if e1 != 0 {
  1061  		err = errnoErr(e1)
  1062  	}
  1063  	return
  1064  }
  1065  
  1066  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1067  
  1068  func Settimeofday(tp *Timeval) (err error) {
  1069  	_, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
  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 Setuid(uid int) (err error) {
  1079  	_, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 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 Stat(path string, stat *Stat_t) (err error) {
  1089  	var _p0 *byte
  1090  	_p0, err = BytePtrFromString(path)
  1091  	if err != nil {
  1092  		return
  1093  	}
  1094  	_, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
  1095  	if e1 != 0 {
  1096  		err = errnoErr(e1)
  1097  	}
  1098  	return
  1099  }
  1100  
  1101  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1102  
  1103  func Statfs(path string, stat *Statfs_t) (err error) {
  1104  	var _p0 *byte
  1105  	_p0, err = BytePtrFromString(path)
  1106  	if err != nil {
  1107  		return
  1108  	}
  1109  	_, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
  1110  	if e1 != 0 {
  1111  		err = errnoErr(e1)
  1112  	}
  1113  	return
  1114  }
  1115  
  1116  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1117  
  1118  func Symlink(path string, link string) (err error) {
  1119  	var _p0 *byte
  1120  	_p0, err = BytePtrFromString(path)
  1121  	if err != nil {
  1122  		return
  1123  	}
  1124  	var _p1 *byte
  1125  	_p1, err = BytePtrFromString(link)
  1126  	if err != nil {
  1127  		return
  1128  	}
  1129  	_, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
  1130  	if e1 != 0 {
  1131  		err = errnoErr(e1)
  1132  	}
  1133  	return
  1134  }
  1135  
  1136  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1137  
  1138  func Sync() (err error) {
  1139  	_, _, e1 := Syscall(SYS_SYNC, 0, 0, 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 Truncate(path string, length int64) (err error) {
  1149  	var _p0 *byte
  1150  	_p0, err = BytePtrFromString(path)
  1151  	if err != nil {
  1152  		return
  1153  	}
  1154  	_, _, e1 := Syscall6(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), 0, uintptr(length), uintptr(length>>32), 0, 0)
  1155  	if e1 != 0 {
  1156  		err = errnoErr(e1)
  1157  	}
  1158  	return
  1159  }
  1160  
  1161  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1162  
  1163  func Umask(newmask int) (oldmask int) {
  1164  	r0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0)
  1165  	oldmask = int(r0)
  1166  	return
  1167  }
  1168  
  1169  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1170  
  1171  func Unlink(path string) (err error) {
  1172  	var _p0 *byte
  1173  	_p0, err = BytePtrFromString(path)
  1174  	if err != nil {
  1175  		return
  1176  	}
  1177  	_, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 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 Unmount(path string, flags int) (err error) {
  1187  	var _p0 *byte
  1188  	_p0, err = BytePtrFromString(path)
  1189  	if err != nil {
  1190  		return
  1191  	}
  1192  	_, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 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 write(fd int, p []byte) (n int, err error) {
  1202  	var _p0 unsafe.Pointer
  1203  	if len(p) > 0 {
  1204  		_p0 = unsafe.Pointer(&p[0])
  1205  	} else {
  1206  		_p0 = unsafe.Pointer(&_zero)
  1207  	}
  1208  	r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
  1209  	n = int(r0)
  1210  	if e1 != 0 {
  1211  		err = errnoErr(e1)
  1212  	}
  1213  	return
  1214  }
  1215  
  1216  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1217  
  1218  func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {
  1219  	r0, _, e1 := Syscall9(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), 0, uintptr(pos), uintptr(pos>>32), 0)
  1220  	ret = uintptr(r0)
  1221  	if e1 != 0 {
  1222  		err = errnoErr(e1)
  1223  	}
  1224  	return
  1225  }
  1226  
  1227  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1228  
  1229  func munmap(addr uintptr, length uintptr) (err error) {
  1230  	_, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
  1231  	if e1 != 0 {
  1232  		err = errnoErr(e1)
  1233  	}
  1234  	return
  1235  }
  1236  
  1237  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1238  
  1239  func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
  1240  	r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
  1241  	n = int(r0)
  1242  	if e1 != 0 {
  1243  		err = errnoErr(e1)
  1244  	}
  1245  	return
  1246  }
  1247  
  1248  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1249  
  1250  func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
  1251  	r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
  1252  	n = int(r0)
  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 utimensat(dirfd int, path string, times *[2]Timespec, flag int) (err error) {
  1262  	var _p0 *byte
  1263  	_p0, err = BytePtrFromString(path)
  1264  	if err != nil {
  1265  		return
  1266  	}
  1267  	_, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flag), 0, 0)
  1268  	if e1 != 0 {
  1269  		err = errnoErr(e1)
  1270  	}
  1271  	return
  1272  }