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

View as plain text