Source file src/cmd/vendor/golang.org/x/sys/unix/zsyscall_linux.go

     1  // Code generated by mkmerge; DO NOT EDIT.
     2  
     3  //go:build linux
     4  // +build linux
     5  
     6  package unix
     7  
     8  import (
     9  	"syscall"
    10  	"unsafe"
    11  )
    12  
    13  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    14  
    15  func FanotifyInit(flags uint, event_f_flags uint) (fd int, err error) {
    16  	r0, _, e1 := Syscall(SYS_FANOTIFY_INIT, uintptr(flags), uintptr(event_f_flags), 0)
    17  	fd = int(r0)
    18  	if e1 != 0 {
    19  		err = errnoErr(e1)
    20  	}
    21  	return
    22  }
    23  
    24  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    25  
    26  func fchmodat(dirfd int, path string, mode uint32) (err error) {
    27  	var _p0 *byte
    28  	_p0, err = BytePtrFromString(path)
    29  	if err != nil {
    30  		return
    31  	}
    32  	_, _, e1 := Syscall(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
    33  	if e1 != 0 {
    34  		err = errnoErr(e1)
    35  	}
    36  	return
    37  }
    38  
    39  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    40  
    41  func ioctl(fd int, req uint, arg uintptr) (err error) {
    42  	_, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
    43  	if e1 != 0 {
    44  		err = errnoErr(e1)
    45  	}
    46  	return
    47  }
    48  
    49  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    50  
    51  func ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) {
    52  	_, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
    53  	if e1 != 0 {
    54  		err = errnoErr(e1)
    55  	}
    56  	return
    57  }
    58  
    59  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    60  
    61  func Linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags int) (err error) {
    62  	var _p0 *byte
    63  	_p0, err = BytePtrFromString(oldpath)
    64  	if err != nil {
    65  		return
    66  	}
    67  	var _p1 *byte
    68  	_p1, err = BytePtrFromString(newpath)
    69  	if err != nil {
    70  		return
    71  	}
    72  	_, _, e1 := Syscall6(SYS_LINKAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
    73  	if e1 != 0 {
    74  		err = errnoErr(e1)
    75  	}
    76  	return
    77  }
    78  
    79  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    80  
    81  func openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) {
    82  	var _p0 *byte
    83  	_p0, err = BytePtrFromString(path)
    84  	if err != nil {
    85  		return
    86  	}
    87  	r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mode), 0, 0)
    88  	fd = int(r0)
    89  	if e1 != 0 {
    90  		err = errnoErr(e1)
    91  	}
    92  	return
    93  }
    94  
    95  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    96  
    97  func openat2(dirfd int, path string, open_how *OpenHow, size int) (fd int, err error) {
    98  	var _p0 *byte
    99  	_p0, err = BytePtrFromString(path)
   100  	if err != nil {
   101  		return
   102  	}
   103  	r0, _, e1 := Syscall6(SYS_OPENAT2, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(open_how)), uintptr(size), 0, 0)
   104  	fd = int(r0)
   105  	if e1 != 0 {
   106  		err = errnoErr(e1)
   107  	}
   108  	return
   109  }
   110  
   111  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   112  
   113  func pipe2(p *[2]_C_int, flags int) (err error) {
   114  	_, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
   115  	if e1 != 0 {
   116  		err = errnoErr(e1)
   117  	}
   118  	return
   119  }
   120  
   121  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   122  
   123  func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
   124  	r0, _, e1 := Syscall6(SYS_PPOLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0)
   125  	n = int(r0)
   126  	if e1 != 0 {
   127  		err = errnoErr(e1)
   128  	}
   129  	return
   130  }
   131  
   132  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   133  
   134  func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
   135  	var _p0 *byte
   136  	_p0, err = BytePtrFromString(path)
   137  	if err != nil {
   138  		return
   139  	}
   140  	var _p1 unsafe.Pointer
   141  	if len(buf) > 0 {
   142  		_p1 = unsafe.Pointer(&buf[0])
   143  	} else {
   144  		_p1 = unsafe.Pointer(&_zero)
   145  	}
   146  	r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
   147  	n = int(r0)
   148  	if e1 != 0 {
   149  		err = errnoErr(e1)
   150  	}
   151  	return
   152  }
   153  
   154  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   155  
   156  func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
   157  	var _p0 *byte
   158  	_p0, err = BytePtrFromString(oldpath)
   159  	if err != nil {
   160  		return
   161  	}
   162  	var _p1 *byte
   163  	_p1, err = BytePtrFromString(newpath)
   164  	if err != nil {
   165  		return
   166  	}
   167  	_, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
   168  	if e1 != 0 {
   169  		err = errnoErr(e1)
   170  	}
   171  	return
   172  }
   173  
   174  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   175  
   176  func Unlinkat(dirfd int, path string, flags int) (err error) {
   177  	var _p0 *byte
   178  	_p0, err = BytePtrFromString(path)
   179  	if err != nil {
   180  		return
   181  	}
   182  	_, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
   183  	if e1 != 0 {
   184  		err = errnoErr(e1)
   185  	}
   186  	return
   187  }
   188  
   189  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   190  
   191  func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {
   192  	var _p0 *byte
   193  	_p0, err = BytePtrFromString(path)
   194  	if err != nil {
   195  		return
   196  	}
   197  	_, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)
   198  	if e1 != 0 {
   199  		err = errnoErr(e1)
   200  	}
   201  	return
   202  }
   203  
   204  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   205  
   206  func Getcwd(buf []byte) (n int, err error) {
   207  	var _p0 unsafe.Pointer
   208  	if len(buf) > 0 {
   209  		_p0 = unsafe.Pointer(&buf[0])
   210  	} else {
   211  		_p0 = unsafe.Pointer(&_zero)
   212  	}
   213  	r0, _, e1 := Syscall(SYS_GETCWD, uintptr(_p0), uintptr(len(buf)), 0)
   214  	n = int(r0)
   215  	if e1 != 0 {
   216  		err = errnoErr(e1)
   217  	}
   218  	return
   219  }
   220  
   221  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   222  
   223  func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
   224  	r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
   225  	wpid = int(r0)
   226  	if e1 != 0 {
   227  		err = errnoErr(e1)
   228  	}
   229  	return
   230  }
   231  
   232  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   233  
   234  func KeyctlInt(cmd int, arg2 int, arg3 int, arg4 int, arg5 int) (ret int, err error) {
   235  	r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0)
   236  	ret = int(r0)
   237  	if e1 != 0 {
   238  		err = errnoErr(e1)
   239  	}
   240  	return
   241  }
   242  
   243  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   244  
   245  func KeyctlBuffer(cmd int, arg2 int, buf []byte, arg5 int) (ret int, err error) {
   246  	var _p0 unsafe.Pointer
   247  	if len(buf) > 0 {
   248  		_p0 = unsafe.Pointer(&buf[0])
   249  	} else {
   250  		_p0 = unsafe.Pointer(&_zero)
   251  	}
   252  	r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(_p0), uintptr(len(buf)), uintptr(arg5), 0)
   253  	ret = int(r0)
   254  	if e1 != 0 {
   255  		err = errnoErr(e1)
   256  	}
   257  	return
   258  }
   259  
   260  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   261  
   262  func keyctlJoin(cmd int, arg2 string) (ret int, err error) {
   263  	var _p0 *byte
   264  	_p0, err = BytePtrFromString(arg2)
   265  	if err != nil {
   266  		return
   267  	}
   268  	r0, _, e1 := Syscall(SYS_KEYCTL, uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0)
   269  	ret = int(r0)
   270  	if e1 != 0 {
   271  		err = errnoErr(e1)
   272  	}
   273  	return
   274  }
   275  
   276  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   277  
   278  func keyctlSearch(cmd int, arg2 int, arg3 string, arg4 string, arg5 int) (ret int, err error) {
   279  	var _p0 *byte
   280  	_p0, err = BytePtrFromString(arg3)
   281  	if err != nil {
   282  		return
   283  	}
   284  	var _p1 *byte
   285  	_p1, err = BytePtrFromString(arg4)
   286  	if err != nil {
   287  		return
   288  	}
   289  	r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(arg5), 0)
   290  	ret = int(r0)
   291  	if e1 != 0 {
   292  		err = errnoErr(e1)
   293  	}
   294  	return
   295  }
   296  
   297  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   298  
   299  func keyctlIOV(cmd int, arg2 int, payload []Iovec, arg5 int) (err error) {
   300  	var _p0 unsafe.Pointer
   301  	if len(payload) > 0 {
   302  		_p0 = unsafe.Pointer(&payload[0])
   303  	} else {
   304  		_p0 = unsafe.Pointer(&_zero)
   305  	}
   306  	_, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(_p0), uintptr(len(payload)), uintptr(arg5), 0)
   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 keyctlDH(cmd int, arg2 *KeyctlDHParams, buf []byte) (ret int, err error) {
   316  	var _p0 unsafe.Pointer
   317  	if len(buf) > 0 {
   318  		_p0 = unsafe.Pointer(&buf[0])
   319  	} else {
   320  		_p0 = unsafe.Pointer(&_zero)
   321  	}
   322  	r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(unsafe.Pointer(arg2)), uintptr(_p0), uintptr(len(buf)), 0, 0)
   323  	ret = int(r0)
   324  	if e1 != 0 {
   325  		err = errnoErr(e1)
   326  	}
   327  	return
   328  }
   329  
   330  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   331  
   332  func keyctlRestrictKeyringByType(cmd int, arg2 int, keyType string, restriction string) (err error) {
   333  	var _p0 *byte
   334  	_p0, err = BytePtrFromString(keyType)
   335  	if err != nil {
   336  		return
   337  	}
   338  	var _p1 *byte
   339  	_p1, err = BytePtrFromString(restriction)
   340  	if err != nil {
   341  		return
   342  	}
   343  	_, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0, 0)
   344  	if e1 != 0 {
   345  		err = errnoErr(e1)
   346  	}
   347  	return
   348  }
   349  
   350  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   351  
   352  func keyctlRestrictKeyring(cmd int, arg2 int) (err error) {
   353  	_, _, e1 := Syscall(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), 0)
   354  	if e1 != 0 {
   355  		err = errnoErr(e1)
   356  	}
   357  	return
   358  }
   359  
   360  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   361  
   362  func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
   363  	_, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
   364  	if e1 != 0 {
   365  		err = errnoErr(e1)
   366  	}
   367  	return
   368  }
   369  
   370  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   371  
   372  func reboot(magic1 uint, magic2 uint, cmd int, arg string) (err error) {
   373  	var _p0 *byte
   374  	_p0, err = BytePtrFromString(arg)
   375  	if err != nil {
   376  		return
   377  	}
   378  	_, _, e1 := Syscall6(SYS_REBOOT, uintptr(magic1), uintptr(magic2), uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0, 0)
   379  	if e1 != 0 {
   380  		err = errnoErr(e1)
   381  	}
   382  	return
   383  }
   384  
   385  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   386  
   387  func mount(source string, target string, fstype string, flags uintptr, data *byte) (err error) {
   388  	var _p0 *byte
   389  	_p0, err = BytePtrFromString(source)
   390  	if err != nil {
   391  		return
   392  	}
   393  	var _p1 *byte
   394  	_p1, err = BytePtrFromString(target)
   395  	if err != nil {
   396  		return
   397  	}
   398  	var _p2 *byte
   399  	_p2, err = BytePtrFromString(fstype)
   400  	if err != nil {
   401  		return
   402  	}
   403  	_, _, e1 := Syscall6(SYS_MOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(flags), uintptr(unsafe.Pointer(data)), 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 mountSetattr(dirfd int, pathname string, flags uint, attr *MountAttr, size uintptr) (err error) {
   413  	var _p0 *byte
   414  	_p0, err = BytePtrFromString(pathname)
   415  	if err != nil {
   416  		return
   417  	}
   418  	_, _, e1 := Syscall6(SYS_MOUNT_SETATTR, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(unsafe.Pointer(attr)), uintptr(size), 0)
   419  	if e1 != 0 {
   420  		err = errnoErr(e1)
   421  	}
   422  	return
   423  }
   424  
   425  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   426  
   427  func Acct(path string) (err error) {
   428  	var _p0 *byte
   429  	_p0, err = BytePtrFromString(path)
   430  	if err != nil {
   431  		return
   432  	}
   433  	_, _, e1 := Syscall(SYS_ACCT, uintptr(unsafe.Pointer(_p0)), 0, 0)
   434  	if e1 != 0 {
   435  		err = errnoErr(e1)
   436  	}
   437  	return
   438  }
   439  
   440  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   441  
   442  func AddKey(keyType string, description string, payload []byte, ringid int) (id int, err error) {
   443  	var _p0 *byte
   444  	_p0, err = BytePtrFromString(keyType)
   445  	if err != nil {
   446  		return
   447  	}
   448  	var _p1 *byte
   449  	_p1, err = BytePtrFromString(description)
   450  	if err != nil {
   451  		return
   452  	}
   453  	var _p2 unsafe.Pointer
   454  	if len(payload) > 0 {
   455  		_p2 = unsafe.Pointer(&payload[0])
   456  	} else {
   457  		_p2 = unsafe.Pointer(&_zero)
   458  	}
   459  	r0, _, e1 := Syscall6(SYS_ADD_KEY, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(payload)), uintptr(ringid), 0)
   460  	id = int(r0)
   461  	if e1 != 0 {
   462  		err = errnoErr(e1)
   463  	}
   464  	return
   465  }
   466  
   467  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   468  
   469  func Adjtimex(buf *Timex) (state int, err error) {
   470  	r0, _, e1 := Syscall(SYS_ADJTIMEX, uintptr(unsafe.Pointer(buf)), 0, 0)
   471  	state = int(r0)
   472  	if e1 != 0 {
   473  		err = errnoErr(e1)
   474  	}
   475  	return
   476  }
   477  
   478  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   479  
   480  func Capget(hdr *CapUserHeader, data *CapUserData) (err error) {
   481  	_, _, e1 := RawSyscall(SYS_CAPGET, uintptr(unsafe.Pointer(hdr)), uintptr(unsafe.Pointer(data)), 0)
   482  	if e1 != 0 {
   483  		err = errnoErr(e1)
   484  	}
   485  	return
   486  }
   487  
   488  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   489  
   490  func Capset(hdr *CapUserHeader, data *CapUserData) (err error) {
   491  	_, _, e1 := RawSyscall(SYS_CAPSET, uintptr(unsafe.Pointer(hdr)), uintptr(unsafe.Pointer(data)), 0)
   492  	if e1 != 0 {
   493  		err = errnoErr(e1)
   494  	}
   495  	return
   496  }
   497  
   498  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   499  
   500  func Chdir(path string) (err error) {
   501  	var _p0 *byte
   502  	_p0, err = BytePtrFromString(path)
   503  	if err != nil {
   504  		return
   505  	}
   506  	_, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
   507  	if e1 != 0 {
   508  		err = errnoErr(e1)
   509  	}
   510  	return
   511  }
   512  
   513  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   514  
   515  func Chroot(path string) (err error) {
   516  	var _p0 *byte
   517  	_p0, err = BytePtrFromString(path)
   518  	if err != nil {
   519  		return
   520  	}
   521  	_, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
   522  	if e1 != 0 {
   523  		err = errnoErr(e1)
   524  	}
   525  	return
   526  }
   527  
   528  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   529  
   530  func ClockGetres(clockid int32, res *Timespec) (err error) {
   531  	_, _, e1 := Syscall(SYS_CLOCK_GETRES, uintptr(clockid), uintptr(unsafe.Pointer(res)), 0)
   532  	if e1 != 0 {
   533  		err = errnoErr(e1)
   534  	}
   535  	return
   536  }
   537  
   538  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   539  
   540  func ClockGettime(clockid int32, time *Timespec) (err error) {
   541  	_, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0)
   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 ClockNanosleep(clockid int32, flags int, request *Timespec, remain *Timespec) (err error) {
   551  	_, _, e1 := Syscall6(SYS_CLOCK_NANOSLEEP, uintptr(clockid), uintptr(flags), uintptr(unsafe.Pointer(request)), uintptr(unsafe.Pointer(remain)), 0, 0)
   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 Close(fd int) (err error) {
   561  	_, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 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 CloseRange(first uint, last uint, flags uint) (err error) {
   571  	_, _, e1 := Syscall(SYS_CLOSE_RANGE, uintptr(first), uintptr(last), uintptr(flags))
   572  	if e1 != 0 {
   573  		err = errnoErr(e1)
   574  	}
   575  	return
   576  }
   577  
   578  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   579  
   580  func CopyFileRange(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error) {
   581  	r0, _, e1 := Syscall6(SYS_COPY_FILE_RANGE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags))
   582  	n = int(r0)
   583  	if e1 != 0 {
   584  		err = errnoErr(e1)
   585  	}
   586  	return
   587  }
   588  
   589  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   590  
   591  func DeleteModule(name string, flags int) (err error) {
   592  	var _p0 *byte
   593  	_p0, err = BytePtrFromString(name)
   594  	if err != nil {
   595  		return
   596  	}
   597  	_, _, e1 := Syscall(SYS_DELETE_MODULE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
   598  	if e1 != 0 {
   599  		err = errnoErr(e1)
   600  	}
   601  	return
   602  }
   603  
   604  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   605  
   606  func Dup(oldfd int) (fd int, err error) {
   607  	r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 0, 0)
   608  	fd = int(r0)
   609  	if e1 != 0 {
   610  		err = errnoErr(e1)
   611  	}
   612  	return
   613  }
   614  
   615  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   616  
   617  func Dup3(oldfd int, newfd int, flags int) (err error) {
   618  	_, _, e1 := Syscall(SYS_DUP3, uintptr(oldfd), uintptr(newfd), uintptr(flags))
   619  	if e1 != 0 {
   620  		err = errnoErr(e1)
   621  	}
   622  	return
   623  }
   624  
   625  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   626  
   627  func EpollCreate1(flag int) (fd int, err error) {
   628  	r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE1, uintptr(flag), 0, 0)
   629  	fd = int(r0)
   630  	if e1 != 0 {
   631  		err = errnoErr(e1)
   632  	}
   633  	return
   634  }
   635  
   636  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   637  
   638  func EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) {
   639  	_, _, e1 := RawSyscall6(SYS_EPOLL_CTL, uintptr(epfd), uintptr(op), uintptr(fd), uintptr(unsafe.Pointer(event)), 0, 0)
   640  	if e1 != 0 {
   641  		err = errnoErr(e1)
   642  	}
   643  	return
   644  }
   645  
   646  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   647  
   648  func Eventfd(initval uint, flags int) (fd int, err error) {
   649  	r0, _, e1 := Syscall(SYS_EVENTFD2, uintptr(initval), uintptr(flags), 0)
   650  	fd = int(r0)
   651  	if e1 != 0 {
   652  		err = errnoErr(e1)
   653  	}
   654  	return
   655  }
   656  
   657  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   658  
   659  func Exit(code int) {
   660  	SyscallNoError(SYS_EXIT_GROUP, uintptr(code), 0, 0)
   661  	return
   662  }
   663  
   664  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   665  
   666  func Fchdir(fd int) (err error) {
   667  	_, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
   668  	if e1 != 0 {
   669  		err = errnoErr(e1)
   670  	}
   671  	return
   672  }
   673  
   674  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   675  
   676  func Fchmod(fd int, mode uint32) (err error) {
   677  	_, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
   678  	if e1 != 0 {
   679  		err = errnoErr(e1)
   680  	}
   681  	return
   682  }
   683  
   684  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   685  
   686  func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
   687  	var _p0 *byte
   688  	_p0, err = BytePtrFromString(path)
   689  	if err != nil {
   690  		return
   691  	}
   692  	_, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
   693  	if e1 != 0 {
   694  		err = errnoErr(e1)
   695  	}
   696  	return
   697  }
   698  
   699  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   700  
   701  func Fdatasync(fd int) (err error) {
   702  	_, _, e1 := Syscall(SYS_FDATASYNC, uintptr(fd), 0, 0)
   703  	if e1 != 0 {
   704  		err = errnoErr(e1)
   705  	}
   706  	return
   707  }
   708  
   709  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   710  
   711  func Fgetxattr(fd int, attr string, dest []byte) (sz int, err error) {
   712  	var _p0 *byte
   713  	_p0, err = BytePtrFromString(attr)
   714  	if err != nil {
   715  		return
   716  	}
   717  	var _p1 unsafe.Pointer
   718  	if len(dest) > 0 {
   719  		_p1 = unsafe.Pointer(&dest[0])
   720  	} else {
   721  		_p1 = unsafe.Pointer(&_zero)
   722  	}
   723  	r0, _, e1 := Syscall6(SYS_FGETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), 0, 0)
   724  	sz = int(r0)
   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 FinitModule(fd int, params string, flags int) (err error) {
   734  	var _p0 *byte
   735  	_p0, err = BytePtrFromString(params)
   736  	if err != nil {
   737  		return
   738  	}
   739  	_, _, e1 := Syscall(SYS_FINIT_MODULE, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
   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 Flistxattr(fd int, dest []byte) (sz int, err error) {
   749  	var _p0 unsafe.Pointer
   750  	if len(dest) > 0 {
   751  		_p0 = unsafe.Pointer(&dest[0])
   752  	} else {
   753  		_p0 = unsafe.Pointer(&_zero)
   754  	}
   755  	r0, _, e1 := Syscall(SYS_FLISTXATTR, uintptr(fd), uintptr(_p0), uintptr(len(dest)))
   756  	sz = int(r0)
   757  	if e1 != 0 {
   758  		err = errnoErr(e1)
   759  	}
   760  	return
   761  }
   762  
   763  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   764  
   765  func Flock(fd int, how int) (err error) {
   766  	_, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
   767  	if e1 != 0 {
   768  		err = errnoErr(e1)
   769  	}
   770  	return
   771  }
   772  
   773  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   774  
   775  func Fremovexattr(fd int, attr string) (err error) {
   776  	var _p0 *byte
   777  	_p0, err = BytePtrFromString(attr)
   778  	if err != nil {
   779  		return
   780  	}
   781  	_, _, e1 := Syscall(SYS_FREMOVEXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), 0)
   782  	if e1 != 0 {
   783  		err = errnoErr(e1)
   784  	}
   785  	return
   786  }
   787  
   788  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   789  
   790  func Fsetxattr(fd int, attr string, dest []byte, flags int) (err error) {
   791  	var _p0 *byte
   792  	_p0, err = BytePtrFromString(attr)
   793  	if err != nil {
   794  		return
   795  	}
   796  	var _p1 unsafe.Pointer
   797  	if len(dest) > 0 {
   798  		_p1 = unsafe.Pointer(&dest[0])
   799  	} else {
   800  		_p1 = unsafe.Pointer(&_zero)
   801  	}
   802  	_, _, e1 := Syscall6(SYS_FSETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), uintptr(flags), 0)
   803  	if e1 != 0 {
   804  		err = errnoErr(e1)
   805  	}
   806  	return
   807  }
   808  
   809  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   810  
   811  func Fsync(fd int) (err error) {
   812  	_, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
   813  	if e1 != 0 {
   814  		err = errnoErr(e1)
   815  	}
   816  	return
   817  }
   818  
   819  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   820  
   821  func Getdents(fd int, buf []byte) (n int, err error) {
   822  	var _p0 unsafe.Pointer
   823  	if len(buf) > 0 {
   824  		_p0 = unsafe.Pointer(&buf[0])
   825  	} else {
   826  		_p0 = unsafe.Pointer(&_zero)
   827  	}
   828  	r0, _, e1 := Syscall(SYS_GETDENTS64, uintptr(fd), uintptr(_p0), uintptr(len(buf)))
   829  	n = int(r0)
   830  	if e1 != 0 {
   831  		err = errnoErr(e1)
   832  	}
   833  	return
   834  }
   835  
   836  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   837  
   838  func Getpgid(pid int) (pgid int, err error) {
   839  	r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
   840  	pgid = int(r0)
   841  	if e1 != 0 {
   842  		err = errnoErr(e1)
   843  	}
   844  	return
   845  }
   846  
   847  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   848  
   849  func Getpid() (pid int) {
   850  	r0, _ := RawSyscallNoError(SYS_GETPID, 0, 0, 0)
   851  	pid = int(r0)
   852  	return
   853  }
   854  
   855  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   856  
   857  func Getppid() (ppid int) {
   858  	r0, _ := RawSyscallNoError(SYS_GETPPID, 0, 0, 0)
   859  	ppid = int(r0)
   860  	return
   861  }
   862  
   863  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   864  
   865  func Getpriority(which int, who int) (prio int, err error) {
   866  	r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
   867  	prio = int(r0)
   868  	if e1 != 0 {
   869  		err = errnoErr(e1)
   870  	}
   871  	return
   872  }
   873  
   874  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   875  
   876  func Getrandom(buf []byte, flags int) (n int, err error) {
   877  	var _p0 unsafe.Pointer
   878  	if len(buf) > 0 {
   879  		_p0 = unsafe.Pointer(&buf[0])
   880  	} else {
   881  		_p0 = unsafe.Pointer(&_zero)
   882  	}
   883  	r0, _, e1 := Syscall(SYS_GETRANDOM, uintptr(_p0), uintptr(len(buf)), uintptr(flags))
   884  	n = int(r0)
   885  	if e1 != 0 {
   886  		err = errnoErr(e1)
   887  	}
   888  	return
   889  }
   890  
   891  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   892  
   893  func Getrusage(who int, rusage *Rusage) (err error) {
   894  	_, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
   895  	if e1 != 0 {
   896  		err = errnoErr(e1)
   897  	}
   898  	return
   899  }
   900  
   901  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   902  
   903  func Getsid(pid int) (sid int, err error) {
   904  	r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
   905  	sid = int(r0)
   906  	if e1 != 0 {
   907  		err = errnoErr(e1)
   908  	}
   909  	return
   910  }
   911  
   912  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   913  
   914  func Gettid() (tid int) {
   915  	r0, _ := RawSyscallNoError(SYS_GETTID, 0, 0, 0)
   916  	tid = int(r0)
   917  	return
   918  }
   919  
   920  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   921  
   922  func Getxattr(path string, attr string, dest []byte) (sz int, err error) {
   923  	var _p0 *byte
   924  	_p0, err = BytePtrFromString(path)
   925  	if err != nil {
   926  		return
   927  	}
   928  	var _p1 *byte
   929  	_p1, err = BytePtrFromString(attr)
   930  	if err != nil {
   931  		return
   932  	}
   933  	var _p2 unsafe.Pointer
   934  	if len(dest) > 0 {
   935  		_p2 = unsafe.Pointer(&dest[0])
   936  	} else {
   937  		_p2 = unsafe.Pointer(&_zero)
   938  	}
   939  	r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0)
   940  	sz = int(r0)
   941  	if e1 != 0 {
   942  		err = errnoErr(e1)
   943  	}
   944  	return
   945  }
   946  
   947  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   948  
   949  func InitModule(moduleImage []byte, params string) (err error) {
   950  	var _p0 unsafe.Pointer
   951  	if len(moduleImage) > 0 {
   952  		_p0 = unsafe.Pointer(&moduleImage[0])
   953  	} else {
   954  		_p0 = unsafe.Pointer(&_zero)
   955  	}
   956  	var _p1 *byte
   957  	_p1, err = BytePtrFromString(params)
   958  	if err != nil {
   959  		return
   960  	}
   961  	_, _, e1 := Syscall(SYS_INIT_MODULE, uintptr(_p0), uintptr(len(moduleImage)), uintptr(unsafe.Pointer(_p1)))
   962  	if e1 != 0 {
   963  		err = errnoErr(e1)
   964  	}
   965  	return
   966  }
   967  
   968  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   969  
   970  func InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) {
   971  	var _p0 *byte
   972  	_p0, err = BytePtrFromString(pathname)
   973  	if err != nil {
   974  		return
   975  	}
   976  	r0, _, e1 := Syscall(SYS_INOTIFY_ADD_WATCH, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mask))
   977  	watchdesc = int(r0)
   978  	if e1 != 0 {
   979  		err = errnoErr(e1)
   980  	}
   981  	return
   982  }
   983  
   984  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   985  
   986  func InotifyInit1(flags int) (fd int, err error) {
   987  	r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT1, uintptr(flags), 0, 0)
   988  	fd = int(r0)
   989  	if e1 != 0 {
   990  		err = errnoErr(e1)
   991  	}
   992  	return
   993  }
   994  
   995  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   996  
   997  func InotifyRmWatch(fd int, watchdesc uint32) (success int, err error) {
   998  	r0, _, e1 := RawSyscall(SYS_INOTIFY_RM_WATCH, uintptr(fd), uintptr(watchdesc), 0)
   999  	success = int(r0)
  1000  	if e1 != 0 {
  1001  		err = errnoErr(e1)
  1002  	}
  1003  	return
  1004  }
  1005  
  1006  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1007  
  1008  func Kill(pid int, sig syscall.Signal) (err error) {
  1009  	_, _, e1 := RawSyscall(SYS_KILL, uintptr(pid), uintptr(sig), 0)
  1010  	if e1 != 0 {
  1011  		err = errnoErr(e1)
  1012  	}
  1013  	return
  1014  }
  1015  
  1016  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1017  
  1018  func Klogctl(typ int, buf []byte) (n int, err error) {
  1019  	var _p0 unsafe.Pointer
  1020  	if len(buf) > 0 {
  1021  		_p0 = unsafe.Pointer(&buf[0])
  1022  	} else {
  1023  		_p0 = unsafe.Pointer(&_zero)
  1024  	}
  1025  	r0, _, e1 := Syscall(SYS_SYSLOG, uintptr(typ), uintptr(_p0), uintptr(len(buf)))
  1026  	n = int(r0)
  1027  	if e1 != 0 {
  1028  		err = errnoErr(e1)
  1029  	}
  1030  	return
  1031  }
  1032  
  1033  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1034  
  1035  func Lgetxattr(path string, attr string, dest []byte) (sz int, err error) {
  1036  	var _p0 *byte
  1037  	_p0, err = BytePtrFromString(path)
  1038  	if err != nil {
  1039  		return
  1040  	}
  1041  	var _p1 *byte
  1042  	_p1, err = BytePtrFromString(attr)
  1043  	if err != nil {
  1044  		return
  1045  	}
  1046  	var _p2 unsafe.Pointer
  1047  	if len(dest) > 0 {
  1048  		_p2 = unsafe.Pointer(&dest[0])
  1049  	} else {
  1050  		_p2 = unsafe.Pointer(&_zero)
  1051  	}
  1052  	r0, _, e1 := Syscall6(SYS_LGETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0)
  1053  	sz = int(r0)
  1054  	if e1 != 0 {
  1055  		err = errnoErr(e1)
  1056  	}
  1057  	return
  1058  }
  1059  
  1060  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1061  
  1062  func Listxattr(path string, dest []byte) (sz int, err error) {
  1063  	var _p0 *byte
  1064  	_p0, err = BytePtrFromString(path)
  1065  	if err != nil {
  1066  		return
  1067  	}
  1068  	var _p1 unsafe.Pointer
  1069  	if len(dest) > 0 {
  1070  		_p1 = unsafe.Pointer(&dest[0])
  1071  	} else {
  1072  		_p1 = unsafe.Pointer(&_zero)
  1073  	}
  1074  	r0, _, e1 := Syscall(SYS_LISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)))
  1075  	sz = int(r0)
  1076  	if e1 != 0 {
  1077  		err = errnoErr(e1)
  1078  	}
  1079  	return
  1080  }
  1081  
  1082  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1083  
  1084  func Llistxattr(path string, dest []byte) (sz int, err error) {
  1085  	var _p0 *byte
  1086  	_p0, err = BytePtrFromString(path)
  1087  	if err != nil {
  1088  		return
  1089  	}
  1090  	var _p1 unsafe.Pointer
  1091  	if len(dest) > 0 {
  1092  		_p1 = unsafe.Pointer(&dest[0])
  1093  	} else {
  1094  		_p1 = unsafe.Pointer(&_zero)
  1095  	}
  1096  	r0, _, e1 := Syscall(SYS_LLISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)))
  1097  	sz = int(r0)
  1098  	if e1 != 0 {
  1099  		err = errnoErr(e1)
  1100  	}
  1101  	return
  1102  }
  1103  
  1104  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1105  
  1106  func Lremovexattr(path string, attr string) (err error) {
  1107  	var _p0 *byte
  1108  	_p0, err = BytePtrFromString(path)
  1109  	if err != nil {
  1110  		return
  1111  	}
  1112  	var _p1 *byte
  1113  	_p1, err = BytePtrFromString(attr)
  1114  	if err != nil {
  1115  		return
  1116  	}
  1117  	_, _, e1 := Syscall(SYS_LREMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
  1118  	if e1 != 0 {
  1119  		err = errnoErr(e1)
  1120  	}
  1121  	return
  1122  }
  1123  
  1124  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1125  
  1126  func Lsetxattr(path string, attr string, data []byte, flags int) (err error) {
  1127  	var _p0 *byte
  1128  	_p0, err = BytePtrFromString(path)
  1129  	if err != nil {
  1130  		return
  1131  	}
  1132  	var _p1 *byte
  1133  	_p1, err = BytePtrFromString(attr)
  1134  	if err != nil {
  1135  		return
  1136  	}
  1137  	var _p2 unsafe.Pointer
  1138  	if len(data) > 0 {
  1139  		_p2 = unsafe.Pointer(&data[0])
  1140  	} else {
  1141  		_p2 = unsafe.Pointer(&_zero)
  1142  	}
  1143  	_, _, e1 := Syscall6(SYS_LSETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0)
  1144  	if e1 != 0 {
  1145  		err = errnoErr(e1)
  1146  	}
  1147  	return
  1148  }
  1149  
  1150  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1151  
  1152  func MemfdCreate(name string, flags int) (fd int, err error) {
  1153  	var _p0 *byte
  1154  	_p0, err = BytePtrFromString(name)
  1155  	if err != nil {
  1156  		return
  1157  	}
  1158  	r0, _, e1 := Syscall(SYS_MEMFD_CREATE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
  1159  	fd = int(r0)
  1160  	if e1 != 0 {
  1161  		err = errnoErr(e1)
  1162  	}
  1163  	return
  1164  }
  1165  
  1166  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1167  
  1168  func Mkdirat(dirfd int, path string, mode uint32) (err error) {
  1169  	var _p0 *byte
  1170  	_p0, err = BytePtrFromString(path)
  1171  	if err != nil {
  1172  		return
  1173  	}
  1174  	_, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
  1175  	if e1 != 0 {
  1176  		err = errnoErr(e1)
  1177  	}
  1178  	return
  1179  }
  1180  
  1181  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1182  
  1183  func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {
  1184  	var _p0 *byte
  1185  	_p0, err = BytePtrFromString(path)
  1186  	if err != nil {
  1187  		return
  1188  	}
  1189  	_, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
  1190  	if e1 != 0 {
  1191  		err = errnoErr(e1)
  1192  	}
  1193  	return
  1194  }
  1195  
  1196  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1197  
  1198  func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
  1199  	_, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
  1200  	if e1 != 0 {
  1201  		err = errnoErr(e1)
  1202  	}
  1203  	return
  1204  }
  1205  
  1206  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1207  
  1208  func PerfEventOpen(attr *PerfEventAttr, pid int, cpu int, groupFd int, flags int) (fd int, err error) {
  1209  	r0, _, e1 := Syscall6(SYS_PERF_EVENT_OPEN, uintptr(unsafe.Pointer(attr)), uintptr(pid), uintptr(cpu), uintptr(groupFd), uintptr(flags), 0)
  1210  	fd = int(r0)
  1211  	if e1 != 0 {
  1212  		err = errnoErr(e1)
  1213  	}
  1214  	return
  1215  }
  1216  
  1217  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1218  
  1219  func PivotRoot(newroot string, putold string) (err error) {
  1220  	var _p0 *byte
  1221  	_p0, err = BytePtrFromString(newroot)
  1222  	if err != nil {
  1223  		return
  1224  	}
  1225  	var _p1 *byte
  1226  	_p1, err = BytePtrFromString(putold)
  1227  	if err != nil {
  1228  		return
  1229  	}
  1230  	_, _, e1 := Syscall(SYS_PIVOT_ROOT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
  1231  	if e1 != 0 {
  1232  		err = errnoErr(e1)
  1233  	}
  1234  	return
  1235  }
  1236  
  1237  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1238  
  1239  func Prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) {
  1240  	_, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(newlimit)), uintptr(unsafe.Pointer(old)), 0, 0)
  1241  	if e1 != 0 {
  1242  		err = errnoErr(e1)
  1243  	}
  1244  	return
  1245  }
  1246  
  1247  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1248  
  1249  func Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error) {
  1250  	_, _, e1 := Syscall6(SYS_PRCTL, uintptr(option), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 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 Pselect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
  1260  	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)))
  1261  	n = int(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 read(fd int, p []byte) (n int, err error) {
  1271  	var _p0 unsafe.Pointer
  1272  	if len(p) > 0 {
  1273  		_p0 = unsafe.Pointer(&p[0])
  1274  	} else {
  1275  		_p0 = unsafe.Pointer(&_zero)
  1276  	}
  1277  	r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
  1278  	n = int(r0)
  1279  	if e1 != 0 {
  1280  		err = errnoErr(e1)
  1281  	}
  1282  	return
  1283  }
  1284  
  1285  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1286  
  1287  func Removexattr(path string, attr string) (err error) {
  1288  	var _p0 *byte
  1289  	_p0, err = BytePtrFromString(path)
  1290  	if err != nil {
  1291  		return
  1292  	}
  1293  	var _p1 *byte
  1294  	_p1, err = BytePtrFromString(attr)
  1295  	if err != nil {
  1296  		return
  1297  	}
  1298  	_, _, e1 := Syscall(SYS_REMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
  1299  	if e1 != 0 {
  1300  		err = errnoErr(e1)
  1301  	}
  1302  	return
  1303  }
  1304  
  1305  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1306  
  1307  func Renameat2(olddirfd int, oldpath string, newdirfd int, newpath string, flags uint) (err error) {
  1308  	var _p0 *byte
  1309  	_p0, err = BytePtrFromString(oldpath)
  1310  	if err != nil {
  1311  		return
  1312  	}
  1313  	var _p1 *byte
  1314  	_p1, err = BytePtrFromString(newpath)
  1315  	if err != nil {
  1316  		return
  1317  	}
  1318  	_, _, e1 := Syscall6(SYS_RENAMEAT2, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
  1319  	if e1 != 0 {
  1320  		err = errnoErr(e1)
  1321  	}
  1322  	return
  1323  }
  1324  
  1325  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1326  
  1327  func RequestKey(keyType string, description string, callback string, destRingid int) (id int, err error) {
  1328  	var _p0 *byte
  1329  	_p0, err = BytePtrFromString(keyType)
  1330  	if err != nil {
  1331  		return
  1332  	}
  1333  	var _p1 *byte
  1334  	_p1, err = BytePtrFromString(description)
  1335  	if err != nil {
  1336  		return
  1337  	}
  1338  	var _p2 *byte
  1339  	_p2, err = BytePtrFromString(callback)
  1340  	if err != nil {
  1341  		return
  1342  	}
  1343  	r0, _, e1 := Syscall6(SYS_REQUEST_KEY, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(destRingid), 0, 0)
  1344  	id = int(r0)
  1345  	if e1 != 0 {
  1346  		err = errnoErr(e1)
  1347  	}
  1348  	return
  1349  }
  1350  
  1351  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1352  
  1353  func Setdomainname(p []byte) (err error) {
  1354  	var _p0 unsafe.Pointer
  1355  	if len(p) > 0 {
  1356  		_p0 = unsafe.Pointer(&p[0])
  1357  	} else {
  1358  		_p0 = unsafe.Pointer(&_zero)
  1359  	}
  1360  	_, _, e1 := Syscall(SYS_SETDOMAINNAME, uintptr(_p0), uintptr(len(p)), 0)
  1361  	if e1 != 0 {
  1362  		err = errnoErr(e1)
  1363  	}
  1364  	return
  1365  }
  1366  
  1367  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1368  
  1369  func Sethostname(p []byte) (err error) {
  1370  	var _p0 unsafe.Pointer
  1371  	if len(p) > 0 {
  1372  		_p0 = unsafe.Pointer(&p[0])
  1373  	} else {
  1374  		_p0 = unsafe.Pointer(&_zero)
  1375  	}
  1376  	_, _, e1 := Syscall(SYS_SETHOSTNAME, uintptr(_p0), uintptr(len(p)), 0)
  1377  	if e1 != 0 {
  1378  		err = errnoErr(e1)
  1379  	}
  1380  	return
  1381  }
  1382  
  1383  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1384  
  1385  func Setpgid(pid int, pgid int) (err error) {
  1386  	_, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
  1387  	if e1 != 0 {
  1388  		err = errnoErr(e1)
  1389  	}
  1390  	return
  1391  }
  1392  
  1393  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1394  
  1395  func Setsid() (pid int, err error) {
  1396  	r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
  1397  	pid = int(r0)
  1398  	if e1 != 0 {
  1399  		err = errnoErr(e1)
  1400  	}
  1401  	return
  1402  }
  1403  
  1404  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1405  
  1406  func Settimeofday(tv *Timeval) (err error) {
  1407  	_, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
  1408  	if e1 != 0 {
  1409  		err = errnoErr(e1)
  1410  	}
  1411  	return
  1412  }
  1413  
  1414  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1415  
  1416  func Setns(fd int, nstype int) (err error) {
  1417  	_, _, e1 := Syscall(SYS_SETNS, uintptr(fd), uintptr(nstype), 0)
  1418  	if e1 != 0 {
  1419  		err = errnoErr(e1)
  1420  	}
  1421  	return
  1422  }
  1423  
  1424  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1425  
  1426  func Setpriority(which int, who int, prio int) (err error) {
  1427  	_, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
  1428  	if e1 != 0 {
  1429  		err = errnoErr(e1)
  1430  	}
  1431  	return
  1432  }
  1433  
  1434  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1435  
  1436  func Setxattr(path string, attr string, data []byte, flags int) (err error) {
  1437  	var _p0 *byte
  1438  	_p0, err = BytePtrFromString(path)
  1439  	if err != nil {
  1440  		return
  1441  	}
  1442  	var _p1 *byte
  1443  	_p1, err = BytePtrFromString(attr)
  1444  	if err != nil {
  1445  		return
  1446  	}
  1447  	var _p2 unsafe.Pointer
  1448  	if len(data) > 0 {
  1449  		_p2 = unsafe.Pointer(&data[0])
  1450  	} else {
  1451  		_p2 = unsafe.Pointer(&_zero)
  1452  	}
  1453  	_, _, e1 := Syscall6(SYS_SETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0)
  1454  	if e1 != 0 {
  1455  		err = errnoErr(e1)
  1456  	}
  1457  	return
  1458  }
  1459  
  1460  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1461  
  1462  func signalfd(fd int, sigmask *Sigset_t, maskSize uintptr, flags int) (newfd int, err error) {
  1463  	r0, _, e1 := Syscall6(SYS_SIGNALFD4, uintptr(fd), uintptr(unsafe.Pointer(sigmask)), uintptr(maskSize), uintptr(flags), 0, 0)
  1464  	newfd = int(r0)
  1465  	if e1 != 0 {
  1466  		err = errnoErr(e1)
  1467  	}
  1468  	return
  1469  }
  1470  
  1471  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1472  
  1473  func Statx(dirfd int, path string, flags int, mask int, stat *Statx_t) (err error) {
  1474  	var _p0 *byte
  1475  	_p0, err = BytePtrFromString(path)
  1476  	if err != nil {
  1477  		return
  1478  	}
  1479  	_, _, e1 := Syscall6(SYS_STATX, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mask), uintptr(unsafe.Pointer(stat)), 0)
  1480  	if e1 != 0 {
  1481  		err = errnoErr(e1)
  1482  	}
  1483  	return
  1484  }
  1485  
  1486  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1487  
  1488  func Sync() {
  1489  	SyscallNoError(SYS_SYNC, 0, 0, 0)
  1490  	return
  1491  }
  1492  
  1493  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1494  
  1495  func Syncfs(fd int) (err error) {
  1496  	_, _, e1 := Syscall(SYS_SYNCFS, uintptr(fd), 0, 0)
  1497  	if e1 != 0 {
  1498  		err = errnoErr(e1)
  1499  	}
  1500  	return
  1501  }
  1502  
  1503  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1504  
  1505  func Sysinfo(info *Sysinfo_t) (err error) {
  1506  	_, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0)
  1507  	if e1 != 0 {
  1508  		err = errnoErr(e1)
  1509  	}
  1510  	return
  1511  }
  1512  
  1513  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1514  
  1515  func TimerfdCreate(clockid int, flags int) (fd int, err error) {
  1516  	r0, _, e1 := RawSyscall(SYS_TIMERFD_CREATE, uintptr(clockid), uintptr(flags), 0)
  1517  	fd = int(r0)
  1518  	if e1 != 0 {
  1519  		err = errnoErr(e1)
  1520  	}
  1521  	return
  1522  }
  1523  
  1524  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1525  
  1526  func TimerfdGettime(fd int, currValue *ItimerSpec) (err error) {
  1527  	_, _, e1 := RawSyscall(SYS_TIMERFD_GETTIME, uintptr(fd), uintptr(unsafe.Pointer(currValue)), 0)
  1528  	if e1 != 0 {
  1529  		err = errnoErr(e1)
  1530  	}
  1531  	return
  1532  }
  1533  
  1534  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1535  
  1536  func TimerfdSettime(fd int, flags int, newValue *ItimerSpec, oldValue *ItimerSpec) (err error) {
  1537  	_, _, e1 := RawSyscall6(SYS_TIMERFD_SETTIME, uintptr(fd), uintptr(flags), uintptr(unsafe.Pointer(newValue)), uintptr(unsafe.Pointer(oldValue)), 0, 0)
  1538  	if e1 != 0 {
  1539  		err = errnoErr(e1)
  1540  	}
  1541  	return
  1542  }
  1543  
  1544  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1545  
  1546  func Tgkill(tgid int, tid int, sig syscall.Signal) (err error) {
  1547  	_, _, e1 := RawSyscall(SYS_TGKILL, uintptr(tgid), uintptr(tid), uintptr(sig))
  1548  	if e1 != 0 {
  1549  		err = errnoErr(e1)
  1550  	}
  1551  	return
  1552  }
  1553  
  1554  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1555  
  1556  func Times(tms *Tms) (ticks uintptr, err error) {
  1557  	r0, _, e1 := RawSyscall(SYS_TIMES, uintptr(unsafe.Pointer(tms)), 0, 0)
  1558  	ticks = uintptr(r0)
  1559  	if e1 != 0 {
  1560  		err = errnoErr(e1)
  1561  	}
  1562  	return
  1563  }
  1564  
  1565  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1566  
  1567  func Umask(mask int) (oldmask int) {
  1568  	r0, _ := RawSyscallNoError(SYS_UMASK, uintptr(mask), 0, 0)
  1569  	oldmask = int(r0)
  1570  	return
  1571  }
  1572  
  1573  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1574  
  1575  func Uname(buf *Utsname) (err error) {
  1576  	_, _, e1 := RawSyscall(SYS_UNAME, uintptr(unsafe.Pointer(buf)), 0, 0)
  1577  	if e1 != 0 {
  1578  		err = errnoErr(e1)
  1579  	}
  1580  	return
  1581  }
  1582  
  1583  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1584  
  1585  func Unmount(target string, flags int) (err error) {
  1586  	var _p0 *byte
  1587  	_p0, err = BytePtrFromString(target)
  1588  	if err != nil {
  1589  		return
  1590  	}
  1591  	_, _, e1 := Syscall(SYS_UMOUNT2, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
  1592  	if e1 != 0 {
  1593  		err = errnoErr(e1)
  1594  	}
  1595  	return
  1596  }
  1597  
  1598  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1599  
  1600  func Unshare(flags int) (err error) {
  1601  	_, _, e1 := Syscall(SYS_UNSHARE, uintptr(flags), 0, 0)
  1602  	if e1 != 0 {
  1603  		err = errnoErr(e1)
  1604  	}
  1605  	return
  1606  }
  1607  
  1608  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1609  
  1610  func write(fd int, p []byte) (n int, err error) {
  1611  	var _p0 unsafe.Pointer
  1612  	if len(p) > 0 {
  1613  		_p0 = unsafe.Pointer(&p[0])
  1614  	} else {
  1615  		_p0 = unsafe.Pointer(&_zero)
  1616  	}
  1617  	r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
  1618  	n = int(r0)
  1619  	if e1 != 0 {
  1620  		err = errnoErr(e1)
  1621  	}
  1622  	return
  1623  }
  1624  
  1625  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1626  
  1627  func exitThread(code int) (err error) {
  1628  	_, _, e1 := Syscall(SYS_EXIT, uintptr(code), 0, 0)
  1629  	if e1 != 0 {
  1630  		err = errnoErr(e1)
  1631  	}
  1632  	return
  1633  }
  1634  
  1635  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1636  
  1637  func readlen(fd int, p *byte, np int) (n int, err error) {
  1638  	r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
  1639  	n = int(r0)
  1640  	if e1 != 0 {
  1641  		err = errnoErr(e1)
  1642  	}
  1643  	return
  1644  }
  1645  
  1646  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1647  
  1648  func writelen(fd int, p *byte, np int) (n int, err error) {
  1649  	r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
  1650  	n = int(r0)
  1651  	if e1 != 0 {
  1652  		err = errnoErr(e1)
  1653  	}
  1654  	return
  1655  }
  1656  
  1657  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1658  
  1659  func readv(fd int, iovs []Iovec) (n int, err error) {
  1660  	var _p0 unsafe.Pointer
  1661  	if len(iovs) > 0 {
  1662  		_p0 = unsafe.Pointer(&iovs[0])
  1663  	} else {
  1664  		_p0 = unsafe.Pointer(&_zero)
  1665  	}
  1666  	r0, _, e1 := Syscall(SYS_READV, uintptr(fd), uintptr(_p0), uintptr(len(iovs)))
  1667  	n = int(r0)
  1668  	if e1 != 0 {
  1669  		err = errnoErr(e1)
  1670  	}
  1671  	return
  1672  }
  1673  
  1674  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1675  
  1676  func writev(fd int, iovs []Iovec) (n int, err error) {
  1677  	var _p0 unsafe.Pointer
  1678  	if len(iovs) > 0 {
  1679  		_p0 = unsafe.Pointer(&iovs[0])
  1680  	} else {
  1681  		_p0 = unsafe.Pointer(&_zero)
  1682  	}
  1683  	r0, _, e1 := Syscall(SYS_WRITEV, uintptr(fd), uintptr(_p0), uintptr(len(iovs)))
  1684  	n = int(r0)
  1685  	if e1 != 0 {
  1686  		err = errnoErr(e1)
  1687  	}
  1688  	return
  1689  }
  1690  
  1691  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1692  
  1693  func preadv(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr) (n int, err error) {
  1694  	var _p0 unsafe.Pointer
  1695  	if len(iovs) > 0 {
  1696  		_p0 = unsafe.Pointer(&iovs[0])
  1697  	} else {
  1698  		_p0 = unsafe.Pointer(&_zero)
  1699  	}
  1700  	r0, _, e1 := Syscall6(SYS_PREADV, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), 0)
  1701  	n = int(r0)
  1702  	if e1 != 0 {
  1703  		err = errnoErr(e1)
  1704  	}
  1705  	return
  1706  }
  1707  
  1708  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1709  
  1710  func pwritev(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr) (n int, err error) {
  1711  	var _p0 unsafe.Pointer
  1712  	if len(iovs) > 0 {
  1713  		_p0 = unsafe.Pointer(&iovs[0])
  1714  	} else {
  1715  		_p0 = unsafe.Pointer(&_zero)
  1716  	}
  1717  	r0, _, e1 := Syscall6(SYS_PWRITEV, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), 0)
  1718  	n = int(r0)
  1719  	if e1 != 0 {
  1720  		err = errnoErr(e1)
  1721  	}
  1722  	return
  1723  }
  1724  
  1725  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1726  
  1727  func preadv2(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr, flags int) (n int, err error) {
  1728  	var _p0 unsafe.Pointer
  1729  	if len(iovs) > 0 {
  1730  		_p0 = unsafe.Pointer(&iovs[0])
  1731  	} else {
  1732  		_p0 = unsafe.Pointer(&_zero)
  1733  	}
  1734  	r0, _, e1 := Syscall6(SYS_PREADV2, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), uintptr(flags))
  1735  	n = int(r0)
  1736  	if e1 != 0 {
  1737  		err = errnoErr(e1)
  1738  	}
  1739  	return
  1740  }
  1741  
  1742  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1743  
  1744  func pwritev2(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr, flags int) (n int, err error) {
  1745  	var _p0 unsafe.Pointer
  1746  	if len(iovs) > 0 {
  1747  		_p0 = unsafe.Pointer(&iovs[0])
  1748  	} else {
  1749  		_p0 = unsafe.Pointer(&_zero)
  1750  	}
  1751  	r0, _, e1 := Syscall6(SYS_PWRITEV2, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), uintptr(flags))
  1752  	n = int(r0)
  1753  	if e1 != 0 {
  1754  		err = errnoErr(e1)
  1755  	}
  1756  	return
  1757  }
  1758  
  1759  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1760  
  1761  func munmap(addr uintptr, length uintptr) (err error) {
  1762  	_, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
  1763  	if e1 != 0 {
  1764  		err = errnoErr(e1)
  1765  	}
  1766  	return
  1767  }
  1768  
  1769  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1770  
  1771  func Madvise(b []byte, advice int) (err error) {
  1772  	var _p0 unsafe.Pointer
  1773  	if len(b) > 0 {
  1774  		_p0 = unsafe.Pointer(&b[0])
  1775  	} else {
  1776  		_p0 = unsafe.Pointer(&_zero)
  1777  	}
  1778  	_, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(advice))
  1779  	if e1 != 0 {
  1780  		err = errnoErr(e1)
  1781  	}
  1782  	return
  1783  }
  1784  
  1785  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1786  
  1787  func Mprotect(b []byte, prot int) (err error) {
  1788  	var _p0 unsafe.Pointer
  1789  	if len(b) > 0 {
  1790  		_p0 = unsafe.Pointer(&b[0])
  1791  	} else {
  1792  		_p0 = unsafe.Pointer(&_zero)
  1793  	}
  1794  	_, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
  1795  	if e1 != 0 {
  1796  		err = errnoErr(e1)
  1797  	}
  1798  	return
  1799  }
  1800  
  1801  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1802  
  1803  func Mlock(b []byte) (err error) {
  1804  	var _p0 unsafe.Pointer
  1805  	if len(b) > 0 {
  1806  		_p0 = unsafe.Pointer(&b[0])
  1807  	} else {
  1808  		_p0 = unsafe.Pointer(&_zero)
  1809  	}
  1810  	_, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
  1811  	if e1 != 0 {
  1812  		err = errnoErr(e1)
  1813  	}
  1814  	return
  1815  }
  1816  
  1817  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1818  
  1819  func Mlockall(flags int) (err error) {
  1820  	_, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
  1821  	if e1 != 0 {
  1822  		err = errnoErr(e1)
  1823  	}
  1824  	return
  1825  }
  1826  
  1827  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1828  
  1829  func Msync(b []byte, flags int) (err error) {
  1830  	var _p0 unsafe.Pointer
  1831  	if len(b) > 0 {
  1832  		_p0 = unsafe.Pointer(&b[0])
  1833  	} else {
  1834  		_p0 = unsafe.Pointer(&_zero)
  1835  	}
  1836  	_, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags))
  1837  	if e1 != 0 {
  1838  		err = errnoErr(e1)
  1839  	}
  1840  	return
  1841  }
  1842  
  1843  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1844  
  1845  func Munlock(b []byte) (err error) {
  1846  	var _p0 unsafe.Pointer
  1847  	if len(b) > 0 {
  1848  		_p0 = unsafe.Pointer(&b[0])
  1849  	} else {
  1850  		_p0 = unsafe.Pointer(&_zero)
  1851  	}
  1852  	_, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
  1853  	if e1 != 0 {
  1854  		err = errnoErr(e1)
  1855  	}
  1856  	return
  1857  }
  1858  
  1859  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1860  
  1861  func Munlockall() (err error) {
  1862  	_, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
  1863  	if e1 != 0 {
  1864  		err = errnoErr(e1)
  1865  	}
  1866  	return
  1867  }
  1868  
  1869  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1870  
  1871  func faccessat(dirfd int, path string, mode uint32) (err error) {
  1872  	var _p0 *byte
  1873  	_p0, err = BytePtrFromString(path)
  1874  	if err != nil {
  1875  		return
  1876  	}
  1877  	_, _, e1 := Syscall(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
  1878  	if e1 != 0 {
  1879  		err = errnoErr(e1)
  1880  	}
  1881  	return
  1882  }
  1883  
  1884  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1885  
  1886  func Faccessat2(dirfd int, path string, mode uint32, flags int) (err error) {
  1887  	var _p0 *byte
  1888  	_p0, err = BytePtrFromString(path)
  1889  	if err != nil {
  1890  		return
  1891  	}
  1892  	_, _, e1 := Syscall6(SYS_FACCESSAT2, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
  1893  	if e1 != 0 {
  1894  		err = errnoErr(e1)
  1895  	}
  1896  	return
  1897  }
  1898  
  1899  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1900  
  1901  func nameToHandleAt(dirFD int, pathname string, fh *fileHandle, mountID *_C_int, flags int) (err error) {
  1902  	var _p0 *byte
  1903  	_p0, err = BytePtrFromString(pathname)
  1904  	if err != nil {
  1905  		return
  1906  	}
  1907  	_, _, e1 := Syscall6(SYS_NAME_TO_HANDLE_AT, uintptr(dirFD), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(fh)), uintptr(unsafe.Pointer(mountID)), uintptr(flags), 0)
  1908  	if e1 != 0 {
  1909  		err = errnoErr(e1)
  1910  	}
  1911  	return
  1912  }
  1913  
  1914  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1915  
  1916  func openByHandleAt(mountFD int, fh *fileHandle, flags int) (fd int, err error) {
  1917  	r0, _, e1 := Syscall(SYS_OPEN_BY_HANDLE_AT, uintptr(mountFD), uintptr(unsafe.Pointer(fh)), uintptr(flags))
  1918  	fd = int(r0)
  1919  	if e1 != 0 {
  1920  		err = errnoErr(e1)
  1921  	}
  1922  	return
  1923  }
  1924  
  1925  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1926  
  1927  func ProcessVMReadv(pid int, localIov []Iovec, remoteIov []RemoteIovec, flags uint) (n int, err error) {
  1928  	var _p0 unsafe.Pointer
  1929  	if len(localIov) > 0 {
  1930  		_p0 = unsafe.Pointer(&localIov[0])
  1931  	} else {
  1932  		_p0 = unsafe.Pointer(&_zero)
  1933  	}
  1934  	var _p1 unsafe.Pointer
  1935  	if len(remoteIov) > 0 {
  1936  		_p1 = unsafe.Pointer(&remoteIov[0])
  1937  	} else {
  1938  		_p1 = unsafe.Pointer(&_zero)
  1939  	}
  1940  	r0, _, e1 := Syscall6(SYS_PROCESS_VM_READV, uintptr(pid), uintptr(_p0), uintptr(len(localIov)), uintptr(_p1), uintptr(len(remoteIov)), uintptr(flags))
  1941  	n = int(r0)
  1942  	if e1 != 0 {
  1943  		err = errnoErr(e1)
  1944  	}
  1945  	return
  1946  }
  1947  
  1948  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1949  
  1950  func ProcessVMWritev(pid int, localIov []Iovec, remoteIov []RemoteIovec, flags uint) (n int, err error) {
  1951  	var _p0 unsafe.Pointer
  1952  	if len(localIov) > 0 {
  1953  		_p0 = unsafe.Pointer(&localIov[0])
  1954  	} else {
  1955  		_p0 = unsafe.Pointer(&_zero)
  1956  	}
  1957  	var _p1 unsafe.Pointer
  1958  	if len(remoteIov) > 0 {
  1959  		_p1 = unsafe.Pointer(&remoteIov[0])
  1960  	} else {
  1961  		_p1 = unsafe.Pointer(&_zero)
  1962  	}
  1963  	r0, _, e1 := Syscall6(SYS_PROCESS_VM_WRITEV, uintptr(pid), uintptr(_p0), uintptr(len(localIov)), uintptr(_p1), uintptr(len(remoteIov)), uintptr(flags))
  1964  	n = int(r0)
  1965  	if e1 != 0 {
  1966  		err = errnoErr(e1)
  1967  	}
  1968  	return
  1969  }
  1970  
  1971  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1972  
  1973  func PidfdOpen(pid int, flags int) (fd int, err error) {
  1974  	r0, _, e1 := Syscall(SYS_PIDFD_OPEN, uintptr(pid), uintptr(flags), 0)
  1975  	fd = int(r0)
  1976  	if e1 != 0 {
  1977  		err = errnoErr(e1)
  1978  	}
  1979  	return
  1980  }
  1981  
  1982  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1983  
  1984  func PidfdGetfd(pidfd int, targetfd int, flags int) (fd int, err error) {
  1985  	r0, _, e1 := Syscall(SYS_PIDFD_GETFD, uintptr(pidfd), uintptr(targetfd), uintptr(flags))
  1986  	fd = int(r0)
  1987  	if e1 != 0 {
  1988  		err = errnoErr(e1)
  1989  	}
  1990  	return
  1991  }
  1992  
  1993  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1994  
  1995  func shmat(id int, addr uintptr, flag int) (ret uintptr, err error) {
  1996  	r0, _, e1 := Syscall(SYS_SHMAT, uintptr(id), uintptr(addr), uintptr(flag))
  1997  	ret = uintptr(r0)
  1998  	if e1 != 0 {
  1999  		err = errnoErr(e1)
  2000  	}
  2001  	return
  2002  }
  2003  
  2004  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  2005  
  2006  func shmctl(id int, cmd int, buf *SysvShmDesc) (result int, err error) {
  2007  	r0, _, e1 := Syscall(SYS_SHMCTL, uintptr(id), uintptr(cmd), uintptr(unsafe.Pointer(buf)))
  2008  	result = int(r0)
  2009  	if e1 != 0 {
  2010  		err = errnoErr(e1)
  2011  	}
  2012  	return
  2013  }
  2014  
  2015  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  2016  
  2017  func shmdt(addr uintptr) (err error) {
  2018  	_, _, e1 := Syscall(SYS_SHMDT, uintptr(addr), 0, 0)
  2019  	if e1 != 0 {
  2020  		err = errnoErr(e1)
  2021  	}
  2022  	return
  2023  }
  2024  
  2025  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  2026  
  2027  func shmget(key int, size int, flag int) (id int, err error) {
  2028  	r0, _, e1 := Syscall(SYS_SHMGET, uintptr(key), uintptr(size), uintptr(flag))
  2029  	id = int(r0)
  2030  	if e1 != 0 {
  2031  		err = errnoErr(e1)
  2032  	}
  2033  	return
  2034  }
  2035  

View as plain text