...
Run Format

Source file src/syscall/zsyscall_linux_ppc64le.go

Documentation: syscall

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

View as plain text