...
Run Format

Source file src/syscall/zsyscall_linux_amd64.go

Documentation: syscall

     1  // mksyscall.pl -tags linux,amd64 syscall_linux.go syscall_linux_amd64.go
     2  // Code generated by the command above; DO NOT EDIT.
     3  
     4  // +build linux,amd64
     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 Fstatfs(fd int, buf *Statfs_t) (err error) {
  1172  	_, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(buf)), 0)
  1173  	if e1 != 0 {
  1174  		err = errnoErr(e1)
  1175  	}
  1176  	return
  1177  }
  1178  
  1179  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1180  
  1181  func Ftruncate(fd int, length int64) (err error) {
  1182  	_, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), 0)
  1183  	if e1 != 0 {
  1184  		err = errnoErr(e1)
  1185  	}
  1186  	return
  1187  }
  1188  
  1189  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1190  
  1191  func Getegid() (egid int) {
  1192  	r0, _ := rawSyscallNoError(SYS_GETEGID, 0, 0, 0)
  1193  	egid = int(r0)
  1194  	return
  1195  }
  1196  
  1197  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1198  
  1199  func Geteuid() (euid int) {
  1200  	r0, _ := rawSyscallNoError(SYS_GETEUID, 0, 0, 0)
  1201  	euid = int(r0)
  1202  	return
  1203  }
  1204  
  1205  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1206  
  1207  func Getgid() (gid int) {
  1208  	r0, _ := rawSyscallNoError(SYS_GETGID, 0, 0, 0)
  1209  	gid = int(r0)
  1210  	return
  1211  }
  1212  
  1213  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1214  
  1215  func Getrlimit(resource int, rlim *Rlimit) (err error) {
  1216  	_, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 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 Getuid() (uid int) {
  1226  	r0, _ := rawSyscallNoError(SYS_GETUID, 0, 0, 0)
  1227  	uid = int(r0)
  1228  	return
  1229  }
  1230  
  1231  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1232  
  1233  func InotifyInit() (fd int, err error) {
  1234  	r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT, 0, 0, 0)
  1235  	fd = int(r0)
  1236  	if e1 != 0 {
  1237  		err = errnoErr(e1)
  1238  	}
  1239  	return
  1240  }
  1241  
  1242  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1243  
  1244  func Ioperm(from int, num int, on int) (err error) {
  1245  	_, _, e1 := Syscall(SYS_IOPERM, uintptr(from), uintptr(num), uintptr(on))
  1246  	if e1 != 0 {
  1247  		err = errnoErr(e1)
  1248  	}
  1249  	return
  1250  }
  1251  
  1252  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1253  
  1254  func Iopl(level int) (err error) {
  1255  	_, _, e1 := Syscall(SYS_IOPL, uintptr(level), 0, 0)
  1256  	if e1 != 0 {
  1257  		err = errnoErr(e1)
  1258  	}
  1259  	return
  1260  }
  1261  
  1262  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1263  
  1264  func Lchown(path string, uid int, gid int) (err error) {
  1265  	var _p0 *byte
  1266  	_p0, err = BytePtrFromString(path)
  1267  	if err != nil {
  1268  		return
  1269  	}
  1270  	_, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
  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 Listen(s int, n int) (err error) {
  1280  	_, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(n), 0)
  1281  	if e1 != 0 {
  1282  		err = errnoErr(e1)
  1283  	}
  1284  	return
  1285  }
  1286  
  1287  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1288  
  1289  func Lstat(path string, stat *Stat_t) (err error) {
  1290  	var _p0 *byte
  1291  	_p0, err = BytePtrFromString(path)
  1292  	if err != nil {
  1293  		return
  1294  	}
  1295  	_, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 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 Pread(fd int, p []byte, offset int64) (n int, err error) {
  1305  	var _p0 unsafe.Pointer
  1306  	if len(p) > 0 {
  1307  		_p0 = unsafe.Pointer(&p[0])
  1308  	} else {
  1309  		_p0 = unsafe.Pointer(&_zero)
  1310  	}
  1311  	r0, _, e1 := Syscall6(SYS_PREAD64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
  1312  	n = int(r0)
  1313  	if e1 != 0 {
  1314  		err = errnoErr(e1)
  1315  	}
  1316  	return
  1317  }
  1318  
  1319  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1320  
  1321  func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
  1322  	var _p0 unsafe.Pointer
  1323  	if len(p) > 0 {
  1324  		_p0 = unsafe.Pointer(&p[0])
  1325  	} else {
  1326  		_p0 = unsafe.Pointer(&_zero)
  1327  	}
  1328  	r0, _, e1 := Syscall6(SYS_PWRITE64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
  1329  	n = int(r0)
  1330  	if e1 != 0 {
  1331  		err = errnoErr(e1)
  1332  	}
  1333  	return
  1334  }
  1335  
  1336  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1337  
  1338  func Seek(fd int, offset int64, whence int) (off int64, err error) {
  1339  	r0, _, e1 := Syscall(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence))
  1340  	off = int64(r0)
  1341  	if e1 != 0 {
  1342  		err = errnoErr(e1)
  1343  	}
  1344  	return
  1345  }
  1346  
  1347  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1348  
  1349  func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {
  1350  	r0, _, e1 := Syscall6(SYS_SELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
  1351  	n = int(r0)
  1352  	if e1 != 0 {
  1353  		err = errnoErr(e1)
  1354  	}
  1355  	return
  1356  }
  1357  
  1358  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1359  
  1360  func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
  1361  	r0, _, e1 := Syscall6(SYS_SENDFILE, uintptr(outfd), uintptr(infd), uintptr(unsafe.Pointer(offset)), uintptr(count), 0, 0)
  1362  	written = int(r0)
  1363  	if e1 != 0 {
  1364  		err = errnoErr(e1)
  1365  	}
  1366  	return
  1367  }
  1368  
  1369  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1370  
  1371  func Setfsgid(gid int) (err error) {
  1372  	_, _, e1 := Syscall(SYS_SETFSGID, uintptr(gid), 0, 0)
  1373  	if e1 != 0 {
  1374  		err = errnoErr(e1)
  1375  	}
  1376  	return
  1377  }
  1378  
  1379  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1380  
  1381  func Setfsuid(uid int) (err error) {
  1382  	_, _, e1 := Syscall(SYS_SETFSUID, uintptr(uid), 0, 0)
  1383  	if e1 != 0 {
  1384  		err = errnoErr(e1)
  1385  	}
  1386  	return
  1387  }
  1388  
  1389  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1390  
  1391  func Setregid(rgid int, egid int) (err error) {
  1392  	_, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
  1393  	if e1 != 0 {
  1394  		err = errnoErr(e1)
  1395  	}
  1396  	return
  1397  }
  1398  
  1399  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1400  
  1401  func Setresgid(rgid int, egid int, sgid int) (err error) {
  1402  	_, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid))
  1403  	if e1 != 0 {
  1404  		err = errnoErr(e1)
  1405  	}
  1406  	return
  1407  }
  1408  
  1409  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1410  
  1411  func Setresuid(ruid int, euid int, suid int) (err error) {
  1412  	_, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid))
  1413  	if e1 != 0 {
  1414  		err = errnoErr(e1)
  1415  	}
  1416  	return
  1417  }
  1418  
  1419  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1420  
  1421  func Setrlimit(resource int, rlim *Rlimit) (err error) {
  1422  	_, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
  1423  	if e1 != 0 {
  1424  		err = errnoErr(e1)
  1425  	}
  1426  	return
  1427  }
  1428  
  1429  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1430  
  1431  func Setreuid(ruid int, euid int) (err error) {
  1432  	_, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
  1433  	if e1 != 0 {
  1434  		err = errnoErr(e1)
  1435  	}
  1436  	return
  1437  }
  1438  
  1439  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1440  
  1441  func Shutdown(fd int, how int) (err error) {
  1442  	_, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0)
  1443  	if e1 != 0 {
  1444  		err = errnoErr(e1)
  1445  	}
  1446  	return
  1447  }
  1448  
  1449  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1450  
  1451  func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error) {
  1452  	r0, _, e1 := Syscall6(SYS_SPLICE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags))
  1453  	n = int64(r0)
  1454  	if e1 != 0 {
  1455  		err = errnoErr(e1)
  1456  	}
  1457  	return
  1458  }
  1459  
  1460  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1461  
  1462  func Statfs(path string, buf *Statfs_t) (err error) {
  1463  	var _p0 *byte
  1464  	_p0, err = BytePtrFromString(path)
  1465  	if err != nil {
  1466  		return
  1467  	}
  1468  	_, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0)
  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 SyncFileRange(fd int, off int64, n int64, flags int) (err error) {
  1478  	_, _, e1 := Syscall6(SYS_SYNC_FILE_RANGE, uintptr(fd), uintptr(off), uintptr(n), uintptr(flags), 0, 0)
  1479  	if e1 != 0 {
  1480  		err = errnoErr(e1)
  1481  	}
  1482  	return
  1483  }
  1484  
  1485  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1486  
  1487  func Truncate(path string, length int64) (err error) {
  1488  	var _p0 *byte
  1489  	_p0, err = BytePtrFromString(path)
  1490  	if err != nil {
  1491  		return
  1492  	}
  1493  	_, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0)
  1494  	if e1 != 0 {
  1495  		err = errnoErr(e1)
  1496  	}
  1497  	return
  1498  }
  1499  
  1500  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1501  
  1502  func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
  1503  	r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
  1504  	fd = int(r0)
  1505  	if e1 != 0 {
  1506  		err = errnoErr(e1)
  1507  	}
  1508  	return
  1509  }
  1510  
  1511  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1512  
  1513  func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {
  1514  	r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
  1515  	fd = int(r0)
  1516  	if e1 != 0 {
  1517  		err = errnoErr(e1)
  1518  	}
  1519  	return
  1520  }
  1521  
  1522  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1523  
  1524  func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
  1525  	_, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))
  1526  	if e1 != 0 {
  1527  		err = errnoErr(e1)
  1528  	}
  1529  	return
  1530  }
  1531  
  1532  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1533  
  1534  func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
  1535  	_, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))
  1536  	if e1 != 0 {
  1537  		err = errnoErr(e1)
  1538  	}
  1539  	return
  1540  }
  1541  
  1542  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1543  
  1544  func fstatat(fd int, path string, stat *Stat_t, flags int) (err error) {
  1545  	var _p0 *byte
  1546  	_p0, err = BytePtrFromString(path)
  1547  	if err != nil {
  1548  		return
  1549  	}
  1550  	_, _, e1 := Syscall6(SYS_NEWFSTATAT, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)
  1551  	if e1 != 0 {
  1552  		err = errnoErr(e1)
  1553  	}
  1554  	return
  1555  }
  1556  
  1557  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1558  
  1559  func getgroups(n int, list *_Gid_t) (nn int, err error) {
  1560  	r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0)
  1561  	nn = int(r0)
  1562  	if e1 != 0 {
  1563  		err = errnoErr(e1)
  1564  	}
  1565  	return
  1566  }
  1567  
  1568  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1569  
  1570  func setgroups(n int, list *_Gid_t) (err error) {
  1571  	_, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0)
  1572  	if e1 != 0 {
  1573  		err = errnoErr(e1)
  1574  	}
  1575  	return
  1576  }
  1577  
  1578  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1579  
  1580  func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {
  1581  	_, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
  1582  	if e1 != 0 {
  1583  		err = errnoErr(e1)
  1584  	}
  1585  	return
  1586  }
  1587  
  1588  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1589  
  1590  func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {
  1591  	_, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
  1592  	if e1 != 0 {
  1593  		err = errnoErr(e1)
  1594  	}
  1595  	return
  1596  }
  1597  
  1598  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1599  
  1600  func socket(domain int, typ int, proto int) (fd int, err error) {
  1601  	r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))
  1602  	fd = int(r0)
  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 socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
  1612  	_, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 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 getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
  1622  	_, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
  1623  	if e1 != 0 {
  1624  		err = errnoErr(e1)
  1625  	}
  1626  	return
  1627  }
  1628  
  1629  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1630  
  1631  func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
  1632  	_, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
  1633  	if e1 != 0 {
  1634  		err = errnoErr(e1)
  1635  	}
  1636  	return
  1637  }
  1638  
  1639  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1640  
  1641  func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {
  1642  	var _p0 unsafe.Pointer
  1643  	if len(p) > 0 {
  1644  		_p0 = unsafe.Pointer(&p[0])
  1645  	} else {
  1646  		_p0 = unsafe.Pointer(&_zero)
  1647  	}
  1648  	r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
  1649  	n = int(r0)
  1650  	if e1 != 0 {
  1651  		err = errnoErr(e1)
  1652  	}
  1653  	return
  1654  }
  1655  
  1656  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1657  
  1658  func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {
  1659  	var _p0 unsafe.Pointer
  1660  	if len(buf) > 0 {
  1661  		_p0 = unsafe.Pointer(&buf[0])
  1662  	} else {
  1663  		_p0 = unsafe.Pointer(&_zero)
  1664  	}
  1665  	_, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
  1666  	if e1 != 0 {
  1667  		err = errnoErr(e1)
  1668  	}
  1669  	return
  1670  }
  1671  
  1672  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1673  
  1674  func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
  1675  	r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
  1676  	n = int(r0)
  1677  	if e1 != 0 {
  1678  		err = errnoErr(e1)
  1679  	}
  1680  	return
  1681  }
  1682  
  1683  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1684  
  1685  func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
  1686  	r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
  1687  	n = int(r0)
  1688  	if e1 != 0 {
  1689  		err = errnoErr(e1)
  1690  	}
  1691  	return
  1692  }
  1693  
  1694  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1695  
  1696  func mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) {
  1697  	r0, _, e1 := Syscall6(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(offset))
  1698  	xaddr = uintptr(r0)
  1699  	if e1 != 0 {
  1700  		err = errnoErr(e1)
  1701  	}
  1702  	return
  1703  }
  1704  
  1705  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1706  
  1707  func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
  1708  	var _p0 unsafe.Pointer
  1709  	if len(events) > 0 {
  1710  		_p0 = unsafe.Pointer(&events[0])
  1711  	} else {
  1712  		_p0 = unsafe.Pointer(&_zero)
  1713  	}
  1714  	r0, _, e1 := Syscall6(SYS_EPOLL_WAIT, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec), 0, 0)
  1715  	n = int(r0)
  1716  	if e1 != 0 {
  1717  		err = errnoErr(e1)
  1718  	}
  1719  	return
  1720  }
  1721  
  1722  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1723  
  1724  func pipe(p *[2]_C_int) (err error) {
  1725  	_, _, e1 := RawSyscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0)
  1726  	if e1 != 0 {
  1727  		err = errnoErr(e1)
  1728  	}
  1729  	return
  1730  }
  1731  
  1732  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1733  
  1734  func pipe2(p *[2]_C_int, flags int) (err error) {
  1735  	_, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
  1736  	if e1 != 0 {
  1737  		err = errnoErr(e1)
  1738  	}
  1739  	return
  1740  }
  1741  

View as plain text