Source file src/syscall/zsyscall_linux_arm.go

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

View as plain text