...
Run Format

Source file src/syscall/zsyscall_linux_386.go

Documentation: syscall

     1  // mksyscall.pl -l32 -tags linux,386 syscall_linux.go syscall_linux_386.go
     2  // Code generated by the command above; DO NOT EDIT.
     3  
     4  // +build linux,386
     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(off>>32), uintptr(len), uintptr(len>>32))
   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, r1, e1 := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0)
   900  	n = int64(int64(r1)<<32 | 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 pipe(p *[2]_C_int) (err error) {
  1142  	_, _, e1 := RawSyscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 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 pipe2(p *[2]_C_int, flags int) (err error) {
  1152  	_, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
  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 Dup2(oldfd int, newfd int) (err error) {
  1162  	_, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 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 Fchown(fd int, uid int, gid int) (err error) {
  1172  	_, _, e1 := Syscall(SYS_FCHOWN32, uintptr(fd), uintptr(uid), uintptr(gid))
  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 Fstat(fd int, stat *Stat_t) (err error) {
  1182  	_, _, e1 := Syscall(SYS_FSTAT64, uintptr(fd), uintptr(unsafe.Pointer(stat)), 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 fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) {
  1192  	var _p0 *byte
  1193  	_p0, err = BytePtrFromString(path)
  1194  	if err != nil {
  1195  		return
  1196  	}
  1197  	_, _, e1 := Syscall6(SYS_FSTATAT64, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 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 Ftruncate(fd int, length int64) (err error) {
  1207  	_, _, e1 := Syscall(SYS_FTRUNCATE64, uintptr(fd), uintptr(length), uintptr(length>>32))
  1208  	if e1 != 0 {
  1209  		err = errnoErr(e1)
  1210  	}
  1211  	return
  1212  }
  1213  
  1214  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1215  
  1216  func Getegid() (egid int) {
  1217  	r0, _ := rawSyscallNoError(SYS_GETEGID32, 0, 0, 0)
  1218  	egid = int(r0)
  1219  	return
  1220  }
  1221  
  1222  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1223  
  1224  func Geteuid() (euid int) {
  1225  	r0, _ := rawSyscallNoError(SYS_GETEUID32, 0, 0, 0)
  1226  	euid = int(r0)
  1227  	return
  1228  }
  1229  
  1230  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1231  
  1232  func Getgid() (gid int) {
  1233  	r0, _ := rawSyscallNoError(SYS_GETGID32, 0, 0, 0)
  1234  	gid = int(r0)
  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_GETUID32, 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_LCHOWN32, 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 Lstat(path string, stat *Stat_t) (err error) {
  1295  	var _p0 *byte
  1296  	_p0, err = BytePtrFromString(path)
  1297  	if err != nil {
  1298  		return
  1299  	}
  1300  	_, _, e1 := Syscall(SYS_LSTAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
  1301  	if e1 != 0 {
  1302  		err = errnoErr(e1)
  1303  	}
  1304  	return
  1305  }
  1306  
  1307  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1308  
  1309  func Pread(fd int, p []byte, offset int64) (n int, err error) {
  1310  	var _p0 unsafe.Pointer
  1311  	if len(p) > 0 {
  1312  		_p0 = unsafe.Pointer(&p[0])
  1313  	} else {
  1314  		_p0 = unsafe.Pointer(&_zero)
  1315  	}
  1316  	r0, _, e1 := Syscall6(SYS_PREAD64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0)
  1317  	n = int(r0)
  1318  	if e1 != 0 {
  1319  		err = errnoErr(e1)
  1320  	}
  1321  	return
  1322  }
  1323  
  1324  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1325  
  1326  func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
  1327  	var _p0 unsafe.Pointer
  1328  	if len(p) > 0 {
  1329  		_p0 = unsafe.Pointer(&p[0])
  1330  	} else {
  1331  		_p0 = unsafe.Pointer(&_zero)
  1332  	}
  1333  	r0, _, e1 := Syscall6(SYS_PWRITE64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0)
  1334  	n = int(r0)
  1335  	if e1 != 0 {
  1336  		err = errnoErr(e1)
  1337  	}
  1338  	return
  1339  }
  1340  
  1341  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1342  
  1343  func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
  1344  	r0, _, e1 := Syscall6(SYS_SENDFILE64, uintptr(outfd), uintptr(infd), uintptr(unsafe.Pointer(offset)), uintptr(count), 0, 0)
  1345  	written = int(r0)
  1346  	if e1 != 0 {
  1347  		err = errnoErr(e1)
  1348  	}
  1349  	return
  1350  }
  1351  
  1352  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1353  
  1354  func Setfsgid(gid int) (err error) {
  1355  	_, _, e1 := Syscall(SYS_SETFSGID32, uintptr(gid), 0, 0)
  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 Setfsuid(uid int) (err error) {
  1365  	_, _, e1 := Syscall(SYS_SETFSUID32, uintptr(uid), 0, 0)
  1366  	if e1 != 0 {
  1367  		err = errnoErr(e1)
  1368  	}
  1369  	return
  1370  }
  1371  
  1372  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1373  
  1374  func Setregid(rgid int, egid int) (err error) {
  1375  	_, _, e1 := RawSyscall(SYS_SETREGID32, uintptr(rgid), uintptr(egid), 0)
  1376  	if e1 != 0 {
  1377  		err = errnoErr(e1)
  1378  	}
  1379  	return
  1380  }
  1381  
  1382  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1383  
  1384  func Setresgid(rgid int, egid int, sgid int) (err error) {
  1385  	_, _, e1 := RawSyscall(SYS_SETRESGID32, uintptr(rgid), uintptr(egid), uintptr(sgid))
  1386  	if e1 != 0 {
  1387  		err = errnoErr(e1)
  1388  	}
  1389  	return
  1390  }
  1391  
  1392  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1393  
  1394  func Setresuid(ruid int, euid int, suid int) (err error) {
  1395  	_, _, e1 := RawSyscall(SYS_SETRESUID32, uintptr(ruid), uintptr(euid), uintptr(suid))
  1396  	if e1 != 0 {
  1397  		err = errnoErr(e1)
  1398  	}
  1399  	return
  1400  }
  1401  
  1402  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1403  
  1404  func Setreuid(ruid int, euid int) (err error) {
  1405  	_, _, e1 := RawSyscall(SYS_SETREUID32, uintptr(ruid), uintptr(euid), 0)
  1406  	if e1 != 0 {
  1407  		err = errnoErr(e1)
  1408  	}
  1409  	return
  1410  }
  1411  
  1412  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1413  
  1414  func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error) {
  1415  	r0, _, e1 := Syscall6(SYS_SPLICE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags))
  1416  	n = int(r0)
  1417  	if e1 != 0 {
  1418  		err = errnoErr(e1)
  1419  	}
  1420  	return
  1421  }
  1422  
  1423  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1424  
  1425  func Stat(path string, stat *Stat_t) (err error) {
  1426  	var _p0 *byte
  1427  	_p0, err = BytePtrFromString(path)
  1428  	if err != nil {
  1429  		return
  1430  	}
  1431  	_, _, e1 := Syscall(SYS_STAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
  1432  	if e1 != 0 {
  1433  		err = errnoErr(e1)
  1434  	}
  1435  	return
  1436  }
  1437  
  1438  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1439  
  1440  func SyncFileRange(fd int, off int64, n int64, flags int) (err error) {
  1441  	_, _, e1 := Syscall6(SYS_SYNC_FILE_RANGE, uintptr(fd), uintptr(off), uintptr(off>>32), uintptr(n), uintptr(n>>32), uintptr(flags))
  1442  	if e1 != 0 {
  1443  		err = errnoErr(e1)
  1444  	}
  1445  	return
  1446  }
  1447  
  1448  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1449  
  1450  func Truncate(path string, length int64) (err error) {
  1451  	var _p0 *byte
  1452  	_p0, err = BytePtrFromString(path)
  1453  	if err != nil {
  1454  		return
  1455  	}
  1456  	_, _, e1 := Syscall(SYS_TRUNCATE64, uintptr(unsafe.Pointer(_p0)), uintptr(length), uintptr(length>>32))
  1457  	if e1 != 0 {
  1458  		err = errnoErr(e1)
  1459  	}
  1460  	return
  1461  }
  1462  
  1463  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1464  
  1465  func getgroups(n int, list *_Gid_t) (nn int, err error) {
  1466  	r0, _, e1 := RawSyscall(SYS_GETGROUPS32, uintptr(n), uintptr(unsafe.Pointer(list)), 0)
  1467  	nn = int(r0)
  1468  	if e1 != 0 {
  1469  		err = errnoErr(e1)
  1470  	}
  1471  	return
  1472  }
  1473  
  1474  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1475  
  1476  func setgroups(n int, list *_Gid_t) (err error) {
  1477  	_, _, e1 := RawSyscall(SYS_SETGROUPS32, uintptr(n), uintptr(unsafe.Pointer(list)), 0)
  1478  	if e1 != 0 {
  1479  		err = errnoErr(e1)
  1480  	}
  1481  	return
  1482  }
  1483  
  1484  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1485  
  1486  func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {
  1487  	r0, _, e1 := Syscall6(SYS__NEWSELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
  1488  	n = int(r0)
  1489  	if e1 != 0 {
  1490  		err = errnoErr(e1)
  1491  	}
  1492  	return
  1493  }
  1494  
  1495  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1496  
  1497  func mmap2(addr uintptr, length uintptr, prot int, flags int, fd int, pageOffset uintptr) (xaddr uintptr, err error) {
  1498  	r0, _, e1 := Syscall6(SYS_MMAP2, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(pageOffset))
  1499  	xaddr = uintptr(r0)
  1500  	if e1 != 0 {
  1501  		err = errnoErr(e1)
  1502  	}
  1503  	return
  1504  }
  1505  
  1506  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1507  
  1508  func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
  1509  	var _p0 unsafe.Pointer
  1510  	if len(events) > 0 {
  1511  		_p0 = unsafe.Pointer(&events[0])
  1512  	} else {
  1513  		_p0 = unsafe.Pointer(&_zero)
  1514  	}
  1515  	r0, _, e1 := Syscall6(SYS_EPOLL_WAIT, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec), 0, 0)
  1516  	n = int(r0)
  1517  	if e1 != 0 {
  1518  		err = errnoErr(e1)
  1519  	}
  1520  	return
  1521  }
  1522  
  1523  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1524  
  1525  func getrlimit(resource int, rlim *rlimit32) (err error) {
  1526  	_, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
  1527  	if e1 != 0 {
  1528  		err = errnoErr(e1)
  1529  	}
  1530  	return
  1531  }
  1532  
  1533  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1534  
  1535  func setrlimit(resource int, rlim *rlimit32) (err error) {
  1536  	_, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
  1537  	if e1 != 0 {
  1538  		err = errnoErr(e1)
  1539  	}
  1540  	return
  1541  }
  1542  
  1543  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1544  
  1545  func Gettimeofday(tv *Timeval) (err error) {
  1546  	_, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
  1547  	if e1 != 0 {
  1548  		err = errnoErr(e1)
  1549  	}
  1550  	return
  1551  }
  1552  
  1553  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1554  
  1555  func Time(t *Time_t) (tt Time_t, err error) {
  1556  	r0, _, e1 := RawSyscall(SYS_TIME, uintptr(unsafe.Pointer(t)), 0, 0)
  1557  	tt = Time_t(r0)
  1558  	if e1 != 0 {
  1559  		err = errnoErr(e1)
  1560  	}
  1561  	return
  1562  }
  1563  

View as plain text