Source file src/syscall/zsyscall_linux_amd64.go

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

View as plain text