Source file src/syscall/zsyscall_linux_arm64.go

Documentation: syscall

     1  // mksyscall.pl -tags linux,arm64 syscall_linux.go syscall_linux_arm64.go
     2  // Code generated by the command above; DO NOT EDIT.
     3  
     4  // +build linux,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 faccessat(dirfd int, path string, mode uint32) (err error) {
    13  	var _p0 *byte
    14  	_p0, err = BytePtrFromString(path)
    15  	if err != nil {
    16  		return
    17  	}
    18  	_, _, e1 := Syscall(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
    19  	if e1 != 0 {
    20  		err = errnoErr(e1)
    21  	}
    22  	return
    23  }
    24  
    25  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    26  
    27  func fchmodat(dirfd int, path string, mode uint32) (err error) {
    28  	var _p0 *byte
    29  	_p0, err = BytePtrFromString(path)
    30  	if err != nil {
    31  		return
    32  	}
    33  	_, _, e1 := Syscall(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
    34  	if e1 != 0 {
    35  		err = errnoErr(e1)
    36  	}
    37  	return
    38  }
    39  
    40  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    41  
    42  func linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags int) (err error) {
    43  	var _p0 *byte
    44  	_p0, err = BytePtrFromString(oldpath)
    45  	if err != nil {
    46  		return
    47  	}
    48  	var _p1 *byte
    49  	_p1, err = BytePtrFromString(newpath)
    50  	if err != nil {
    51  		return
    52  	}
    53  	_, _, e1 := Syscall6(SYS_LINKAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
    54  	if e1 != 0 {
    55  		err = errnoErr(e1)
    56  	}
    57  	return
    58  }
    59  
    60  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    61  
    62  func openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) {
    63  	var _p0 *byte
    64  	_p0, err = BytePtrFromString(path)
    65  	if err != nil {
    66  		return
    67  	}
    68  	r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mode), 0, 0)
    69  	fd = int(r0)
    70  	if e1 != 0 {
    71  		err = errnoErr(e1)
    72  	}
    73  	return
    74  }
    75  
    76  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    77  
    78  func readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
    79  	var _p0 *byte
    80  	_p0, err = BytePtrFromString(path)
    81  	if err != nil {
    82  		return
    83  	}
    84  	var _p1 unsafe.Pointer
    85  	if len(buf) > 0 {
    86  		_p1 = unsafe.Pointer(&buf[0])
    87  	} else {
    88  		_p1 = unsafe.Pointer(&_zero)
    89  	}
    90  	r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
    91  	n = int(r0)
    92  	if e1 != 0 {
    93  		err = errnoErr(e1)
    94  	}
    95  	return
    96  }
    97  
    98  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    99  
   100  func symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
   101  	var _p0 *byte
   102  	_p0, err = BytePtrFromString(oldpath)
   103  	if err != nil {
   104  		return
   105  	}
   106  	var _p1 *byte
   107  	_p1, err = BytePtrFromString(newpath)
   108  	if err != nil {
   109  		return
   110  	}
   111  	_, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
   112  	if e1 != 0 {
   113  		err = errnoErr(e1)
   114  	}
   115  	return
   116  }
   117  
   118  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   119  
   120  func unlinkat(dirfd int, path string, flags int) (err error) {
   121  	var _p0 *byte
   122  	_p0, err = BytePtrFromString(path)
   123  	if err != nil {
   124  		return
   125  	}
   126  	_, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
   127  	if e1 != 0 {
   128  		err = errnoErr(e1)
   129  	}
   130  	return
   131  }
   132  
   133  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   134  
   135  func utimensat(dirfd int, path string, times *[2]Timespec, flag int) (err error) {
   136  	var _p0 *byte
   137  	_p0, err = BytePtrFromString(path)
   138  	if err != nil {
   139  		return
   140  	}
   141  	_, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flag), 0, 0)
   142  	if e1 != 0 {
   143  		err = errnoErr(e1)
   144  	}
   145  	return
   146  }
   147  
   148  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   149  
   150  func Getcwd(buf []byte) (n int, err error) {
   151  	var _p0 unsafe.Pointer
   152  	if len(buf) > 0 {
   153  		_p0 = unsafe.Pointer(&buf[0])
   154  	} else {
   155  		_p0 = unsafe.Pointer(&_zero)
   156  	}
   157  	r0, _, e1 := Syscall(SYS_GETCWD, uintptr(_p0), uintptr(len(buf)), 0)
   158  	n = int(r0)
   159  	if e1 != 0 {
   160  		err = errnoErr(e1)
   161  	}
   162  	return
   163  }
   164  
   165  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   166  
   167  func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
   168  	r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
   169  	wpid = int(r0)
   170  	if e1 != 0 {
   171  		err = errnoErr(e1)
   172  	}
   173  	return
   174  }
   175  
   176  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   177  
   178  func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
   179  	_, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
   180  	if e1 != 0 {
   181  		err = errnoErr(e1)
   182  	}
   183  	return
   184  }
   185  
   186  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   187  
   188  func reboot(magic1 uint, magic2 uint, cmd int, arg string) (err error) {
   189  	var _p0 *byte
   190  	_p0, err = BytePtrFromString(arg)
   191  	if err != nil {
   192  		return
   193  	}
   194  	_, _, e1 := Syscall6(SYS_REBOOT, uintptr(magic1), uintptr(magic2), uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0, 0)
   195  	if e1 != 0 {
   196  		err = errnoErr(e1)
   197  	}
   198  	return
   199  }
   200  
   201  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   202  
   203  func mount(source string, target string, fstype string, flags uintptr, data *byte) (err error) {
   204  	var _p0 *byte
   205  	_p0, err = BytePtrFromString(source)
   206  	if err != nil {
   207  		return
   208  	}
   209  	var _p1 *byte
   210  	_p1, err = BytePtrFromString(target)
   211  	if err != nil {
   212  		return
   213  	}
   214  	var _p2 *byte
   215  	_p2, err = BytePtrFromString(fstype)
   216  	if err != nil {
   217  		return
   218  	}
   219  	_, _, e1 := Syscall6(SYS_MOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(flags), uintptr(unsafe.Pointer(data)), 0)
   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 Acct(path string) (err error) {
   229  	var _p0 *byte
   230  	_p0, err = BytePtrFromString(path)
   231  	if err != nil {
   232  		return
   233  	}
   234  	_, _, e1 := Syscall(SYS_ACCT, uintptr(unsafe.Pointer(_p0)), 0, 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 Adjtimex(buf *Timex) (state int, err error) {
   244  	r0, _, e1 := Syscall(SYS_ADJTIMEX, uintptr(unsafe.Pointer(buf)), 0, 0)
   245  	state = int(r0)
   246  	if e1 != 0 {
   247  		err = errnoErr(e1)
   248  	}
   249  	return
   250  }
   251  
   252  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   253  
   254  func Chdir(path string) (err error) {
   255  	var _p0 *byte
   256  	_p0, err = BytePtrFromString(path)
   257  	if err != nil {
   258  		return
   259  	}
   260  	_, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
   261  	if e1 != 0 {
   262  		err = errnoErr(e1)
   263  	}
   264  	return
   265  }
   266  
   267  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   268  
   269  func Chroot(path string) (err error) {
   270  	var _p0 *byte
   271  	_p0, err = BytePtrFromString(path)
   272  	if err != nil {
   273  		return
   274  	}
   275  	_, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
   276  	if e1 != 0 {
   277  		err = errnoErr(e1)
   278  	}
   279  	return
   280  }
   281  
   282  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   283  
   284  func Close(fd int) (err error) {
   285  	_, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
   286  	if e1 != 0 {
   287  		err = errnoErr(e1)
   288  	}
   289  	return
   290  }
   291  
   292  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   293  
   294  func Dup(oldfd int) (fd int, err error) {
   295  	r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 0, 0)
   296  	fd = int(r0)
   297  	if e1 != 0 {
   298  		err = errnoErr(e1)
   299  	}
   300  	return
   301  }
   302  
   303  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   304  
   305  func Dup3(oldfd int, newfd int, flags int) (err error) {
   306  	_, _, e1 := Syscall(SYS_DUP3, uintptr(oldfd), uintptr(newfd), uintptr(flags))
   307  	if e1 != 0 {
   308  		err = errnoErr(e1)
   309  	}
   310  	return
   311  }
   312  
   313  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   314  
   315  func EpollCreate1(flag int) (fd int, err error) {
   316  	r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE1, uintptr(flag), 0, 0)
   317  	fd = int(r0)
   318  	if e1 != 0 {
   319  		err = errnoErr(e1)
   320  	}
   321  	return
   322  }
   323  
   324  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   325  
   326  func EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) {
   327  	_, _, e1 := RawSyscall6(SYS_EPOLL_CTL, uintptr(epfd), uintptr(op), uintptr(fd), uintptr(unsafe.Pointer(event)), 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 Fallocate(fd int, mode uint32, off int64, len int64) (err error) {
   337  	_, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(len), 0, 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 Fchdir(fd int) (err error) {
   347  	_, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
   348  	if e1 != 0 {
   349  		err = errnoErr(e1)
   350  	}
   351  	return
   352  }
   353  
   354  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   355  
   356  func Fchmod(fd int, mode uint32) (err error) {
   357  	_, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), 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 Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
   367  	var _p0 *byte
   368  	_p0, err = BytePtrFromString(path)
   369  	if err != nil {
   370  		return
   371  	}
   372  	_, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
   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 fcntl(fd int, cmd int, arg int) (val int, err error) {
   382  	r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg))
   383  	val = int(r0)
   384  	if e1 != 0 {
   385  		err = errnoErr(e1)
   386  	}
   387  	return
   388  }
   389  
   390  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   391  
   392  func Fdatasync(fd int) (err error) {
   393  	_, _, e1 := Syscall(SYS_FDATASYNC, uintptr(fd), 0, 0)
   394  	if e1 != 0 {
   395  		err = errnoErr(e1)
   396  	}
   397  	return
   398  }
   399  
   400  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   401  
   402  func Flock(fd int, how int) (err error) {
   403  	_, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
   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 Fsync(fd int) (err error) {
   413  	_, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 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 Getdents(fd int, buf []byte) (n int, err error) {
   423  	var _p0 unsafe.Pointer
   424  	if len(buf) > 0 {
   425  		_p0 = unsafe.Pointer(&buf[0])
   426  	} else {
   427  		_p0 = unsafe.Pointer(&_zero)
   428  	}
   429  	r0, _, e1 := Syscall(SYS_GETDENTS64, uintptr(fd), uintptr(_p0), uintptr(len(buf)))
   430  	n = int(r0)
   431  	if e1 != 0 {
   432  		err = errnoErr(e1)
   433  	}
   434  	return
   435  }
   436  
   437  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   438  
   439  func Getpgid(pid int) (pgid int, err error) {
   440  	r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
   441  	pgid = int(r0)
   442  	if e1 != 0 {
   443  		err = errnoErr(e1)
   444  	}
   445  	return
   446  }
   447  
   448  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   449  
   450  func Getpid() (pid int) {
   451  	r0, _ := rawSyscallNoError(SYS_GETPID, 0, 0, 0)
   452  	pid = int(r0)
   453  	return
   454  }
   455  
   456  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   457  
   458  func Getppid() (ppid int) {
   459  	r0, _ := rawSyscallNoError(SYS_GETPPID, 0, 0, 0)
   460  	ppid = int(r0)
   461  	return
   462  }
   463  
   464  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   465  
   466  func Getpriority(which int, who int) (prio int, err error) {
   467  	r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
   468  	prio = int(r0)
   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 Getrusage(who int, rusage *Rusage) (err error) {
   478  	_, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
   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 Gettid() (tid int) {
   488  	r0, _ := rawSyscallNoError(SYS_GETTID, 0, 0, 0)
   489  	tid = int(r0)
   490  	return
   491  }
   492  
   493  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   494  
   495  func Getxattr(path string, attr string, dest []byte) (sz int, err error) {
   496  	var _p0 *byte
   497  	_p0, err = BytePtrFromString(path)
   498  	if err != nil {
   499  		return
   500  	}
   501  	var _p1 *byte
   502  	_p1, err = BytePtrFromString(attr)
   503  	if err != nil {
   504  		return
   505  	}
   506  	var _p2 unsafe.Pointer
   507  	if len(dest) > 0 {
   508  		_p2 = unsafe.Pointer(&dest[0])
   509  	} else {
   510  		_p2 = unsafe.Pointer(&_zero)
   511  	}
   512  	r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0)
   513  	sz = int(r0)
   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 InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) {
   523  	var _p0 *byte
   524  	_p0, err = BytePtrFromString(pathname)
   525  	if err != nil {
   526  		return
   527  	}
   528  	r0, _, e1 := Syscall(SYS_INOTIFY_ADD_WATCH, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mask))
   529  	watchdesc = int(r0)
   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 InotifyInit1(flags int) (fd int, err error) {
   539  	r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT1, uintptr(flags), 0, 0)
   540  	fd = int(r0)
   541  	if e1 != 0 {
   542  		err = errnoErr(e1)
   543  	}
   544  	return
   545  }
   546  
   547  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   548  
   549  func InotifyRmWatch(fd int, watchdesc uint32) (success int, err error) {
   550  	r0, _, e1 := RawSyscall(SYS_INOTIFY_RM_WATCH, uintptr(fd), uintptr(watchdesc), 0)
   551  	success = int(r0)
   552  	if e1 != 0 {
   553  		err = errnoErr(e1)
   554  	}
   555  	return
   556  }
   557  
   558  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   559  
   560  func Kill(pid int, sig Signal) (err error) {
   561  	_, _, e1 := RawSyscall(SYS_KILL, uintptr(pid), uintptr(sig), 0)
   562  	if e1 != 0 {
   563  		err = errnoErr(e1)
   564  	}
   565  	return
   566  }
   567  
   568  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   569  
   570  func Klogctl(typ int, buf []byte) (n int, err error) {
   571  	var _p0 unsafe.Pointer
   572  	if len(buf) > 0 {
   573  		_p0 = unsafe.Pointer(&buf[0])
   574  	} else {
   575  		_p0 = unsafe.Pointer(&_zero)
   576  	}
   577  	r0, _, e1 := Syscall(SYS_SYSLOG, uintptr(typ), uintptr(_p0), uintptr(len(buf)))
   578  	n = int(r0)
   579  	if e1 != 0 {
   580  		err = errnoErr(e1)
   581  	}
   582  	return
   583  }
   584  
   585  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   586  
   587  func Listxattr(path string, dest []byte) (sz int, err error) {
   588  	var _p0 *byte
   589  	_p0, err = BytePtrFromString(path)
   590  	if err != nil {
   591  		return
   592  	}
   593  	var _p1 unsafe.Pointer
   594  	if len(dest) > 0 {
   595  		_p1 = unsafe.Pointer(&dest[0])
   596  	} else {
   597  		_p1 = unsafe.Pointer(&_zero)
   598  	}
   599  	r0, _, e1 := Syscall(SYS_LISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)))
   600  	sz = int(r0)
   601  	if e1 != 0 {
   602  		err = errnoErr(e1)
   603  	}
   604  	return
   605  }
   606  
   607  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   608  
   609  func Mkdirat(dirfd int, path string, mode uint32) (err error) {
   610  	var _p0 *byte
   611  	_p0, err = BytePtrFromString(path)
   612  	if err != nil {
   613  		return
   614  	}
   615  	_, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
   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 Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {
   625  	var _p0 *byte
   626  	_p0, err = BytePtrFromString(path)
   627  	if err != nil {
   628  		return
   629  	}
   630  	_, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
   631  	if e1 != 0 {
   632  		err = errnoErr(e1)
   633  	}
   634  	return
   635  }
   636  
   637  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   638  
   639  func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
   640  	_, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
   641  	if e1 != 0 {
   642  		err = errnoErr(e1)
   643  	}
   644  	return
   645  }
   646  
   647  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   648  
   649  func PivotRoot(newroot string, putold string) (err error) {
   650  	var _p0 *byte
   651  	_p0, err = BytePtrFromString(newroot)
   652  	if err != nil {
   653  		return
   654  	}
   655  	var _p1 *byte
   656  	_p1, err = BytePtrFromString(putold)
   657  	if err != nil {
   658  		return
   659  	}
   660  	_, _, e1 := Syscall(SYS_PIVOT_ROOT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
   661  	if e1 != 0 {
   662  		err = errnoErr(e1)
   663  	}
   664  	return
   665  }
   666  
   667  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   668  
   669  func prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) {
   670  	_, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(newlimit)), uintptr(unsafe.Pointer(old)), 0, 0)
   671  	if e1 != 0 {
   672  		err = errnoErr(e1)
   673  	}
   674  	return
   675  }
   676  
   677  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   678  
   679  func read(fd int, p []byte) (n int, err error) {
   680  	var _p0 unsafe.Pointer
   681  	if len(p) > 0 {
   682  		_p0 = unsafe.Pointer(&p[0])
   683  	} else {
   684  		_p0 = unsafe.Pointer(&_zero)
   685  	}
   686  	r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
   687  	n = int(r0)
   688  	if e1 != 0 {
   689  		err = errnoErr(e1)
   690  	}
   691  	return
   692  }
   693  
   694  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   695  
   696  func Removexattr(path string, attr string) (err error) {
   697  	var _p0 *byte
   698  	_p0, err = BytePtrFromString(path)
   699  	if err != nil {
   700  		return
   701  	}
   702  	var _p1 *byte
   703  	_p1, err = BytePtrFromString(attr)
   704  	if err != nil {
   705  		return
   706  	}
   707  	_, _, e1 := Syscall(SYS_REMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 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 Setdomainname(p []byte) (err error) {
   717  	var _p0 unsafe.Pointer
   718  	if len(p) > 0 {
   719  		_p0 = unsafe.Pointer(&p[0])
   720  	} else {
   721  		_p0 = unsafe.Pointer(&_zero)
   722  	}
   723  	_, _, e1 := Syscall(SYS_SETDOMAINNAME, uintptr(_p0), uintptr(len(p)), 0)
   724  	if e1 != 0 {
   725  		err = errnoErr(e1)
   726  	}
   727  	return
   728  }
   729  
   730  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   731  
   732  func Sethostname(p []byte) (err error) {
   733  	var _p0 unsafe.Pointer
   734  	if len(p) > 0 {
   735  		_p0 = unsafe.Pointer(&p[0])
   736  	} else {
   737  		_p0 = unsafe.Pointer(&_zero)
   738  	}
   739  	_, _, e1 := Syscall(SYS_SETHOSTNAME, uintptr(_p0), uintptr(len(p)), 0)
   740  	if e1 != 0 {
   741  		err = errnoErr(e1)
   742  	}
   743  	return
   744  }
   745  
   746  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   747  
   748  func Setpgid(pid int, pgid int) (err error) {
   749  	_, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
   750  	if e1 != 0 {
   751  		err = errnoErr(e1)
   752  	}
   753  	return
   754  }
   755  
   756  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   757  
   758  func Setsid() (pid int, err error) {
   759  	r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
   760  	pid = int(r0)
   761  	if e1 != 0 {
   762  		err = errnoErr(e1)
   763  	}
   764  	return
   765  }
   766  
   767  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   768  
   769  func Settimeofday(tv *Timeval) (err error) {
   770  	_, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
   771  	if e1 != 0 {
   772  		err = errnoErr(e1)
   773  	}
   774  	return
   775  }
   776  
   777  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   778  
   779  func Setpriority(which int, who int, prio int) (err error) {
   780  	_, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
   781  	if e1 != 0 {
   782  		err = errnoErr(e1)
   783  	}
   784  	return
   785  }
   786  
   787  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   788  
   789  func Setxattr(path string, attr string, data []byte, flags int) (err error) {
   790  	var _p0 *byte
   791  	_p0, err = BytePtrFromString(path)
   792  	if err != nil {
   793  		return
   794  	}
   795  	var _p1 *byte
   796  	_p1, err = BytePtrFromString(attr)
   797  	if err != nil {
   798  		return
   799  	}
   800  	var _p2 unsafe.Pointer
   801  	if len(data) > 0 {
   802  		_p2 = unsafe.Pointer(&data[0])
   803  	} else {
   804  		_p2 = unsafe.Pointer(&_zero)
   805  	}
   806  	_, _, e1 := Syscall6(SYS_SETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0)
   807  	if e1 != 0 {
   808  		err = errnoErr(e1)
   809  	}
   810  	return
   811  }
   812  
   813  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   814  
   815  func Sync() {
   816  	Syscall(SYS_SYNC, 0, 0, 0)
   817  	return
   818  }
   819  
   820  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   821  
   822  func Sysinfo(info *Sysinfo_t) (err error) {
   823  	_, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 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 Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
   833  	r0, _, e1 := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0)
   834  	n = int64(r0)
   835  	if e1 != 0 {
   836  		err = errnoErr(e1)
   837  	}
   838  	return
   839  }
   840  
   841  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   842  
   843  func Tgkill(tgid int, tid int, sig Signal) (err error) {
   844  	_, _, e1 := RawSyscall(SYS_TGKILL, uintptr(tgid), uintptr(tid), uintptr(sig))
   845  	if e1 != 0 {
   846  		err = errnoErr(e1)
   847  	}
   848  	return
   849  }
   850  
   851  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   852  
   853  func Times(tms *Tms) (ticks uintptr, err error) {
   854  	r0, _, e1 := RawSyscall(SYS_TIMES, uintptr(unsafe.Pointer(tms)), 0, 0)
   855  	ticks = uintptr(r0)
   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 Umask(mask int) (oldmask int) {
   865  	r0, _ := rawSyscallNoError(SYS_UMASK, uintptr(mask), 0, 0)
   866  	oldmask = int(r0)
   867  	return
   868  }
   869  
   870  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   871  
   872  func Uname(buf *Utsname) (err error) {
   873  	_, _, e1 := RawSyscall(SYS_UNAME, uintptr(unsafe.Pointer(buf)), 0, 0)
   874  	if e1 != 0 {
   875  		err = errnoErr(e1)
   876  	}
   877  	return
   878  }
   879  
   880  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   881  
   882  func Unmount(target string, flags int) (err error) {
   883  	var _p0 *byte
   884  	_p0, err = BytePtrFromString(target)
   885  	if err != nil {
   886  		return
   887  	}
   888  	_, _, e1 := Syscall(SYS_UMOUNT2, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
   889  	if e1 != 0 {
   890  		err = errnoErr(e1)
   891  	}
   892  	return
   893  }
   894  
   895  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   896  
   897  func Unshare(flags int) (err error) {
   898  	_, _, e1 := Syscall(SYS_UNSHARE, uintptr(flags), 0, 0)
   899  	if e1 != 0 {
   900  		err = errnoErr(e1)
   901  	}
   902  	return
   903  }
   904  
   905  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   906  
   907  func write(fd int, p []byte) (n int, err error) {
   908  	var _p0 unsafe.Pointer
   909  	if len(p) > 0 {
   910  		_p0 = unsafe.Pointer(&p[0])
   911  	} else {
   912  		_p0 = unsafe.Pointer(&_zero)
   913  	}
   914  	r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
   915  	n = int(r0)
   916  	if e1 != 0 {
   917  		err = errnoErr(e1)
   918  	}
   919  	return
   920  }
   921  
   922  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   923  
   924  func exitThread(code int) (err error) {
   925  	_, _, e1 := Syscall(SYS_EXIT, uintptr(code), 0, 0)
   926  	if e1 != 0 {
   927  		err = errnoErr(e1)
   928  	}
   929  	return
   930  }
   931  
   932  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   933  
   934  func readlen(fd int, p *byte, np int) (n int, err error) {
   935  	r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
   936  	n = int(r0)
   937  	if e1 != 0 {
   938  		err = errnoErr(e1)
   939  	}
   940  	return
   941  }
   942  
   943  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   944  
   945  func writelen(fd int, p *byte, np int) (n int, err error) {
   946  	r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
   947  	n = int(r0)
   948  	if e1 != 0 {
   949  		err = errnoErr(e1)
   950  	}
   951  	return
   952  }
   953  
   954  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   955  
   956  func munmap(addr uintptr, length uintptr) (err error) {
   957  	_, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
   958  	if e1 != 0 {
   959  		err = errnoErr(e1)
   960  	}
   961  	return
   962  }
   963  
   964  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   965  
   966  func Madvise(b []byte, advice int) (err error) {
   967  	var _p0 unsafe.Pointer
   968  	if len(b) > 0 {
   969  		_p0 = unsafe.Pointer(&b[0])
   970  	} else {
   971  		_p0 = unsafe.Pointer(&_zero)
   972  	}
   973  	_, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(advice))
   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 Mprotect(b []byte, prot int) (err error) {
   983  	var _p0 unsafe.Pointer
   984  	if len(b) > 0 {
   985  		_p0 = unsafe.Pointer(&b[0])
   986  	} else {
   987  		_p0 = unsafe.Pointer(&_zero)
   988  	}
   989  	_, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
   990  	if e1 != 0 {
   991  		err = errnoErr(e1)
   992  	}
   993  	return
   994  }
   995  
   996  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   997  
   998  func Mlock(b []byte) (err error) {
   999  	var _p0 unsafe.Pointer
  1000  	if len(b) > 0 {
  1001  		_p0 = unsafe.Pointer(&b[0])
  1002  	} else {
  1003  		_p0 = unsafe.Pointer(&_zero)
  1004  	}
  1005  	_, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 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 Munlock(b []byte) (err error) {
  1015  	var _p0 unsafe.Pointer
  1016  	if len(b) > 0 {
  1017  		_p0 = unsafe.Pointer(&b[0])
  1018  	} else {
  1019  		_p0 = unsafe.Pointer(&_zero)
  1020  	}
  1021  	_, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
  1022  	if e1 != 0 {
  1023  		err = errnoErr(e1)
  1024  	}
  1025  	return
  1026  }
  1027  
  1028  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1029  
  1030  func Mlockall(flags int) (err error) {
  1031  	_, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
  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 Munlockall() (err error) {
  1041  	_, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 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 EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
  1051  	var _p0 unsafe.Pointer
  1052  	if len(events) > 0 {
  1053  		_p0 = unsafe.Pointer(&events[0])
  1054  	} else {
  1055  		_p0 = unsafe.Pointer(&_zero)
  1056  	}
  1057  	r0, _, e1 := Syscall6(SYS_EPOLL_PWAIT, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec), 0, 0)
  1058  	n = int(r0)
  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 Fchown(fd int, uid int, gid int) (err error) {
  1068  	_, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
  1069  	if e1 != 0 {
  1070  		err = errnoErr(e1)
  1071  	}
  1072  	return
  1073  }
  1074  
  1075  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1076  
  1077  func Fstat(fd int, stat *Stat_t) (err error) {
  1078  	_, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
  1079  	if e1 != 0 {
  1080  		err = errnoErr(e1)
  1081  	}
  1082  	return
  1083  }
  1084  
  1085  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1086  
  1087  func Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) {
  1088  	var _p0 *byte
  1089  	_p0, err = BytePtrFromString(path)
  1090  	if err != nil {
  1091  		return
  1092  	}
  1093  	_, _, e1 := Syscall6(SYS_FSTATAT, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)
  1094  	if e1 != 0 {
  1095  		err = errnoErr(e1)
  1096  	}
  1097  	return
  1098  }
  1099  
  1100  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1101  
  1102  func fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) {
  1103  	var _p0 *byte
  1104  	_p0, err = BytePtrFromString(path)
  1105  	if err != nil {
  1106  		return
  1107  	}
  1108  	_, _, e1 := Syscall6(SYS_FSTATAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)
  1109  	if e1 != 0 {
  1110  		err = errnoErr(e1)
  1111  	}
  1112  	return
  1113  }
  1114  
  1115  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1116  
  1117  func Fstatfs(fd int, buf *Statfs_t) (err error) {
  1118  	_, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(buf)), 0)
  1119  	if e1 != 0 {
  1120  		err = errnoErr(e1)
  1121  	}
  1122  	return
  1123  }
  1124  
  1125  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1126  
  1127  func Ftruncate(fd int, length int64) (err error) {
  1128  	_, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), 0)
  1129  	if e1 != 0 {
  1130  		err = errnoErr(e1)
  1131  	}
  1132  	return
  1133  }
  1134  
  1135  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1136  
  1137  func Getegid() (egid int) {
  1138  	r0, _ := rawSyscallNoError(SYS_GETEGID, 0, 0, 0)
  1139  	egid = int(r0)
  1140  	return
  1141  }
  1142  
  1143  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1144  
  1145  func Geteuid() (euid int) {
  1146  	r0, _ := rawSyscallNoError(SYS_GETEUID, 0, 0, 0)
  1147  	euid = int(r0)
  1148  	return
  1149  }
  1150  
  1151  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1152  
  1153  func Getgid() (gid int) {
  1154  	r0, _ := rawSyscallNoError(SYS_GETGID, 0, 0, 0)
  1155  	gid = int(r0)
  1156  	return
  1157  }
  1158  
  1159  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1160  
  1161  func Getrlimit(resource int, rlim *Rlimit) (err error) {
  1162  	_, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
  1163  	if e1 != 0 {
  1164  		err = errnoErr(e1)
  1165  	}
  1166  	return
  1167  }
  1168  
  1169  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1170  
  1171  func Getuid() (uid int) {
  1172  	r0, _ := rawSyscallNoError(SYS_GETUID, 0, 0, 0)
  1173  	uid = int(r0)
  1174  	return
  1175  }
  1176  
  1177  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1178  
  1179  func Listen(s int, n int) (err error) {
  1180  	_, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(n), 0)
  1181  	if e1 != 0 {
  1182  		err = errnoErr(e1)
  1183  	}
  1184  	return
  1185  }
  1186  
  1187  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1188  
  1189  func Pread(fd int, p []byte, offset int64) (n int, err error) {
  1190  	var _p0 unsafe.Pointer
  1191  	if len(p) > 0 {
  1192  		_p0 = unsafe.Pointer(&p[0])
  1193  	} else {
  1194  		_p0 = unsafe.Pointer(&_zero)
  1195  	}
  1196  	r0, _, e1 := Syscall6(SYS_PREAD64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
  1197  	n = int(r0)
  1198  	if e1 != 0 {
  1199  		err = errnoErr(e1)
  1200  	}
  1201  	return
  1202  }
  1203  
  1204  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1205  
  1206  func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
  1207  	var _p0 unsafe.Pointer
  1208  	if len(p) > 0 {
  1209  		_p0 = unsafe.Pointer(&p[0])
  1210  	} else {
  1211  		_p0 = unsafe.Pointer(&_zero)
  1212  	}
  1213  	r0, _, e1 := Syscall6(SYS_PWRITE64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
  1214  	n = int(r0)
  1215  	if e1 != 0 {
  1216  		err = errnoErr(e1)
  1217  	}
  1218  	return
  1219  }
  1220  
  1221  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1222  
  1223  func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {
  1224  	var _p0 *byte
  1225  	_p0, err = BytePtrFromString(oldpath)
  1226  	if err != nil {
  1227  		return
  1228  	}
  1229  	var _p1 *byte
  1230  	_p1, err = BytePtrFromString(newpath)
  1231  	if err != nil {
  1232  		return
  1233  	}
  1234  	_, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0)
  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 Seek(fd int, offset int64, whence int) (off int64, err error) {
  1244  	r0, _, e1 := Syscall(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence))
  1245  	off = int64(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 sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
  1255  	r0, _, e1 := Syscall6(SYS_SENDFILE, uintptr(outfd), uintptr(infd), uintptr(unsafe.Pointer(offset)), uintptr(count), 0, 0)
  1256  	written = int(r0)
  1257  	if e1 != 0 {
  1258  		err = errnoErr(e1)
  1259  	}
  1260  	return
  1261  }
  1262  
  1263  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1264  
  1265  func Setfsgid(gid int) (err error) {
  1266  	_, _, e1 := Syscall(SYS_SETFSGID, uintptr(gid), 0, 0)
  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 Setfsuid(uid int) (err error) {
  1276  	_, _, e1 := Syscall(SYS_SETFSUID, uintptr(uid), 0, 0)
  1277  	if e1 != 0 {
  1278  		err = errnoErr(e1)
  1279  	}
  1280  	return
  1281  }
  1282  
  1283  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1284  
  1285  func Setregid(rgid int, egid int) (err error) {
  1286  	_, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
  1287  	if e1 != 0 {
  1288  		err = errnoErr(e1)
  1289  	}
  1290  	return
  1291  }
  1292  
  1293  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1294  
  1295  func Setresgid(rgid int, egid int, sgid int) (err error) {
  1296  	_, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid))
  1297  	if e1 != 0 {
  1298  		err = errnoErr(e1)
  1299  	}
  1300  	return
  1301  }
  1302  
  1303  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1304  
  1305  func Setresuid(ruid int, euid int, suid int) (err error) {
  1306  	_, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid))
  1307  	if e1 != 0 {
  1308  		err = errnoErr(e1)
  1309  	}
  1310  	return
  1311  }
  1312  
  1313  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1314  
  1315  func Setrlimit(resource int, rlim *Rlimit) (err error) {
  1316  	_, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
  1317  	if e1 != 0 {
  1318  		err = errnoErr(e1)
  1319  	}
  1320  	return
  1321  }
  1322  
  1323  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1324  
  1325  func Setreuid(ruid int, euid int) (err error) {
  1326  	_, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
  1327  	if e1 != 0 {
  1328  		err = errnoErr(e1)
  1329  	}
  1330  	return
  1331  }
  1332  
  1333  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1334  
  1335  func Shutdown(fd int, how int) (err error) {
  1336  	_, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0)
  1337  	if e1 != 0 {
  1338  		err = errnoErr(e1)
  1339  	}
  1340  	return
  1341  }
  1342  
  1343  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1344  
  1345  func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error) {
  1346  	r0, _, e1 := Syscall6(SYS_SPLICE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags))
  1347  	n = int64(r0)
  1348  	if e1 != 0 {
  1349  		err = errnoErr(e1)
  1350  	}
  1351  	return
  1352  }
  1353  
  1354  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1355  
  1356  func Statfs(path string, buf *Statfs_t) (err error) {
  1357  	var _p0 *byte
  1358  	_p0, err = BytePtrFromString(path)
  1359  	if err != nil {
  1360  		return
  1361  	}
  1362  	_, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0)
  1363  	if e1 != 0 {
  1364  		err = errnoErr(e1)
  1365  	}
  1366  	return
  1367  }
  1368  
  1369  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1370  
  1371  func SyncFileRange(fd int, off int64, n int64, flags int) (err error) {
  1372  	_, _, e1 := Syscall6(SYS_SYNC_FILE_RANGE2, uintptr(fd), uintptr(off), uintptr(n), uintptr(flags), 0, 0)
  1373  	if e1 != 0 {
  1374  		err = errnoErr(e1)
  1375  	}
  1376  	return
  1377  }
  1378  
  1379  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1380  
  1381  func Truncate(path string, length int64) (err error) {
  1382  	var _p0 *byte
  1383  	_p0, err = BytePtrFromString(path)
  1384  	if err != nil {
  1385  		return
  1386  	}
  1387  	_, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0)
  1388  	if e1 != 0 {
  1389  		err = errnoErr(e1)
  1390  	}
  1391  	return
  1392  }
  1393  
  1394  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1395  
  1396  func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
  1397  	r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
  1398  	fd = int(r0)
  1399  	if e1 != 0 {
  1400  		err = errnoErr(e1)
  1401  	}
  1402  	return
  1403  }
  1404  
  1405  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1406  
  1407  func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {
  1408  	r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
  1409  	fd = int(r0)
  1410  	if e1 != 0 {
  1411  		err = errnoErr(e1)
  1412  	}
  1413  	return
  1414  }
  1415  
  1416  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1417  
  1418  func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
  1419  	_, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))
  1420  	if e1 != 0 {
  1421  		err = errnoErr(e1)
  1422  	}
  1423  	return
  1424  }
  1425  
  1426  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1427  
  1428  func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
  1429  	_, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))
  1430  	if e1 != 0 {
  1431  		err = errnoErr(e1)
  1432  	}
  1433  	return
  1434  }
  1435  
  1436  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1437  
  1438  func getgroups(n int, list *_Gid_t) (nn int, err error) {
  1439  	r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0)
  1440  	nn = int(r0)
  1441  	if e1 != 0 {
  1442  		err = errnoErr(e1)
  1443  	}
  1444  	return
  1445  }
  1446  
  1447  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1448  
  1449  func setgroups(n int, list *_Gid_t) (err error) {
  1450  	_, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0)
  1451  	if e1 != 0 {
  1452  		err = errnoErr(e1)
  1453  	}
  1454  	return
  1455  }
  1456  
  1457  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1458  
  1459  func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {
  1460  	_, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
  1461  	if e1 != 0 {
  1462  		err = errnoErr(e1)
  1463  	}
  1464  	return
  1465  }
  1466  
  1467  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1468  
  1469  func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {
  1470  	_, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
  1471  	if e1 != 0 {
  1472  		err = errnoErr(e1)
  1473  	}
  1474  	return
  1475  }
  1476  
  1477  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1478  
  1479  func socket(domain int, typ int, proto int) (fd int, err error) {
  1480  	r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))
  1481  	fd = int(r0)
  1482  	if e1 != 0 {
  1483  		err = errnoErr(e1)
  1484  	}
  1485  	return
  1486  }
  1487  
  1488  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1489  
  1490  func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
  1491  	_, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
  1492  	if e1 != 0 {
  1493  		err = errnoErr(e1)
  1494  	}
  1495  	return
  1496  }
  1497  
  1498  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1499  
  1500  func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
  1501  	_, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
  1502  	if e1 != 0 {
  1503  		err = errnoErr(e1)
  1504  	}
  1505  	return
  1506  }
  1507  
  1508  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1509  
  1510  func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
  1511  	_, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
  1512  	if e1 != 0 {
  1513  		err = errnoErr(e1)
  1514  	}
  1515  	return
  1516  }
  1517  
  1518  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1519  
  1520  func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {
  1521  	var _p0 unsafe.Pointer
  1522  	if len(p) > 0 {
  1523  		_p0 = unsafe.Pointer(&p[0])
  1524  	} else {
  1525  		_p0 = unsafe.Pointer(&_zero)
  1526  	}
  1527  	r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
  1528  	n = int(r0)
  1529  	if e1 != 0 {
  1530  		err = errnoErr(e1)
  1531  	}
  1532  	return
  1533  }
  1534  
  1535  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1536  
  1537  func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {
  1538  	var _p0 unsafe.Pointer
  1539  	if len(buf) > 0 {
  1540  		_p0 = unsafe.Pointer(&buf[0])
  1541  	} else {
  1542  		_p0 = unsafe.Pointer(&_zero)
  1543  	}
  1544  	_, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
  1545  	if e1 != 0 {
  1546  		err = errnoErr(e1)
  1547  	}
  1548  	return
  1549  }
  1550  
  1551  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1552  
  1553  func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
  1554  	r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
  1555  	n = int(r0)
  1556  	if e1 != 0 {
  1557  		err = errnoErr(e1)
  1558  	}
  1559  	return
  1560  }
  1561  
  1562  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1563  
  1564  func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
  1565  	r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
  1566  	n = int(r0)
  1567  	if e1 != 0 {
  1568  		err = errnoErr(e1)
  1569  	}
  1570  	return
  1571  }
  1572  
  1573  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1574  
  1575  func mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) {
  1576  	r0, _, e1 := Syscall6(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(offset))
  1577  	xaddr = uintptr(r0)
  1578  	if e1 != 0 {
  1579  		err = errnoErr(e1)
  1580  	}
  1581  	return
  1582  }
  1583  
  1584  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1585  
  1586  func pselect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timespec, sigmask *sigset_t) (n int, err error) {
  1587  	r0, _, e1 := Syscall6(SYS_PSELECT6, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)))
  1588  	n = int(r0)
  1589  	if e1 != 0 {
  1590  		err = errnoErr(e1)
  1591  	}
  1592  	return
  1593  }
  1594  
  1595  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1596  
  1597  func Gettimeofday(tv *Timeval) (err error) {
  1598  	_, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
  1599  	if e1 != 0 {
  1600  		err = errnoErr(e1)
  1601  	}
  1602  	return
  1603  }
  1604  
  1605  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1606  
  1607  func pipe2(p *[2]_C_int, flags int) (err error) {
  1608  	_, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
  1609  	if e1 != 0 {
  1610  		err = errnoErr(e1)
  1611  	}
  1612  	return
  1613  }
  1614  
  1615  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1616  
  1617  func ppoll(fds *pollFd, nfds int, timeout *Timespec, sigmask *sigset_t) (n int, err error) {
  1618  	r0, _, e1 := Syscall6(SYS_PPOLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0)
  1619  	n = int(r0)
  1620  	if e1 != 0 {
  1621  		err = errnoErr(e1)
  1622  	}
  1623  	return
  1624  }
  1625  

View as plain text