Source file src/syscall/zsyscall_solaris_amd64.go

     1  // mksyscall_libc.pl -solaris -tags solaris,amd64 syscall_solaris.go syscall_solaris_amd64.go
     2  // Code generated by the command above; DO NOT EDIT.
     3  
     4  //go:build solaris && amd64
     5  
     6  package syscall
     7  
     8  import "unsafe"
     9  
    10  //go:cgo_import_dynamic libc_pipe2 pipe2 "libc.so"
    11  //go:cgo_import_dynamic libc_accept4 accept4 "libsocket.so"
    12  //go:cgo_import_dynamic libc_Getcwd getcwd "libc.so"
    13  //go:cgo_import_dynamic libc_getgroups getgroups "libc.so"
    14  //go:cgo_import_dynamic libc_setgroups setgroups "libc.so"
    15  //go:cgo_import_dynamic libc_fcntl fcntl "libc.so"
    16  //go:cgo_import_dynamic libc_accept accept "libsocket.so"
    17  //go:cgo_import_dynamic libc___xnet_sendmsg __xnet_sendmsg "libsocket.so"
    18  //go:cgo_import_dynamic libc_Access access "libc.so"
    19  //go:cgo_import_dynamic libc_Adjtime adjtime "libc.so"
    20  //go:cgo_import_dynamic libc_Chdir chdir "libc.so"
    21  //go:cgo_import_dynamic libc_Chmod chmod "libc.so"
    22  //go:cgo_import_dynamic libc_Chown chown "libc.so"
    23  //go:cgo_import_dynamic libc_Chroot chroot "libc.so"
    24  //go:cgo_import_dynamic libc_Close close "libc.so"
    25  //go:cgo_import_dynamic libc_Dup dup "libc.so"
    26  //go:cgo_import_dynamic libc_Fchdir fchdir "libc.so"
    27  //go:cgo_import_dynamic libc_Fchmod fchmod "libc.so"
    28  //go:cgo_import_dynamic libc_Fchown fchown "libc.so"
    29  //go:cgo_import_dynamic libc_Fpathconf fpathconf "libc.so"
    30  //go:cgo_import_dynamic libc_Fstat fstat "libc.so"
    31  //go:cgo_import_dynamic libc_Getdents getdents "libc.so"
    32  //go:cgo_import_dynamic libc_Getgid getgid "libc.so"
    33  //go:cgo_import_dynamic libc_Getpid getpid "libc.so"
    34  //go:cgo_import_dynamic libc_Geteuid geteuid "libc.so"
    35  //go:cgo_import_dynamic libc_Getegid getegid "libc.so"
    36  //go:cgo_import_dynamic libc_Getppid getppid "libc.so"
    37  //go:cgo_import_dynamic libc_Getpriority getpriority "libc.so"
    38  //go:cgo_import_dynamic libc_Getrlimit getrlimit "libc.so"
    39  //go:cgo_import_dynamic libc_Getrusage getrusage "libc.so"
    40  //go:cgo_import_dynamic libc_Gettimeofday gettimeofday "libc.so"
    41  //go:cgo_import_dynamic libc_Getuid getuid "libc.so"
    42  //go:cgo_import_dynamic libc_Kill kill "libc.so"
    43  //go:cgo_import_dynamic libc_Lchown lchown "libc.so"
    44  //go:cgo_import_dynamic libc_Link link "libc.so"
    45  //go:cgo_import_dynamic libc___xnet_listen __xnet_listen "libsocket.so"
    46  //go:cgo_import_dynamic libc_Lstat lstat "libc.so"
    47  //go:cgo_import_dynamic libc_Mkdir mkdir "libc.so"
    48  //go:cgo_import_dynamic libc_Mknod mknod "libc.so"
    49  //go:cgo_import_dynamic libc_Nanosleep nanosleep "libc.so"
    50  //go:cgo_import_dynamic libc_Open open "libc.so"
    51  //go:cgo_import_dynamic libc_Pathconf pathconf "libc.so"
    52  //go:cgo_import_dynamic libc_pread pread "libc.so"
    53  //go:cgo_import_dynamic libc_pwrite pwrite "libc.so"
    54  //go:cgo_import_dynamic libc_read read "libc.so"
    55  //go:cgo_import_dynamic libc_Readlink readlink "libc.so"
    56  //go:cgo_import_dynamic libc_Rename rename "libc.so"
    57  //go:cgo_import_dynamic libc_Rmdir rmdir "libc.so"
    58  //go:cgo_import_dynamic libc_lseek lseek "libc.so"
    59  //go:cgo_import_dynamic libc_sendfile sendfile "libsendfile.so"
    60  //go:cgo_import_dynamic libc_Setegid setegid "libc.so"
    61  //go:cgo_import_dynamic libc_Seteuid seteuid "libc.so"
    62  //go:cgo_import_dynamic libc_Setgid setgid "libc.so"
    63  //go:cgo_import_dynamic libc_Setpgid setpgid "libc.so"
    64  //go:cgo_import_dynamic libc_Setpriority setpriority "libc.so"
    65  //go:cgo_import_dynamic libc_Setregid setregid "libc.so"
    66  //go:cgo_import_dynamic libc_Setreuid setreuid "libc.so"
    67  //go:cgo_import_dynamic libc_Setrlimit setrlimit "libc.so"
    68  //go:cgo_import_dynamic libc_Setsid setsid "libc.so"
    69  //go:cgo_import_dynamic libc_Setuid setuid "libc.so"
    70  //go:cgo_import_dynamic libc_shutdown shutdown "libsocket.so"
    71  //go:cgo_import_dynamic libc_Stat stat "libc.so"
    72  //go:cgo_import_dynamic libc_Symlink symlink "libc.so"
    73  //go:cgo_import_dynamic libc_Sync sync "libc.so"
    74  //go:cgo_import_dynamic libc_Truncate truncate "libc.so"
    75  //go:cgo_import_dynamic libc_Fsync fsync "libc.so"
    76  //go:cgo_import_dynamic libc_Ftruncate ftruncate "libc.so"
    77  //go:cgo_import_dynamic libc_Umask umask "libc.so"
    78  //go:cgo_import_dynamic libc_Unlink unlink "libc.so"
    79  //go:cgo_import_dynamic libc_utimes utimes "libc.so"
    80  //go:cgo_import_dynamic libc___xnet_bind __xnet_bind "libsocket.so"
    81  //go:cgo_import_dynamic libc___xnet_connect __xnet_connect "libsocket.so"
    82  //go:cgo_import_dynamic libc_mmap mmap "libc.so"
    83  //go:cgo_import_dynamic libc_munmap munmap "libc.so"
    84  //go:cgo_import_dynamic libc___xnet_sendto __xnet_sendto "libsocket.so"
    85  //go:cgo_import_dynamic libc___xnet_socket __xnet_socket "libsocket.so"
    86  //go:cgo_import_dynamic libc___xnet_socketpair __xnet_socketpair "libsocket.so"
    87  //go:cgo_import_dynamic libc_write write "libc.so"
    88  //go:cgo_import_dynamic libc___xnet_getsockopt __xnet_getsockopt "libsocket.so"
    89  //go:cgo_import_dynamic libc_getpeername getpeername "libsocket.so"
    90  //go:cgo_import_dynamic libc_getsockname getsockname "libsocket.so"
    91  //go:cgo_import_dynamic libc_setsockopt setsockopt "libsocket.so"
    92  //go:cgo_import_dynamic libc_recvfrom recvfrom "libsocket.so"
    93  //go:cgo_import_dynamic libc___xnet_recvmsg __xnet_recvmsg "libsocket.so"
    94  //go:cgo_import_dynamic libc_getexecname getexecname "libc.so"
    95  //go:cgo_import_dynamic libc_utimensat utimensat "libc.so"
    96  
    97  //go:linkname libc_pipe2 libc_pipe2
    98  //go:linkname libc_accept4 libc_accept4
    99  //go:linkname libc_Getcwd libc_Getcwd
   100  //go:linkname libc_getgroups libc_getgroups
   101  //go:linkname libc_setgroups libc_setgroups
   102  //go:linkname libc_fcntl libc_fcntl
   103  //go:linkname libc_accept libc_accept
   104  //go:linkname libc___xnet_sendmsg libc___xnet_sendmsg
   105  //go:linkname libc_Access libc_Access
   106  //go:linkname libc_Adjtime libc_Adjtime
   107  //go:linkname libc_Chdir libc_Chdir
   108  //go:linkname libc_Chmod libc_Chmod
   109  //go:linkname libc_Chown libc_Chown
   110  //go:linkname libc_Chroot libc_Chroot
   111  //go:linkname libc_Close libc_Close
   112  //go:linkname libc_Dup libc_Dup
   113  //go:linkname libc_Fchdir libc_Fchdir
   114  //go:linkname libc_Fchmod libc_Fchmod
   115  //go:linkname libc_Fchown libc_Fchown
   116  //go:linkname libc_Fpathconf libc_Fpathconf
   117  //go:linkname libc_Fstat libc_Fstat
   118  //go:linkname libc_Getdents libc_Getdents
   119  //go:linkname libc_Getgid libc_Getgid
   120  //go:linkname libc_Getpid libc_Getpid
   121  //go:linkname libc_Geteuid libc_Geteuid
   122  //go:linkname libc_Getegid libc_Getegid
   123  //go:linkname libc_Getppid libc_Getppid
   124  //go:linkname libc_Getpriority libc_Getpriority
   125  //go:linkname libc_Getrlimit libc_Getrlimit
   126  //go:linkname libc_Getrusage libc_Getrusage
   127  //go:linkname libc_Gettimeofday libc_Gettimeofday
   128  //go:linkname libc_Getuid libc_Getuid
   129  //go:linkname libc_Kill libc_Kill
   130  //go:linkname libc_Lchown libc_Lchown
   131  //go:linkname libc_Link libc_Link
   132  //go:linkname libc___xnet_listen libc___xnet_listen
   133  //go:linkname libc_Lstat libc_Lstat
   134  //go:linkname libc_Mkdir libc_Mkdir
   135  //go:linkname libc_Mknod libc_Mknod
   136  //go:linkname libc_Nanosleep libc_Nanosleep
   137  //go:linkname libc_Open libc_Open
   138  //go:linkname libc_Pathconf libc_Pathconf
   139  //go:linkname libc_pread libc_pread
   140  //go:linkname libc_pwrite libc_pwrite
   141  //go:linkname libc_read libc_read
   142  //go:linkname libc_Readlink libc_Readlink
   143  //go:linkname libc_Rename libc_Rename
   144  //go:linkname libc_Rmdir libc_Rmdir
   145  //go:linkname libc_lseek libc_lseek
   146  //go:linkname libc_sendfile libc_sendfile
   147  //go:linkname libc_Setegid libc_Setegid
   148  //go:linkname libc_Seteuid libc_Seteuid
   149  //go:linkname libc_Setgid libc_Setgid
   150  //go:linkname libc_Setpgid libc_Setpgid
   151  //go:linkname libc_Setpriority libc_Setpriority
   152  //go:linkname libc_Setregid libc_Setregid
   153  //go:linkname libc_Setreuid libc_Setreuid
   154  //go:linkname libc_Setrlimit libc_Setrlimit
   155  //go:linkname libc_Setsid libc_Setsid
   156  //go:linkname libc_Setuid libc_Setuid
   157  //go:linkname libc_shutdown libc_shutdown
   158  //go:linkname libc_Stat libc_Stat
   159  //go:linkname libc_Symlink libc_Symlink
   160  //go:linkname libc_Sync libc_Sync
   161  //go:linkname libc_Truncate libc_Truncate
   162  //go:linkname libc_Fsync libc_Fsync
   163  //go:linkname libc_Ftruncate libc_Ftruncate
   164  //go:linkname libc_Umask libc_Umask
   165  //go:linkname libc_Unlink libc_Unlink
   166  //go:linkname libc_utimes libc_utimes
   167  //go:linkname libc___xnet_bind libc___xnet_bind
   168  //go:linkname libc___xnet_connect libc___xnet_connect
   169  //go:linkname libc_mmap libc_mmap
   170  //go:linkname libc_munmap libc_munmap
   171  //go:linkname libc___xnet_sendto libc___xnet_sendto
   172  //go:linkname libc___xnet_socket libc___xnet_socket
   173  //go:linkname libc___xnet_socketpair libc___xnet_socketpair
   174  //go:linkname libc_write libc_write
   175  //go:linkname libc___xnet_getsockopt libc___xnet_getsockopt
   176  //go:linkname libc_getpeername libc_getpeername
   177  //go:linkname libc_getsockname libc_getsockname
   178  //go:linkname libc_setsockopt libc_setsockopt
   179  //go:linkname libc_recvfrom libc_recvfrom
   180  //go:linkname libc___xnet_recvmsg libc___xnet_recvmsg
   181  //go:linkname libc_getexecname libc_getexecname
   182  //go:linkname libc_utimensat libc_utimensat
   183  
   184  type libcFunc uintptr
   185  
   186  var (
   187  	libc_pipe2,
   188  	libc_accept4,
   189  	libc_Getcwd,
   190  	libc_getgroups,
   191  	libc_setgroups,
   192  	libc_fcntl,
   193  	libc_accept,
   194  	libc___xnet_sendmsg,
   195  	libc_Access,
   196  	libc_Adjtime,
   197  	libc_Chdir,
   198  	libc_Chmod,
   199  	libc_Chown,
   200  	libc_Chroot,
   201  	libc_Close,
   202  	libc_Dup,
   203  	libc_Fchdir,
   204  	libc_Fchmod,
   205  	libc_Fchown,
   206  	libc_Fpathconf,
   207  	libc_Fstat,
   208  	libc_Getdents,
   209  	libc_Getgid,
   210  	libc_Getpid,
   211  	libc_Geteuid,
   212  	libc_Getegid,
   213  	libc_Getppid,
   214  	libc_Getpriority,
   215  	libc_Getrlimit,
   216  	libc_Getrusage,
   217  	libc_Gettimeofday,
   218  	libc_Getuid,
   219  	libc_Kill,
   220  	libc_Lchown,
   221  	libc_Link,
   222  	libc___xnet_listen,
   223  	libc_Lstat,
   224  	libc_Mkdir,
   225  	libc_Mknod,
   226  	libc_Nanosleep,
   227  	libc_Open,
   228  	libc_Pathconf,
   229  	libc_pread,
   230  	libc_pwrite,
   231  	libc_read,
   232  	libc_Readlink,
   233  	libc_Rename,
   234  	libc_Rmdir,
   235  	libc_lseek,
   236  	libc_sendfile,
   237  	libc_Setegid,
   238  	libc_Seteuid,
   239  	libc_Setgid,
   240  	libc_Setpgid,
   241  	libc_Setpriority,
   242  	libc_Setregid,
   243  	libc_Setreuid,
   244  	libc_Setrlimit,
   245  	libc_Setsid,
   246  	libc_Setuid,
   247  	libc_shutdown,
   248  	libc_Stat,
   249  	libc_Symlink,
   250  	libc_Sync,
   251  	libc_Truncate,
   252  	libc_Fsync,
   253  	libc_Ftruncate,
   254  	libc_Umask,
   255  	libc_Unlink,
   256  	libc_utimes,
   257  	libc___xnet_bind,
   258  	libc___xnet_connect,
   259  	libc_mmap,
   260  	libc_munmap,
   261  	libc___xnet_sendto,
   262  	libc___xnet_socket,
   263  	libc___xnet_socketpair,
   264  	libc_write,
   265  	libc___xnet_getsockopt,
   266  	libc_getpeername,
   267  	libc_getsockname,
   268  	libc_setsockopt,
   269  	libc_recvfrom,
   270  	libc___xnet_recvmsg,
   271  	libc_getexecname,
   272  	libc_utimensat libcFunc
   273  )
   274  
   275  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   276  
   277  func pipe2(p *[2]_C_int, flags int) (err error) {
   278  	_, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&libc_pipe2)), 2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0, 0, 0, 0)
   279  	if e1 != 0 {
   280  		err = errnoErr(e1)
   281  	}
   282  	return
   283  }
   284  
   285  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   286  
   287  func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {
   288  	r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_accept4)), 4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
   289  	fd = int(r0)
   290  	if e1 != 0 {
   291  		err = errnoErr(e1)
   292  	}
   293  	return
   294  }
   295  
   296  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   297  
   298  func Getcwd(buf []byte) (n int, err error) {
   299  	var _p0 *byte
   300  	if len(buf) > 0 {
   301  		_p0 = &buf[0]
   302  	}
   303  	r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_Getcwd)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), 0, 0, 0, 0)
   304  	n = int(r0)
   305  	if e1 != 0 {
   306  		err = errnoErr(e1)
   307  	}
   308  	return
   309  }
   310  
   311  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   312  
   313  func getgroups(ngid int, gid *_Gid_t) (n int, err error) {
   314  	r0, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&libc_getgroups)), 2, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0, 0, 0, 0)
   315  	n = int(r0)
   316  	if e1 != 0 {
   317  		err = errnoErr(e1)
   318  	}
   319  	return
   320  }
   321  
   322  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   323  
   324  func setgroups(ngid int, gid *_Gid_t) (err error) {
   325  	_, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&libc_setgroups)), 2, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0, 0, 0, 0)
   326  	if e1 != 0 {
   327  		err = errnoErr(e1)
   328  	}
   329  	return
   330  }
   331  
   332  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   333  
   334  func fcntl(fd int, cmd int, arg int) (val int, err error) {
   335  	r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_fcntl)), 3, uintptr(fd), uintptr(cmd), uintptr(arg), 0, 0, 0)
   336  	val = int(r0)
   337  	if e1 != 0 {
   338  		err = errnoErr(e1)
   339  	}
   340  	return
   341  }
   342  
   343  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   344  
   345  func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
   346  	r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_accept)), 3, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), 0, 0, 0)
   347  	fd = int(r0)
   348  	if e1 != 0 {
   349  		err = errnoErr(e1)
   350  	}
   351  	return
   352  }
   353  
   354  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   355  
   356  func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
   357  	r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc___xnet_sendmsg)), 3, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags), 0, 0, 0)
   358  	n = int(r0)
   359  	if e1 != 0 {
   360  		err = errnoErr(e1)
   361  	}
   362  	return
   363  }
   364  
   365  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   366  
   367  func Access(path string, mode uint32) (err error) {
   368  	var _p0 *byte
   369  	_p0, err = BytePtrFromString(path)
   370  	if err != nil {
   371  		return
   372  	}
   373  	_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_Access)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0, 0, 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 Adjtime(delta *Timeval, olddelta *Timeval) (err error) {
   383  	_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_Adjtime)), 2, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0, 0, 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 Chdir(path string) (err error) {
   393  	var _p0 *byte
   394  	_p0, err = BytePtrFromString(path)
   395  	if err != nil {
   396  		return
   397  	}
   398  	_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_Chdir)), 1, uintptr(unsafe.Pointer(_p0)), 0, 0, 0, 0, 0)
   399  	if e1 != 0 {
   400  		err = errnoErr(e1)
   401  	}
   402  	return
   403  }
   404  
   405  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   406  
   407  func Chmod(path string, mode uint32) (err error) {
   408  	var _p0 *byte
   409  	_p0, err = BytePtrFromString(path)
   410  	if err != nil {
   411  		return
   412  	}
   413  	_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_Chmod)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0, 0, 0, 0)
   414  	if e1 != 0 {
   415  		err = errnoErr(e1)
   416  	}
   417  	return
   418  }
   419  
   420  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   421  
   422  func Chown(path string, uid int, gid int) (err error) {
   423  	var _p0 *byte
   424  	_p0, err = BytePtrFromString(path)
   425  	if err != nil {
   426  		return
   427  	}
   428  	_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_Chown)), 3, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), 0, 0, 0)
   429  	if e1 != 0 {
   430  		err = errnoErr(e1)
   431  	}
   432  	return
   433  }
   434  
   435  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   436  
   437  func Chroot(path string) (err error) {
   438  	var _p0 *byte
   439  	_p0, err = BytePtrFromString(path)
   440  	if err != nil {
   441  		return
   442  	}
   443  	_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_Chroot)), 1, uintptr(unsafe.Pointer(_p0)), 0, 0, 0, 0, 0)
   444  	if e1 != 0 {
   445  		err = errnoErr(e1)
   446  	}
   447  	return
   448  }
   449  
   450  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   451  
   452  func Close(fd int) (err error) {
   453  	_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_Close)), 1, uintptr(fd), 0, 0, 0, 0, 0)
   454  	if e1 != 0 {
   455  		err = errnoErr(e1)
   456  	}
   457  	return
   458  }
   459  
   460  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   461  
   462  func Dup(fd int) (nfd int, err error) {
   463  	r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_Dup)), 1, uintptr(fd), 0, 0, 0, 0, 0)
   464  	nfd = int(r0)
   465  	if e1 != 0 {
   466  		err = errnoErr(e1)
   467  	}
   468  	return
   469  }
   470  
   471  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   472  
   473  func Fchdir(fd int) (err error) {
   474  	_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_Fchdir)), 1, uintptr(fd), 0, 0, 0, 0, 0)
   475  	if e1 != 0 {
   476  		err = errnoErr(e1)
   477  	}
   478  	return
   479  }
   480  
   481  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   482  
   483  func Fchmod(fd int, mode uint32) (err error) {
   484  	_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_Fchmod)), 2, uintptr(fd), uintptr(mode), 0, 0, 0, 0)
   485  	if e1 != 0 {
   486  		err = errnoErr(e1)
   487  	}
   488  	return
   489  }
   490  
   491  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   492  
   493  func Fchown(fd int, uid int, gid int) (err error) {
   494  	_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_Fchown)), 3, uintptr(fd), uintptr(uid), uintptr(gid), 0, 0, 0)
   495  	if e1 != 0 {
   496  		err = errnoErr(e1)
   497  	}
   498  	return
   499  }
   500  
   501  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   502  
   503  func Fpathconf(fd int, name int) (val int, err error) {
   504  	r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_Fpathconf)), 2, uintptr(fd), uintptr(name), 0, 0, 0, 0)
   505  	val = int(r0)
   506  	if e1 != 0 {
   507  		err = errnoErr(e1)
   508  	}
   509  	return
   510  }
   511  
   512  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   513  
   514  func Fstat(fd int, stat *Stat_t) (err error) {
   515  	_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_Fstat)), 2, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0, 0, 0, 0)
   516  	if e1 != 0 {
   517  		err = errnoErr(e1)
   518  	}
   519  	return
   520  }
   521  
   522  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   523  
   524  func Getdents(fd int, buf []byte, basep *uintptr) (n int, err error) {
   525  	var _p0 *byte
   526  	if len(buf) > 0 {
   527  		_p0 = &buf[0]
   528  	}
   529  	r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_Getdents)), 4, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0)
   530  	n = int(r0)
   531  	if e1 != 0 {
   532  		err = errnoErr(e1)
   533  	}
   534  	return
   535  }
   536  
   537  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   538  
   539  func Getgid() (gid int) {
   540  	r0, _, _ := rawSysvicall6(uintptr(unsafe.Pointer(&libc_Getgid)), 0, 0, 0, 0, 0, 0, 0)
   541  	gid = int(r0)
   542  	return
   543  }
   544  
   545  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   546  
   547  func Getpid() (pid int) {
   548  	r0, _, _ := rawSysvicall6(uintptr(unsafe.Pointer(&libc_Getpid)), 0, 0, 0, 0, 0, 0, 0)
   549  	pid = int(r0)
   550  	return
   551  }
   552  
   553  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   554  
   555  func Geteuid() (euid int) {
   556  	r0, _, _ := sysvicall6(uintptr(unsafe.Pointer(&libc_Geteuid)), 0, 0, 0, 0, 0, 0, 0)
   557  	euid = int(r0)
   558  	return
   559  }
   560  
   561  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   562  
   563  func Getegid() (egid int) {
   564  	r0, _, _ := sysvicall6(uintptr(unsafe.Pointer(&libc_Getegid)), 0, 0, 0, 0, 0, 0, 0)
   565  	egid = int(r0)
   566  	return
   567  }
   568  
   569  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   570  
   571  func Getppid() (ppid int) {
   572  	r0, _, _ := sysvicall6(uintptr(unsafe.Pointer(&libc_Getppid)), 0, 0, 0, 0, 0, 0, 0)
   573  	ppid = int(r0)
   574  	return
   575  }
   576  
   577  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   578  
   579  func Getpriority(which int, who int) (n int, err error) {
   580  	r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_Getpriority)), 2, uintptr(which), uintptr(who), 0, 0, 0, 0)
   581  	n = int(r0)
   582  	if e1 != 0 {
   583  		err = errnoErr(e1)
   584  	}
   585  	return
   586  }
   587  
   588  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   589  
   590  func Getrlimit(which int, lim *Rlimit) (err error) {
   591  	_, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&libc_Getrlimit)), 2, uintptr(which), uintptr(unsafe.Pointer(lim)), 0, 0, 0, 0)
   592  	if e1 != 0 {
   593  		err = errnoErr(e1)
   594  	}
   595  	return
   596  }
   597  
   598  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   599  
   600  func Getrusage(who int, rusage *Rusage) (err error) {
   601  	_, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&libc_Getrusage)), 2, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0, 0, 0, 0)
   602  	if e1 != 0 {
   603  		err = errnoErr(e1)
   604  	}
   605  	return
   606  }
   607  
   608  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   609  
   610  func Gettimeofday(tv *Timeval) (err error) {
   611  	_, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&libc_Gettimeofday)), 1, uintptr(unsafe.Pointer(tv)), 0, 0, 0, 0, 0)
   612  	if e1 != 0 {
   613  		err = errnoErr(e1)
   614  	}
   615  	return
   616  }
   617  
   618  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   619  
   620  func Getuid() (uid int) {
   621  	r0, _, _ := rawSysvicall6(uintptr(unsafe.Pointer(&libc_Getuid)), 0, 0, 0, 0, 0, 0, 0)
   622  	uid = int(r0)
   623  	return
   624  }
   625  
   626  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   627  
   628  func Kill(pid int, signum Signal) (err error) {
   629  	_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_Kill)), 2, uintptr(pid), uintptr(signum), 0, 0, 0, 0)
   630  	if e1 != 0 {
   631  		err = errnoErr(e1)
   632  	}
   633  	return
   634  }
   635  
   636  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   637  
   638  func Lchown(path string, uid int, gid int) (err error) {
   639  	var _p0 *byte
   640  	_p0, err = BytePtrFromString(path)
   641  	if err != nil {
   642  		return
   643  	}
   644  	_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_Lchown)), 3, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), 0, 0, 0)
   645  	if e1 != 0 {
   646  		err = errnoErr(e1)
   647  	}
   648  	return
   649  }
   650  
   651  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   652  
   653  func Link(path string, link string) (err error) {
   654  	var _p0 *byte
   655  	_p0, err = BytePtrFromString(path)
   656  	if err != nil {
   657  		return
   658  	}
   659  	var _p1 *byte
   660  	_p1, err = BytePtrFromString(link)
   661  	if err != nil {
   662  		return
   663  	}
   664  	_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_Link)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0, 0, 0, 0)
   665  	if e1 != 0 {
   666  		err = errnoErr(e1)
   667  	}
   668  	return
   669  }
   670  
   671  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   672  
   673  func Listen(s int, backlog int) (err error) {
   674  	_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc___xnet_listen)), 2, uintptr(s), uintptr(backlog), 0, 0, 0, 0)
   675  	if e1 != 0 {
   676  		err = errnoErr(e1)
   677  	}
   678  	return
   679  }
   680  
   681  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   682  
   683  func Lstat(path string, stat *Stat_t) (err error) {
   684  	var _p0 *byte
   685  	_p0, err = BytePtrFromString(path)
   686  	if err != nil {
   687  		return
   688  	}
   689  	_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_Lstat)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0, 0, 0, 0)
   690  	if e1 != 0 {
   691  		err = errnoErr(e1)
   692  	}
   693  	return
   694  }
   695  
   696  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   697  
   698  func Mkdir(path string, mode uint32) (err error) {
   699  	var _p0 *byte
   700  	_p0, err = BytePtrFromString(path)
   701  	if err != nil {
   702  		return
   703  	}
   704  	_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_Mkdir)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0, 0, 0, 0)
   705  	if e1 != 0 {
   706  		err = errnoErr(e1)
   707  	}
   708  	return
   709  }
   710  
   711  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   712  
   713  func Mknod(path string, mode uint32, dev int) (err error) {
   714  	var _p0 *byte
   715  	_p0, err = BytePtrFromString(path)
   716  	if err != nil {
   717  		return
   718  	}
   719  	_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_Mknod)), 3, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0, 0)
   720  	if e1 != 0 {
   721  		err = errnoErr(e1)
   722  	}
   723  	return
   724  }
   725  
   726  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   727  
   728  func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
   729  	_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_Nanosleep)), 2, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0, 0, 0, 0)
   730  	if e1 != 0 {
   731  		err = errnoErr(e1)
   732  	}
   733  	return
   734  }
   735  
   736  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   737  
   738  func Open(path string, mode int, perm uint32) (fd int, err error) {
   739  	var _p0 *byte
   740  	_p0, err = BytePtrFromString(path)
   741  	if err != nil {
   742  		return
   743  	}
   744  	r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_Open)), 3, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0, 0)
   745  	fd = int(r0)
   746  	if e1 != 0 {
   747  		err = errnoErr(e1)
   748  	}
   749  	return
   750  }
   751  
   752  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   753  
   754  func Pathconf(path string, name int) (val int, err error) {
   755  	var _p0 *byte
   756  	_p0, err = BytePtrFromString(path)
   757  	if err != nil {
   758  		return
   759  	}
   760  	r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_Pathconf)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0, 0, 0, 0)
   761  	val = int(r0)
   762  	if e1 != 0 {
   763  		err = errnoErr(e1)
   764  	}
   765  	return
   766  }
   767  
   768  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   769  
   770  func pread(fd int, p []byte, offset int64) (n int, err error) {
   771  	var _p0 *byte
   772  	if len(p) > 0 {
   773  		_p0 = &p[0]
   774  	}
   775  	r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_pread)), 4, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), uintptr(offset), 0, 0)
   776  	n = int(r0)
   777  	if e1 != 0 {
   778  		err = errnoErr(e1)
   779  	}
   780  	return
   781  }
   782  
   783  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   784  
   785  func pwrite(fd int, p []byte, offset int64) (n int, err error) {
   786  	var _p0 *byte
   787  	if len(p) > 0 {
   788  		_p0 = &p[0]
   789  	}
   790  	r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_pwrite)), 4, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), uintptr(offset), 0, 0)
   791  	n = int(r0)
   792  	if e1 != 0 {
   793  		err = errnoErr(e1)
   794  	}
   795  	return
   796  }
   797  
   798  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   799  
   800  func read(fd int, p []byte) (n int, err error) {
   801  	var _p0 *byte
   802  	if len(p) > 0 {
   803  		_p0 = &p[0]
   804  	}
   805  	r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_read)), 3, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), 0, 0, 0)
   806  	n = int(r0)
   807  	if e1 != 0 {
   808  		err = errnoErr(e1)
   809  	}
   810  	return
   811  }
   812  
   813  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   814  
   815  func Readlink(path string, buf []byte) (n int, err error) {
   816  	var _p0 *byte
   817  	_p0, err = BytePtrFromString(path)
   818  	if err != nil {
   819  		return
   820  	}
   821  	var _p1 *byte
   822  	if len(buf) > 0 {
   823  		_p1 = &buf[0]
   824  	}
   825  	r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_Readlink)), 3, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(len(buf)), 0, 0, 0)
   826  	n = 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 Rename(from string, to string) (err error) {
   836  	var _p0 *byte
   837  	_p0, err = BytePtrFromString(from)
   838  	if err != nil {
   839  		return
   840  	}
   841  	var _p1 *byte
   842  	_p1, err = BytePtrFromString(to)
   843  	if err != nil {
   844  		return
   845  	}
   846  	_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_Rename)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0, 0, 0, 0)
   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 Rmdir(path string) (err error) {
   856  	var _p0 *byte
   857  	_p0, err = BytePtrFromString(path)
   858  	if err != nil {
   859  		return
   860  	}
   861  	_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_Rmdir)), 1, uintptr(unsafe.Pointer(_p0)), 0, 0, 0, 0, 0)
   862  	if e1 != 0 {
   863  		err = errnoErr(e1)
   864  	}
   865  	return
   866  }
   867  
   868  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   869  
   870  func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
   871  	r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_lseek)), 3, uintptr(fd), uintptr(offset), uintptr(whence), 0, 0, 0)
   872  	newoffset = int64(r0)
   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 sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
   882  	r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_sendfile)), 4, uintptr(outfd), uintptr(infd), uintptr(unsafe.Pointer(offset)), uintptr(count), 0, 0)
   883  	written = int(r0)
   884  	if e1 != 0 {
   885  		err = errnoErr(e1)
   886  	}
   887  	return
   888  }
   889  
   890  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   891  
   892  func Setegid(egid int) (err error) {
   893  	_, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&libc_Setegid)), 1, uintptr(egid), 0, 0, 0, 0, 0)
   894  	if e1 != 0 {
   895  		err = errnoErr(e1)
   896  	}
   897  	return
   898  }
   899  
   900  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   901  
   902  func Seteuid(euid int) (err error) {
   903  	_, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&libc_Seteuid)), 1, uintptr(euid), 0, 0, 0, 0, 0)
   904  	if e1 != 0 {
   905  		err = errnoErr(e1)
   906  	}
   907  	return
   908  }
   909  
   910  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   911  
   912  func Setgid(gid int) (err error) {
   913  	_, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&libc_Setgid)), 1, uintptr(gid), 0, 0, 0, 0, 0)
   914  	if e1 != 0 {
   915  		err = errnoErr(e1)
   916  	}
   917  	return
   918  }
   919  
   920  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   921  
   922  func Setpgid(pid int, pgid int) (err error) {
   923  	_, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&libc_Setpgid)), 2, uintptr(pid), uintptr(pgid), 0, 0, 0, 0)
   924  	if e1 != 0 {
   925  		err = errnoErr(e1)
   926  	}
   927  	return
   928  }
   929  
   930  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   931  
   932  func Setpriority(which int, who int, prio int) (err error) {
   933  	_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_Setpriority)), 3, uintptr(which), uintptr(who), uintptr(prio), 0, 0, 0)
   934  	if e1 != 0 {
   935  		err = errnoErr(e1)
   936  	}
   937  	return
   938  }
   939  
   940  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   941  
   942  func Setregid(rgid int, egid int) (err error) {
   943  	_, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&libc_Setregid)), 2, uintptr(rgid), uintptr(egid), 0, 0, 0, 0)
   944  	if e1 != 0 {
   945  		err = errnoErr(e1)
   946  	}
   947  	return
   948  }
   949  
   950  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   951  
   952  func Setreuid(ruid int, euid int) (err error) {
   953  	_, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&libc_Setreuid)), 2, uintptr(ruid), uintptr(euid), 0, 0, 0, 0)
   954  	if e1 != 0 {
   955  		err = errnoErr(e1)
   956  	}
   957  	return
   958  }
   959  
   960  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   961  
   962  func Setrlimit(which int, lim *Rlimit) (err error) {
   963  	_, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&libc_Setrlimit)), 2, uintptr(which), uintptr(unsafe.Pointer(lim)), 0, 0, 0, 0)
   964  	if e1 != 0 {
   965  		err = errnoErr(e1)
   966  	}
   967  	return
   968  }
   969  
   970  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   971  
   972  func Setsid() (pid int, err error) {
   973  	r0, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&libc_Setsid)), 0, 0, 0, 0, 0, 0, 0)
   974  	pid = int(r0)
   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 Setuid(uid int) (err error) {
   984  	_, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&libc_Setuid)), 1, uintptr(uid), 0, 0, 0, 0, 0)
   985  	if e1 != 0 {
   986  		err = errnoErr(e1)
   987  	}
   988  	return
   989  }
   990  
   991  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   992  
   993  func Shutdown(s int, how int) (err error) {
   994  	_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_shutdown)), 2, uintptr(s), uintptr(how), 0, 0, 0, 0)
   995  	if e1 != 0 {
   996  		err = errnoErr(e1)
   997  	}
   998  	return
   999  }
  1000  
  1001  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1002  
  1003  func Stat(path string, stat *Stat_t) (err error) {
  1004  	var _p0 *byte
  1005  	_p0, err = BytePtrFromString(path)
  1006  	if err != nil {
  1007  		return
  1008  	}
  1009  	_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_Stat)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0, 0, 0, 0)
  1010  	if e1 != 0 {
  1011  		err = errnoErr(e1)
  1012  	}
  1013  	return
  1014  }
  1015  
  1016  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1017  
  1018  func Symlink(path string, link string) (err error) {
  1019  	var _p0 *byte
  1020  	_p0, err = BytePtrFromString(path)
  1021  	if err != nil {
  1022  		return
  1023  	}
  1024  	var _p1 *byte
  1025  	_p1, err = BytePtrFromString(link)
  1026  	if err != nil {
  1027  		return
  1028  	}
  1029  	_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_Symlink)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0, 0, 0, 0)
  1030  	if e1 != 0 {
  1031  		err = errnoErr(e1)
  1032  	}
  1033  	return
  1034  }
  1035  
  1036  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1037  
  1038  func Sync() (err error) {
  1039  	_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_Sync)), 0, 0, 0, 0, 0, 0, 0)
  1040  	if e1 != 0 {
  1041  		err = errnoErr(e1)
  1042  	}
  1043  	return
  1044  }
  1045  
  1046  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1047  
  1048  func Truncate(path string, length int64) (err error) {
  1049  	var _p0 *byte
  1050  	_p0, err = BytePtrFromString(path)
  1051  	if err != nil {
  1052  		return
  1053  	}
  1054  	_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_Truncate)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0, 0, 0, 0)
  1055  	if e1 != 0 {
  1056  		err = errnoErr(e1)
  1057  	}
  1058  	return
  1059  }
  1060  
  1061  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1062  
  1063  func Fsync(fd int) (err error) {
  1064  	_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_Fsync)), 1, uintptr(fd), 0, 0, 0, 0, 0)
  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 Ftruncate(fd int, length int64) (err error) {
  1074  	_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_Ftruncate)), 2, uintptr(fd), uintptr(length), 0, 0, 0, 0)
  1075  	if e1 != 0 {
  1076  		err = errnoErr(e1)
  1077  	}
  1078  	return
  1079  }
  1080  
  1081  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1082  
  1083  func Umask(newmask int) (oldmask int) {
  1084  	r0, _, _ := sysvicall6(uintptr(unsafe.Pointer(&libc_Umask)), 1, uintptr(newmask), 0, 0, 0, 0, 0)
  1085  	oldmask = int(r0)
  1086  	return
  1087  }
  1088  
  1089  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1090  
  1091  func Unlink(path string) (err error) {
  1092  	var _p0 *byte
  1093  	_p0, err = BytePtrFromString(path)
  1094  	if err != nil {
  1095  		return
  1096  	}
  1097  	_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_Unlink)), 1, uintptr(unsafe.Pointer(_p0)), 0, 0, 0, 0, 0)
  1098  	if e1 != 0 {
  1099  		err = errnoErr(e1)
  1100  	}
  1101  	return
  1102  }
  1103  
  1104  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1105  
  1106  func utimes(path string, times *[2]Timeval) (err error) {
  1107  	var _p0 *byte
  1108  	_p0, err = BytePtrFromString(path)
  1109  	if err != nil {
  1110  		return
  1111  	}
  1112  	_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_utimes)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), 0, 0, 0, 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 bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
  1122  	_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc___xnet_bind)), 3, uintptr(s), uintptr(addr), uintptr(addrlen), 0, 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 connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
  1132  	_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc___xnet_connect)), 3, uintptr(s), uintptr(addr), uintptr(addrlen), 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 mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {
  1142  	r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_mmap)), 6, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos))
  1143  	ret = uintptr(r0)
  1144  	if e1 != 0 {
  1145  		err = errnoErr(e1)
  1146  	}
  1147  	return
  1148  }
  1149  
  1150  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1151  
  1152  func munmap(addr uintptr, length uintptr) (err error) {
  1153  	_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_munmap)), 2, uintptr(addr), uintptr(length), 0, 0, 0, 0)
  1154  	if e1 != 0 {
  1155  		err = errnoErr(e1)
  1156  	}
  1157  	return
  1158  }
  1159  
  1160  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1161  
  1162  func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {
  1163  	var _p0 *byte
  1164  	if len(buf) > 0 {
  1165  		_p0 = &buf[0]
  1166  	}
  1167  	_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc___xnet_sendto)), 6, uintptr(s), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
  1168  	if e1 != 0 {
  1169  		err = errnoErr(e1)
  1170  	}
  1171  	return
  1172  }
  1173  
  1174  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1175  
  1176  func socket(domain int, typ int, proto int) (fd int, err error) {
  1177  	r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc___xnet_socket)), 3, uintptr(domain), uintptr(typ), uintptr(proto), 0, 0, 0)
  1178  	fd = int(r0)
  1179  	if e1 != 0 {
  1180  		err = errnoErr(e1)
  1181  	}
  1182  	return
  1183  }
  1184  
  1185  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1186  
  1187  func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
  1188  	_, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&libc___xnet_socketpair)), 4, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
  1189  	if e1 != 0 {
  1190  		err = errnoErr(e1)
  1191  	}
  1192  	return
  1193  }
  1194  
  1195  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1196  
  1197  func write(fd int, p []byte) (n int, err error) {
  1198  	var _p0 *byte
  1199  	if len(p) > 0 {
  1200  		_p0 = &p[0]
  1201  	}
  1202  	r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_write)), 3, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), 0, 0, 0)
  1203  	n = int(r0)
  1204  	if e1 != 0 {
  1205  		err = errnoErr(e1)
  1206  	}
  1207  	return
  1208  }
  1209  
  1210  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1211  
  1212  func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {
  1213  	_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc___xnet_getsockopt)), 5, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
  1214  	if e1 != 0 {
  1215  		err = errnoErr(e1)
  1216  	}
  1217  	return
  1218  }
  1219  
  1220  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1221  
  1222  func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
  1223  	_, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&libc_getpeername)), 3, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), 0, 0, 0)
  1224  	if e1 != 0 {
  1225  		err = errnoErr(e1)
  1226  	}
  1227  	return
  1228  }
  1229  
  1230  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1231  
  1232  func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
  1233  	_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_getsockname)), 3, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), 0, 0, 0)
  1234  	if e1 != 0 {
  1235  		err = errnoErr(e1)
  1236  	}
  1237  	return
  1238  }
  1239  
  1240  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1241  
  1242  func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {
  1243  	_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_setsockopt)), 5, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
  1244  	if e1 != 0 {
  1245  		err = errnoErr(e1)
  1246  	}
  1247  	return
  1248  }
  1249  
  1250  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1251  
  1252  func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {
  1253  	var _p0 *byte
  1254  	if len(p) > 0 {
  1255  		_p0 = &p[0]
  1256  	}
  1257  	r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_recvfrom)), 6, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
  1258  	n = int(r0)
  1259  	if e1 != 0 {
  1260  		err = errnoErr(e1)
  1261  	}
  1262  	return
  1263  }
  1264  
  1265  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1266  
  1267  func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
  1268  	r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc___xnet_recvmsg)), 3, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags), 0, 0, 0)
  1269  	n = int(r0)
  1270  	if e1 != 0 {
  1271  		err = errnoErr(e1)
  1272  	}
  1273  	return
  1274  }
  1275  
  1276  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1277  
  1278  func getexecname() (path unsafe.Pointer, err error) {
  1279  	r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_getexecname)), 0, 0, 0, 0, 0, 0, 0)
  1280  	path = unsafe.Pointer(r0)
  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 utimensat(dirfd int, path string, times *[2]Timespec, flag int) (err error) {
  1290  	var _p0 *byte
  1291  	_p0, err = BytePtrFromString(path)
  1292  	if err != nil {
  1293  		return
  1294  	}
  1295  	_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_utimensat)), 4, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flag), 0, 0)
  1296  	if e1 != 0 {
  1297  		err = errnoErr(e1)
  1298  	}
  1299  	return
  1300  }
  1301  

View as plain text