github.com/alexis81/domosgo@v0.0.0-20191016125037-5aee90a434af/Domos/src/golang.org/x/sys/unix/zsyscall_solaris_amd64.go (about) 1 // mksyscall_solaris.pl -tags solaris,amd64 syscall_solaris.go syscall_solaris_amd64.go 2 // Code generated by the command above; see README.md. DO NOT EDIT. 3 4 // +build solaris,amd64 5 6 package unix 7 8 import ( 9 "syscall" 10 "unsafe" 11 ) 12 13 //go:cgo_import_dynamic libc_pipe pipe "libc.so" 14 //go:cgo_import_dynamic libc_getsockname getsockname "libsocket.so" 15 //go:cgo_import_dynamic libc_getcwd getcwd "libc.so" 16 //go:cgo_import_dynamic libc_getgroups getgroups "libc.so" 17 //go:cgo_import_dynamic libc_setgroups setgroups "libc.so" 18 //go:cgo_import_dynamic libc_wait4 wait4 "libc.so" 19 //go:cgo_import_dynamic libc_gethostname gethostname "libc.so" 20 //go:cgo_import_dynamic libc_utimes utimes "libc.so" 21 //go:cgo_import_dynamic libc_utimensat utimensat "libc.so" 22 //go:cgo_import_dynamic libc_fcntl fcntl "libc.so" 23 //go:cgo_import_dynamic libc_futimesat futimesat "libc.so" 24 //go:cgo_import_dynamic libc_accept accept "libsocket.so" 25 //go:cgo_import_dynamic libc___xnet_recvmsg __xnet_recvmsg "libsocket.so" 26 //go:cgo_import_dynamic libc___xnet_sendmsg __xnet_sendmsg "libsocket.so" 27 //go:cgo_import_dynamic libc_acct acct "libc.so" 28 //go:cgo_import_dynamic libc___makedev __makedev "libc.so" 29 //go:cgo_import_dynamic libc___major __major "libc.so" 30 //go:cgo_import_dynamic libc___minor __minor "libc.so" 31 //go:cgo_import_dynamic libc_ioctl ioctl "libc.so" 32 //go:cgo_import_dynamic libc_poll poll "libc.so" 33 //go:cgo_import_dynamic libc_access access "libc.so" 34 //go:cgo_import_dynamic libc_adjtime adjtime "libc.so" 35 //go:cgo_import_dynamic libc_chdir chdir "libc.so" 36 //go:cgo_import_dynamic libc_chmod chmod "libc.so" 37 //go:cgo_import_dynamic libc_chown chown "libc.so" 38 //go:cgo_import_dynamic libc_chroot chroot "libc.so" 39 //go:cgo_import_dynamic libc_close close "libc.so" 40 //go:cgo_import_dynamic libc_creat creat "libc.so" 41 //go:cgo_import_dynamic libc_dup dup "libc.so" 42 //go:cgo_import_dynamic libc_dup2 dup2 "libc.so" 43 //go:cgo_import_dynamic libc_exit exit "libc.so" 44 //go:cgo_import_dynamic libc_fchdir fchdir "libc.so" 45 //go:cgo_import_dynamic libc_fchmod fchmod "libc.so" 46 //go:cgo_import_dynamic libc_fchmodat fchmodat "libc.so" 47 //go:cgo_import_dynamic libc_fchown fchown "libc.so" 48 //go:cgo_import_dynamic libc_fchownat fchownat "libc.so" 49 //go:cgo_import_dynamic libc_fdatasync fdatasync "libc.so" 50 //go:cgo_import_dynamic libc_flock flock "libc.so" 51 //go:cgo_import_dynamic libc_fpathconf fpathconf "libc.so" 52 //go:cgo_import_dynamic libc_fstat fstat "libc.so" 53 //go:cgo_import_dynamic libc_fstatat fstatat "libc.so" 54 //go:cgo_import_dynamic libc_fstatvfs fstatvfs "libc.so" 55 //go:cgo_import_dynamic libc_getdents getdents "libc.so" 56 //go:cgo_import_dynamic libc_getgid getgid "libc.so" 57 //go:cgo_import_dynamic libc_getpid getpid "libc.so" 58 //go:cgo_import_dynamic libc_getpgid getpgid "libc.so" 59 //go:cgo_import_dynamic libc_getpgrp getpgrp "libc.so" 60 //go:cgo_import_dynamic libc_geteuid geteuid "libc.so" 61 //go:cgo_import_dynamic libc_getegid getegid "libc.so" 62 //go:cgo_import_dynamic libc_getppid getppid "libc.so" 63 //go:cgo_import_dynamic libc_getpriority getpriority "libc.so" 64 //go:cgo_import_dynamic libc_getrlimit getrlimit "libc.so" 65 //go:cgo_import_dynamic libc_getrusage getrusage "libc.so" 66 //go:cgo_import_dynamic libc_gettimeofday gettimeofday "libc.so" 67 //go:cgo_import_dynamic libc_getuid getuid "libc.so" 68 //go:cgo_import_dynamic libc_kill kill "libc.so" 69 //go:cgo_import_dynamic libc_lchown lchown "libc.so" 70 //go:cgo_import_dynamic libc_link link "libc.so" 71 //go:cgo_import_dynamic libc___xnet_llisten __xnet_llisten "libsocket.so" 72 //go:cgo_import_dynamic libc_lstat lstat "libc.so" 73 //go:cgo_import_dynamic libc_madvise madvise "libc.so" 74 //go:cgo_import_dynamic libc_mkdir mkdir "libc.so" 75 //go:cgo_import_dynamic libc_mkdirat mkdirat "libc.so" 76 //go:cgo_import_dynamic libc_mkfifo mkfifo "libc.so" 77 //go:cgo_import_dynamic libc_mkfifoat mkfifoat "libc.so" 78 //go:cgo_import_dynamic libc_mknod mknod "libc.so" 79 //go:cgo_import_dynamic libc_mknodat mknodat "libc.so" 80 //go:cgo_import_dynamic libc_mlock mlock "libc.so" 81 //go:cgo_import_dynamic libc_mlockall mlockall "libc.so" 82 //go:cgo_import_dynamic libc_mprotect mprotect "libc.so" 83 //go:cgo_import_dynamic libc_msync msync "libc.so" 84 //go:cgo_import_dynamic libc_munlock munlock "libc.so" 85 //go:cgo_import_dynamic libc_munlockall munlockall "libc.so" 86 //go:cgo_import_dynamic libc_nanosleep nanosleep "libc.so" 87 //go:cgo_import_dynamic libc_open open "libc.so" 88 //go:cgo_import_dynamic libc_openat openat "libc.so" 89 //go:cgo_import_dynamic libc_pathconf pathconf "libc.so" 90 //go:cgo_import_dynamic libc_pause pause "libc.so" 91 //go:cgo_import_dynamic libc_pread pread "libc.so" 92 //go:cgo_import_dynamic libc_pwrite pwrite "libc.so" 93 //go:cgo_import_dynamic libc_read read "libc.so" 94 //go:cgo_import_dynamic libc_readlink readlink "libc.so" 95 //go:cgo_import_dynamic libc_rename rename "libc.so" 96 //go:cgo_import_dynamic libc_renameat renameat "libc.so" 97 //go:cgo_import_dynamic libc_rmdir rmdir "libc.so" 98 //go:cgo_import_dynamic libc_lseek lseek "libc.so" 99 //go:cgo_import_dynamic libc_select select "libc.so" 100 //go:cgo_import_dynamic libc_setegid setegid "libc.so" 101 //go:cgo_import_dynamic libc_seteuid seteuid "libc.so" 102 //go:cgo_import_dynamic libc_setgid setgid "libc.so" 103 //go:cgo_import_dynamic libc_sethostname sethostname "libc.so" 104 //go:cgo_import_dynamic libc_setpgid setpgid "libc.so" 105 //go:cgo_import_dynamic libc_setpriority setpriority "libc.so" 106 //go:cgo_import_dynamic libc_setregid setregid "libc.so" 107 //go:cgo_import_dynamic libc_setreuid setreuid "libc.so" 108 //go:cgo_import_dynamic libc_setrlimit setrlimit "libc.so" 109 //go:cgo_import_dynamic libc_setsid setsid "libc.so" 110 //go:cgo_import_dynamic libc_setuid setuid "libc.so" 111 //go:cgo_import_dynamic libc_shutdown shutdown "libsocket.so" 112 //go:cgo_import_dynamic libc_stat stat "libc.so" 113 //go:cgo_import_dynamic libc_statvfs statvfs "libc.so" 114 //go:cgo_import_dynamic libc_symlink symlink "libc.so" 115 //go:cgo_import_dynamic libc_sync sync "libc.so" 116 //go:cgo_import_dynamic libc_times times "libc.so" 117 //go:cgo_import_dynamic libc_truncate truncate "libc.so" 118 //go:cgo_import_dynamic libc_fsync fsync "libc.so" 119 //go:cgo_import_dynamic libc_ftruncate ftruncate "libc.so" 120 //go:cgo_import_dynamic libc_umask umask "libc.so" 121 //go:cgo_import_dynamic libc_uname uname "libc.so" 122 //go:cgo_import_dynamic libc_umount umount "libc.so" 123 //go:cgo_import_dynamic libc_unlink unlink "libc.so" 124 //go:cgo_import_dynamic libc_unlinkat unlinkat "libc.so" 125 //go:cgo_import_dynamic libc_ustat ustat "libc.so" 126 //go:cgo_import_dynamic libc_utime utime "libc.so" 127 //go:cgo_import_dynamic libc___xnet_bind __xnet_bind "libsocket.so" 128 //go:cgo_import_dynamic libc___xnet_connect __xnet_connect "libsocket.so" 129 //go:cgo_import_dynamic libc_mmap mmap "libc.so" 130 //go:cgo_import_dynamic libc_munmap munmap "libc.so" 131 //go:cgo_import_dynamic libc_sendfile sendfile "libsendfile.so" 132 //go:cgo_import_dynamic libc___xnet_sendto __xnet_sendto "libsocket.so" 133 //go:cgo_import_dynamic libc___xnet_socket __xnet_socket "libsocket.so" 134 //go:cgo_import_dynamic libc___xnet_socketpair __xnet_socketpair "libsocket.so" 135 //go:cgo_import_dynamic libc_write write "libc.so" 136 //go:cgo_import_dynamic libc___xnet_getsockopt __xnet_getsockopt "libsocket.so" 137 //go:cgo_import_dynamic libc_getpeername getpeername "libsocket.so" 138 //go:cgo_import_dynamic libc_setsockopt setsockopt "libsocket.so" 139 //go:cgo_import_dynamic libc_recvfrom recvfrom "libsocket.so" 140 141 //go:linkname procpipe libc_pipe 142 //go:linkname procgetsockname libc_getsockname 143 //go:linkname procGetcwd libc_getcwd 144 //go:linkname procgetgroups libc_getgroups 145 //go:linkname procsetgroups libc_setgroups 146 //go:linkname procwait4 libc_wait4 147 //go:linkname procgethostname libc_gethostname 148 //go:linkname procutimes libc_utimes 149 //go:linkname procutimensat libc_utimensat 150 //go:linkname procfcntl libc_fcntl 151 //go:linkname procfutimesat libc_futimesat 152 //go:linkname procaccept libc_accept 153 //go:linkname proc__xnet_recvmsg libc___xnet_recvmsg 154 //go:linkname proc__xnet_sendmsg libc___xnet_sendmsg 155 //go:linkname procacct libc_acct 156 //go:linkname proc__makedev libc___makedev 157 //go:linkname proc__major libc___major 158 //go:linkname proc__minor libc___minor 159 //go:linkname procioctl libc_ioctl 160 //go:linkname procpoll libc_poll 161 //go:linkname procAccess libc_access 162 //go:linkname procAdjtime libc_adjtime 163 //go:linkname procChdir libc_chdir 164 //go:linkname procChmod libc_chmod 165 //go:linkname procChown libc_chown 166 //go:linkname procChroot libc_chroot 167 //go:linkname procClose libc_close 168 //go:linkname procCreat libc_creat 169 //go:linkname procDup libc_dup 170 //go:linkname procDup2 libc_dup2 171 //go:linkname procExit libc_exit 172 //go:linkname procFchdir libc_fchdir 173 //go:linkname procFchmod libc_fchmod 174 //go:linkname procFchmodat libc_fchmodat 175 //go:linkname procFchown libc_fchown 176 //go:linkname procFchownat libc_fchownat 177 //go:linkname procFdatasync libc_fdatasync 178 //go:linkname procFlock libc_flock 179 //go:linkname procFpathconf libc_fpathconf 180 //go:linkname procFstat libc_fstat 181 //go:linkname procFstatat libc_fstatat 182 //go:linkname procFstatvfs libc_fstatvfs 183 //go:linkname procGetdents libc_getdents 184 //go:linkname procGetgid libc_getgid 185 //go:linkname procGetpid libc_getpid 186 //go:linkname procGetpgid libc_getpgid 187 //go:linkname procGetpgrp libc_getpgrp 188 //go:linkname procGeteuid libc_geteuid 189 //go:linkname procGetegid libc_getegid 190 //go:linkname procGetppid libc_getppid 191 //go:linkname procGetpriority libc_getpriority 192 //go:linkname procGetrlimit libc_getrlimit 193 //go:linkname procGetrusage libc_getrusage 194 //go:linkname procGettimeofday libc_gettimeofday 195 //go:linkname procGetuid libc_getuid 196 //go:linkname procKill libc_kill 197 //go:linkname procLchown libc_lchown 198 //go:linkname procLink libc_link 199 //go:linkname proc__xnet_llisten libc___xnet_llisten 200 //go:linkname procLstat libc_lstat 201 //go:linkname procMadvise libc_madvise 202 //go:linkname procMkdir libc_mkdir 203 //go:linkname procMkdirat libc_mkdirat 204 //go:linkname procMkfifo libc_mkfifo 205 //go:linkname procMkfifoat libc_mkfifoat 206 //go:linkname procMknod libc_mknod 207 //go:linkname procMknodat libc_mknodat 208 //go:linkname procMlock libc_mlock 209 //go:linkname procMlockall libc_mlockall 210 //go:linkname procMprotect libc_mprotect 211 //go:linkname procMsync libc_msync 212 //go:linkname procMunlock libc_munlock 213 //go:linkname procMunlockall libc_munlockall 214 //go:linkname procNanosleep libc_nanosleep 215 //go:linkname procOpen libc_open 216 //go:linkname procOpenat libc_openat 217 //go:linkname procPathconf libc_pathconf 218 //go:linkname procPause libc_pause 219 //go:linkname procPread libc_pread 220 //go:linkname procPwrite libc_pwrite 221 //go:linkname procread libc_read 222 //go:linkname procReadlink libc_readlink 223 //go:linkname procRename libc_rename 224 //go:linkname procRenameat libc_renameat 225 //go:linkname procRmdir libc_rmdir 226 //go:linkname proclseek libc_lseek 227 //go:linkname procSelect libc_select 228 //go:linkname procSetegid libc_setegid 229 //go:linkname procSeteuid libc_seteuid 230 //go:linkname procSetgid libc_setgid 231 //go:linkname procSethostname libc_sethostname 232 //go:linkname procSetpgid libc_setpgid 233 //go:linkname procSetpriority libc_setpriority 234 //go:linkname procSetregid libc_setregid 235 //go:linkname procSetreuid libc_setreuid 236 //go:linkname procSetrlimit libc_setrlimit 237 //go:linkname procSetsid libc_setsid 238 //go:linkname procSetuid libc_setuid 239 //go:linkname procshutdown libc_shutdown 240 //go:linkname procStat libc_stat 241 //go:linkname procStatvfs libc_statvfs 242 //go:linkname procSymlink libc_symlink 243 //go:linkname procSync libc_sync 244 //go:linkname procTimes libc_times 245 //go:linkname procTruncate libc_truncate 246 //go:linkname procFsync libc_fsync 247 //go:linkname procFtruncate libc_ftruncate 248 //go:linkname procUmask libc_umask 249 //go:linkname procUname libc_uname 250 //go:linkname procumount libc_umount 251 //go:linkname procUnlink libc_unlink 252 //go:linkname procUnlinkat libc_unlinkat 253 //go:linkname procUstat libc_ustat 254 //go:linkname procUtime libc_utime 255 //go:linkname proc__xnet_bind libc___xnet_bind 256 //go:linkname proc__xnet_connect libc___xnet_connect 257 //go:linkname procmmap libc_mmap 258 //go:linkname procmunmap libc_munmap 259 //go:linkname procsendfile libc_sendfile 260 //go:linkname proc__xnet_sendto libc___xnet_sendto 261 //go:linkname proc__xnet_socket libc___xnet_socket 262 //go:linkname proc__xnet_socketpair libc___xnet_socketpair 263 //go:linkname procwrite libc_write 264 //go:linkname proc__xnet_getsockopt libc___xnet_getsockopt 265 //go:linkname procgetpeername libc_getpeername 266 //go:linkname procsetsockopt libc_setsockopt 267 //go:linkname procrecvfrom libc_recvfrom 268 269 var ( 270 procpipe, 271 procgetsockname, 272 procGetcwd, 273 procgetgroups, 274 procsetgroups, 275 procwait4, 276 procgethostname, 277 procutimes, 278 procutimensat, 279 procfcntl, 280 procfutimesat, 281 procaccept, 282 proc__xnet_recvmsg, 283 proc__xnet_sendmsg, 284 procacct, 285 proc__makedev, 286 proc__major, 287 proc__minor, 288 procioctl, 289 procpoll, 290 procAccess, 291 procAdjtime, 292 procChdir, 293 procChmod, 294 procChown, 295 procChroot, 296 procClose, 297 procCreat, 298 procDup, 299 procDup2, 300 procExit, 301 procFchdir, 302 procFchmod, 303 procFchmodat, 304 procFchown, 305 procFchownat, 306 procFdatasync, 307 procFlock, 308 procFpathconf, 309 procFstat, 310 procFstatat, 311 procFstatvfs, 312 procGetdents, 313 procGetgid, 314 procGetpid, 315 procGetpgid, 316 procGetpgrp, 317 procGeteuid, 318 procGetegid, 319 procGetppid, 320 procGetpriority, 321 procGetrlimit, 322 procGetrusage, 323 procGettimeofday, 324 procGetuid, 325 procKill, 326 procLchown, 327 procLink, 328 proc__xnet_llisten, 329 procLstat, 330 procMadvise, 331 procMkdir, 332 procMkdirat, 333 procMkfifo, 334 procMkfifoat, 335 procMknod, 336 procMknodat, 337 procMlock, 338 procMlockall, 339 procMprotect, 340 procMsync, 341 procMunlock, 342 procMunlockall, 343 procNanosleep, 344 procOpen, 345 procOpenat, 346 procPathconf, 347 procPause, 348 procPread, 349 procPwrite, 350 procread, 351 procReadlink, 352 procRename, 353 procRenameat, 354 procRmdir, 355 proclseek, 356 procSelect, 357 procSetegid, 358 procSeteuid, 359 procSetgid, 360 procSethostname, 361 procSetpgid, 362 procSetpriority, 363 procSetregid, 364 procSetreuid, 365 procSetrlimit, 366 procSetsid, 367 procSetuid, 368 procshutdown, 369 procStat, 370 procStatvfs, 371 procSymlink, 372 procSync, 373 procTimes, 374 procTruncate, 375 procFsync, 376 procFtruncate, 377 procUmask, 378 procUname, 379 procumount, 380 procUnlink, 381 procUnlinkat, 382 procUstat, 383 procUtime, 384 proc__xnet_bind, 385 proc__xnet_connect, 386 procmmap, 387 procmunmap, 388 procsendfile, 389 proc__xnet_sendto, 390 proc__xnet_socket, 391 proc__xnet_socketpair, 392 procwrite, 393 proc__xnet_getsockopt, 394 procgetpeername, 395 procsetsockopt, 396 procrecvfrom syscallFunc 397 ) 398 399 func pipe(p *[2]_C_int) (n int, err error) { 400 r0, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procpipe)), 1, uintptr(unsafe.Pointer(p)), 0, 0, 0, 0, 0) 401 n = int(r0) 402 if e1 != 0 { 403 err = e1 404 } 405 return 406 } 407 408 func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { 409 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procgetsockname)), 3, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), 0, 0, 0) 410 if e1 != 0 { 411 err = e1 412 } 413 return 414 } 415 416 func Getcwd(buf []byte) (n int, err error) { 417 var _p0 *byte 418 if len(buf) > 0 { 419 _p0 = &buf[0] 420 } 421 r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procGetcwd)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), 0, 0, 0, 0) 422 n = int(r0) 423 if e1 != 0 { 424 err = e1 425 } 426 return 427 } 428 429 func getgroups(ngid int, gid *_Gid_t) (n int, err error) { 430 r0, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procgetgroups)), 2, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0, 0, 0, 0) 431 n = int(r0) 432 if e1 != 0 { 433 err = e1 434 } 435 return 436 } 437 438 func setgroups(ngid int, gid *_Gid_t) (err error) { 439 _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procsetgroups)), 2, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0, 0, 0, 0) 440 if e1 != 0 { 441 err = e1 442 } 443 return 444 } 445 446 func wait4(pid int32, statusp *_C_int, options int, rusage *Rusage) (wpid int32, err error) { 447 r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procwait4)), 4, uintptr(pid), uintptr(unsafe.Pointer(statusp)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0) 448 wpid = int32(r0) 449 if e1 != 0 { 450 err = e1 451 } 452 return 453 } 454 455 func gethostname(buf []byte) (n int, err error) { 456 var _p0 *byte 457 if len(buf) > 0 { 458 _p0 = &buf[0] 459 } 460 r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procgethostname)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), 0, 0, 0, 0) 461 n = int(r0) 462 if e1 != 0 { 463 err = e1 464 } 465 return 466 } 467 468 func utimes(path string, times *[2]Timeval) (err error) { 469 var _p0 *byte 470 _p0, err = BytePtrFromString(path) 471 if err != nil { 472 return 473 } 474 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procutimes)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), 0, 0, 0, 0) 475 if e1 != 0 { 476 err = e1 477 } 478 return 479 } 480 481 func utimensat(fd int, path string, times *[2]Timespec, flag int) (err error) { 482 var _p0 *byte 483 _p0, err = BytePtrFromString(path) 484 if err != nil { 485 return 486 } 487 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procutimensat)), 4, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flag), 0, 0) 488 if e1 != 0 { 489 err = e1 490 } 491 return 492 } 493 494 func fcntl(fd int, cmd int, arg int) (val int, err error) { 495 r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procfcntl)), 3, uintptr(fd), uintptr(cmd), uintptr(arg), 0, 0, 0) 496 val = int(r0) 497 if e1 != 0 { 498 err = e1 499 } 500 return 501 } 502 503 func futimesat(fildes int, path *byte, times *[2]Timeval) (err error) { 504 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procfutimesat)), 3, uintptr(fildes), uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(times)), 0, 0, 0) 505 if e1 != 0 { 506 err = e1 507 } 508 return 509 } 510 511 func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) { 512 r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procaccept)), 3, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), 0, 0, 0) 513 fd = int(r0) 514 if e1 != 0 { 515 err = e1 516 } 517 return 518 } 519 520 func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) { 521 r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&proc__xnet_recvmsg)), 3, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags), 0, 0, 0) 522 n = int(r0) 523 if e1 != 0 { 524 err = e1 525 } 526 return 527 } 528 529 func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) { 530 r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&proc__xnet_sendmsg)), 3, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags), 0, 0, 0) 531 n = int(r0) 532 if e1 != 0 { 533 err = e1 534 } 535 return 536 } 537 538 func acct(path *byte) (err error) { 539 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procacct)), 1, uintptr(unsafe.Pointer(path)), 0, 0, 0, 0, 0) 540 if e1 != 0 { 541 err = e1 542 } 543 return 544 } 545 546 func __makedev(version int, major uint, minor uint) (val uint64) { 547 r0, _, _ := sysvicall6(uintptr(unsafe.Pointer(&proc__makedev)), 3, uintptr(version), uintptr(major), uintptr(minor), 0, 0, 0) 548 val = uint64(r0) 549 return 550 } 551 552 func __major(version int, dev uint64) (val uint) { 553 r0, _, _ := sysvicall6(uintptr(unsafe.Pointer(&proc__major)), 2, uintptr(version), uintptr(dev), 0, 0, 0, 0) 554 val = uint(r0) 555 return 556 } 557 558 func __minor(version int, dev uint64) (val uint) { 559 r0, _, _ := sysvicall6(uintptr(unsafe.Pointer(&proc__minor)), 2, uintptr(version), uintptr(dev), 0, 0, 0, 0) 560 val = uint(r0) 561 return 562 } 563 564 func ioctl(fd int, req uint, arg uintptr) (err error) { 565 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procioctl)), 3, uintptr(fd), uintptr(req), uintptr(arg), 0, 0, 0) 566 if e1 != 0 { 567 err = e1 568 } 569 return 570 } 571 572 func poll(fds *PollFd, nfds int, timeout int) (n int, err error) { 573 r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procpoll)), 3, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout), 0, 0, 0) 574 n = int(r0) 575 if e1 != 0 { 576 err = e1 577 } 578 return 579 } 580 581 func Access(path string, mode uint32) (err error) { 582 var _p0 *byte 583 _p0, err = BytePtrFromString(path) 584 if err != nil { 585 return 586 } 587 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procAccess)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0, 0, 0, 0) 588 if e1 != 0 { 589 err = e1 590 } 591 return 592 } 593 594 func Adjtime(delta *Timeval, olddelta *Timeval) (err error) { 595 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procAdjtime)), 2, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0, 0, 0, 0) 596 if e1 != 0 { 597 err = e1 598 } 599 return 600 } 601 602 func Chdir(path string) (err error) { 603 var _p0 *byte 604 _p0, err = BytePtrFromString(path) 605 if err != nil { 606 return 607 } 608 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procChdir)), 1, uintptr(unsafe.Pointer(_p0)), 0, 0, 0, 0, 0) 609 if e1 != 0 { 610 err = e1 611 } 612 return 613 } 614 615 func Chmod(path string, mode uint32) (err error) { 616 var _p0 *byte 617 _p0, err = BytePtrFromString(path) 618 if err != nil { 619 return 620 } 621 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procChmod)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0, 0, 0, 0) 622 if e1 != 0 { 623 err = e1 624 } 625 return 626 } 627 628 func Chown(path string, uid int, gid int) (err error) { 629 var _p0 *byte 630 _p0, err = BytePtrFromString(path) 631 if err != nil { 632 return 633 } 634 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procChown)), 3, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), 0, 0, 0) 635 if e1 != 0 { 636 err = e1 637 } 638 return 639 } 640 641 func Chroot(path string) (err error) { 642 var _p0 *byte 643 _p0, err = BytePtrFromString(path) 644 if err != nil { 645 return 646 } 647 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procChroot)), 1, uintptr(unsafe.Pointer(_p0)), 0, 0, 0, 0, 0) 648 if e1 != 0 { 649 err = e1 650 } 651 return 652 } 653 654 func Close(fd int) (err error) { 655 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procClose)), 1, uintptr(fd), 0, 0, 0, 0, 0) 656 if e1 != 0 { 657 err = e1 658 } 659 return 660 } 661 662 func Creat(path string, mode uint32) (fd int, err error) { 663 var _p0 *byte 664 _p0, err = BytePtrFromString(path) 665 if err != nil { 666 return 667 } 668 r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procCreat)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0, 0, 0, 0) 669 fd = int(r0) 670 if e1 != 0 { 671 err = e1 672 } 673 return 674 } 675 676 func Dup(fd int) (nfd int, err error) { 677 r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procDup)), 1, uintptr(fd), 0, 0, 0, 0, 0) 678 nfd = int(r0) 679 if e1 != 0 { 680 err = e1 681 } 682 return 683 } 684 685 func Dup2(oldfd int, newfd int) (err error) { 686 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procDup2)), 2, uintptr(oldfd), uintptr(newfd), 0, 0, 0, 0) 687 if e1 != 0 { 688 err = e1 689 } 690 return 691 } 692 693 func Exit(code int) { 694 sysvicall6(uintptr(unsafe.Pointer(&procExit)), 1, uintptr(code), 0, 0, 0, 0, 0) 695 return 696 } 697 698 func Fchdir(fd int) (err error) { 699 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFchdir)), 1, uintptr(fd), 0, 0, 0, 0, 0) 700 if e1 != 0 { 701 err = e1 702 } 703 return 704 } 705 706 func Fchmod(fd int, mode uint32) (err error) { 707 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFchmod)), 2, uintptr(fd), uintptr(mode), 0, 0, 0, 0) 708 if e1 != 0 { 709 err = e1 710 } 711 return 712 } 713 714 func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) { 715 var _p0 *byte 716 _p0, err = BytePtrFromString(path) 717 if err != nil { 718 return 719 } 720 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFchmodat)), 4, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0) 721 if e1 != 0 { 722 err = e1 723 } 724 return 725 } 726 727 func Fchown(fd int, uid int, gid int) (err error) { 728 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFchown)), 3, uintptr(fd), uintptr(uid), uintptr(gid), 0, 0, 0) 729 if e1 != 0 { 730 err = e1 731 } 732 return 733 } 734 735 func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) { 736 var _p0 *byte 737 _p0, err = BytePtrFromString(path) 738 if err != nil { 739 return 740 } 741 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFchownat)), 5, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0) 742 if e1 != 0 { 743 err = e1 744 } 745 return 746 } 747 748 func Fdatasync(fd int) (err error) { 749 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFdatasync)), 1, uintptr(fd), 0, 0, 0, 0, 0) 750 if e1 != 0 { 751 err = e1 752 } 753 return 754 } 755 756 func Flock(fd int, how int) (err error) { 757 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFlock)), 2, uintptr(fd), uintptr(how), 0, 0, 0, 0) 758 if e1 != 0 { 759 err = e1 760 } 761 return 762 } 763 764 func Fpathconf(fd int, name int) (val int, err error) { 765 r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFpathconf)), 2, uintptr(fd), uintptr(name), 0, 0, 0, 0) 766 val = int(r0) 767 if e1 != 0 { 768 err = e1 769 } 770 return 771 } 772 773 func Fstat(fd int, stat *Stat_t) (err error) { 774 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFstat)), 2, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0, 0, 0, 0) 775 if e1 != 0 { 776 err = e1 777 } 778 return 779 } 780 781 func Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) { 782 var _p0 *byte 783 _p0, err = BytePtrFromString(path) 784 if err != nil { 785 return 786 } 787 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFstatat)), 4, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0) 788 if e1 != 0 { 789 err = e1 790 } 791 return 792 } 793 794 func Fstatvfs(fd int, vfsstat *Statvfs_t) (err error) { 795 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFstatvfs)), 2, uintptr(fd), uintptr(unsafe.Pointer(vfsstat)), 0, 0, 0, 0) 796 if e1 != 0 { 797 err = e1 798 } 799 return 800 } 801 802 func Getdents(fd int, buf []byte, basep *uintptr) (n int, err error) { 803 var _p0 *byte 804 if len(buf) > 0 { 805 _p0 = &buf[0] 806 } 807 r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procGetdents)), 4, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0) 808 n = int(r0) 809 if e1 != 0 { 810 err = e1 811 } 812 return 813 } 814 815 func Getgid() (gid int) { 816 r0, _, _ := rawSysvicall6(uintptr(unsafe.Pointer(&procGetgid)), 0, 0, 0, 0, 0, 0, 0) 817 gid = int(r0) 818 return 819 } 820 821 func Getpid() (pid int) { 822 r0, _, _ := rawSysvicall6(uintptr(unsafe.Pointer(&procGetpid)), 0, 0, 0, 0, 0, 0, 0) 823 pid = int(r0) 824 return 825 } 826 827 func Getpgid(pid int) (pgid int, err error) { 828 r0, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procGetpgid)), 1, uintptr(pid), 0, 0, 0, 0, 0) 829 pgid = int(r0) 830 if e1 != 0 { 831 err = e1 832 } 833 return 834 } 835 836 func Getpgrp() (pgid int, err error) { 837 r0, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procGetpgrp)), 0, 0, 0, 0, 0, 0, 0) 838 pgid = int(r0) 839 if e1 != 0 { 840 err = e1 841 } 842 return 843 } 844 845 func Geteuid() (euid int) { 846 r0, _, _ := sysvicall6(uintptr(unsafe.Pointer(&procGeteuid)), 0, 0, 0, 0, 0, 0, 0) 847 euid = int(r0) 848 return 849 } 850 851 func Getegid() (egid int) { 852 r0, _, _ := sysvicall6(uintptr(unsafe.Pointer(&procGetegid)), 0, 0, 0, 0, 0, 0, 0) 853 egid = int(r0) 854 return 855 } 856 857 func Getppid() (ppid int) { 858 r0, _, _ := sysvicall6(uintptr(unsafe.Pointer(&procGetppid)), 0, 0, 0, 0, 0, 0, 0) 859 ppid = int(r0) 860 return 861 } 862 863 func Getpriority(which int, who int) (n int, err error) { 864 r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procGetpriority)), 2, uintptr(which), uintptr(who), 0, 0, 0, 0) 865 n = int(r0) 866 if e1 != 0 { 867 err = e1 868 } 869 return 870 } 871 872 func Getrlimit(which int, lim *Rlimit) (err error) { 873 _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procGetrlimit)), 2, uintptr(which), uintptr(unsafe.Pointer(lim)), 0, 0, 0, 0) 874 if e1 != 0 { 875 err = e1 876 } 877 return 878 } 879 880 func Getrusage(who int, rusage *Rusage) (err error) { 881 _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procGetrusage)), 2, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0, 0, 0, 0) 882 if e1 != 0 { 883 err = e1 884 } 885 return 886 } 887 888 func Gettimeofday(tv *Timeval) (err error) { 889 _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procGettimeofday)), 1, uintptr(unsafe.Pointer(tv)), 0, 0, 0, 0, 0) 890 if e1 != 0 { 891 err = e1 892 } 893 return 894 } 895 896 func Getuid() (uid int) { 897 r0, _, _ := rawSysvicall6(uintptr(unsafe.Pointer(&procGetuid)), 0, 0, 0, 0, 0, 0, 0) 898 uid = int(r0) 899 return 900 } 901 902 func Kill(pid int, signum syscall.Signal) (err error) { 903 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procKill)), 2, uintptr(pid), uintptr(signum), 0, 0, 0, 0) 904 if e1 != 0 { 905 err = e1 906 } 907 return 908 } 909 910 func Lchown(path string, uid int, gid int) (err error) { 911 var _p0 *byte 912 _p0, err = BytePtrFromString(path) 913 if err != nil { 914 return 915 } 916 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procLchown)), 3, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), 0, 0, 0) 917 if e1 != 0 { 918 err = e1 919 } 920 return 921 } 922 923 func Link(path string, link string) (err error) { 924 var _p0 *byte 925 _p0, err = BytePtrFromString(path) 926 if err != nil { 927 return 928 } 929 var _p1 *byte 930 _p1, err = BytePtrFromString(link) 931 if err != nil { 932 return 933 } 934 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procLink)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0, 0, 0, 0) 935 if e1 != 0 { 936 err = e1 937 } 938 return 939 } 940 941 func Listen(s int, backlog int) (err error) { 942 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&proc__xnet_llisten)), 2, uintptr(s), uintptr(backlog), 0, 0, 0, 0) 943 if e1 != 0 { 944 err = e1 945 } 946 return 947 } 948 949 func Lstat(path string, stat *Stat_t) (err error) { 950 var _p0 *byte 951 _p0, err = BytePtrFromString(path) 952 if err != nil { 953 return 954 } 955 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procLstat)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0, 0, 0, 0) 956 if e1 != 0 { 957 err = e1 958 } 959 return 960 } 961 962 func Madvise(b []byte, advice int) (err error) { 963 var _p0 *byte 964 if len(b) > 0 { 965 _p0 = &b[0] 966 } 967 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procMadvise)), 3, uintptr(unsafe.Pointer(_p0)), uintptr(len(b)), uintptr(advice), 0, 0, 0) 968 if e1 != 0 { 969 err = e1 970 } 971 return 972 } 973 974 func Mkdir(path string, mode uint32) (err error) { 975 var _p0 *byte 976 _p0, err = BytePtrFromString(path) 977 if err != nil { 978 return 979 } 980 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procMkdir)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0, 0, 0, 0) 981 if e1 != 0 { 982 err = e1 983 } 984 return 985 } 986 987 func Mkdirat(dirfd int, path string, mode uint32) (err error) { 988 var _p0 *byte 989 _p0, err = BytePtrFromString(path) 990 if err != nil { 991 return 992 } 993 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procMkdirat)), 3, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0, 0, 0) 994 if e1 != 0 { 995 err = e1 996 } 997 return 998 } 999 1000 func Mkfifo(path string, mode uint32) (err error) { 1001 var _p0 *byte 1002 _p0, err = BytePtrFromString(path) 1003 if err != nil { 1004 return 1005 } 1006 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procMkfifo)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0, 0, 0, 0) 1007 if e1 != 0 { 1008 err = e1 1009 } 1010 return 1011 } 1012 1013 func Mkfifoat(dirfd int, path string, mode uint32) (err error) { 1014 var _p0 *byte 1015 _p0, err = BytePtrFromString(path) 1016 if err != nil { 1017 return 1018 } 1019 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procMkfifoat)), 3, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0, 0, 0) 1020 if e1 != 0 { 1021 err = e1 1022 } 1023 return 1024 } 1025 1026 func Mknod(path string, mode uint32, dev int) (err error) { 1027 var _p0 *byte 1028 _p0, err = BytePtrFromString(path) 1029 if err != nil { 1030 return 1031 } 1032 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procMknod)), 3, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0, 0) 1033 if e1 != 0 { 1034 err = e1 1035 } 1036 return 1037 } 1038 1039 func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) { 1040 var _p0 *byte 1041 _p0, err = BytePtrFromString(path) 1042 if err != nil { 1043 return 1044 } 1045 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procMknodat)), 4, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0) 1046 if e1 != 0 { 1047 err = e1 1048 } 1049 return 1050 } 1051 1052 func Mlock(b []byte) (err error) { 1053 var _p0 *byte 1054 if len(b) > 0 { 1055 _p0 = &b[0] 1056 } 1057 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procMlock)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(len(b)), 0, 0, 0, 0) 1058 if e1 != 0 { 1059 err = e1 1060 } 1061 return 1062 } 1063 1064 func Mlockall(flags int) (err error) { 1065 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procMlockall)), 1, uintptr(flags), 0, 0, 0, 0, 0) 1066 if e1 != 0 { 1067 err = e1 1068 } 1069 return 1070 } 1071 1072 func Mprotect(b []byte, prot int) (err error) { 1073 var _p0 *byte 1074 if len(b) > 0 { 1075 _p0 = &b[0] 1076 } 1077 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procMprotect)), 3, uintptr(unsafe.Pointer(_p0)), uintptr(len(b)), uintptr(prot), 0, 0, 0) 1078 if e1 != 0 { 1079 err = e1 1080 } 1081 return 1082 } 1083 1084 func Msync(b []byte, flags int) (err error) { 1085 var _p0 *byte 1086 if len(b) > 0 { 1087 _p0 = &b[0] 1088 } 1089 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procMsync)), 3, uintptr(unsafe.Pointer(_p0)), uintptr(len(b)), uintptr(flags), 0, 0, 0) 1090 if e1 != 0 { 1091 err = e1 1092 } 1093 return 1094 } 1095 1096 func Munlock(b []byte) (err error) { 1097 var _p0 *byte 1098 if len(b) > 0 { 1099 _p0 = &b[0] 1100 } 1101 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procMunlock)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(len(b)), 0, 0, 0, 0) 1102 if e1 != 0 { 1103 err = e1 1104 } 1105 return 1106 } 1107 1108 func Munlockall() (err error) { 1109 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procMunlockall)), 0, 0, 0, 0, 0, 0, 0) 1110 if e1 != 0 { 1111 err = e1 1112 } 1113 return 1114 } 1115 1116 func Nanosleep(time *Timespec, leftover *Timespec) (err error) { 1117 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procNanosleep)), 2, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0, 0, 0, 0) 1118 if e1 != 0 { 1119 err = e1 1120 } 1121 return 1122 } 1123 1124 func Open(path string, mode int, perm uint32) (fd int, err error) { 1125 var _p0 *byte 1126 _p0, err = BytePtrFromString(path) 1127 if err != nil { 1128 return 1129 } 1130 r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procOpen)), 3, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0, 0) 1131 fd = int(r0) 1132 if e1 != 0 { 1133 err = e1 1134 } 1135 return 1136 } 1137 1138 func Openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) { 1139 var _p0 *byte 1140 _p0, err = BytePtrFromString(path) 1141 if err != nil { 1142 return 1143 } 1144 r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procOpenat)), 4, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mode), 0, 0) 1145 fd = int(r0) 1146 if e1 != 0 { 1147 err = e1 1148 } 1149 return 1150 } 1151 1152 func Pathconf(path string, name int) (val int, err error) { 1153 var _p0 *byte 1154 _p0, err = BytePtrFromString(path) 1155 if err != nil { 1156 return 1157 } 1158 r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procPathconf)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0, 0, 0, 0) 1159 val = int(r0) 1160 if e1 != 0 { 1161 err = e1 1162 } 1163 return 1164 } 1165 1166 func Pause() (err error) { 1167 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procPause)), 0, 0, 0, 0, 0, 0, 0) 1168 if e1 != 0 { 1169 err = e1 1170 } 1171 return 1172 } 1173 1174 func Pread(fd int, p []byte, offset int64) (n int, err error) { 1175 var _p0 *byte 1176 if len(p) > 0 { 1177 _p0 = &p[0] 1178 } 1179 r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procPread)), 4, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), uintptr(offset), 0, 0) 1180 n = int(r0) 1181 if e1 != 0 { 1182 err = e1 1183 } 1184 return 1185 } 1186 1187 func Pwrite(fd int, p []byte, offset int64) (n int, err error) { 1188 var _p0 *byte 1189 if len(p) > 0 { 1190 _p0 = &p[0] 1191 } 1192 r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procPwrite)), 4, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), uintptr(offset), 0, 0) 1193 n = int(r0) 1194 if e1 != 0 { 1195 err = e1 1196 } 1197 return 1198 } 1199 1200 func read(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(&procread)), 3, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), 0, 0, 0) 1206 n = int(r0) 1207 if e1 != 0 { 1208 err = e1 1209 } 1210 return 1211 } 1212 1213 func Readlink(path string, buf []byte) (n int, err error) { 1214 var _p0 *byte 1215 _p0, err = BytePtrFromString(path) 1216 if err != nil { 1217 return 1218 } 1219 var _p1 *byte 1220 if len(buf) > 0 { 1221 _p1 = &buf[0] 1222 } 1223 r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procReadlink)), 3, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(len(buf)), 0, 0, 0) 1224 n = int(r0) 1225 if e1 != 0 { 1226 err = e1 1227 } 1228 return 1229 } 1230 1231 func Rename(from string, to string) (err error) { 1232 var _p0 *byte 1233 _p0, err = BytePtrFromString(from) 1234 if err != nil { 1235 return 1236 } 1237 var _p1 *byte 1238 _p1, err = BytePtrFromString(to) 1239 if err != nil { 1240 return 1241 } 1242 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procRename)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0, 0, 0, 0) 1243 if e1 != 0 { 1244 err = e1 1245 } 1246 return 1247 } 1248 1249 func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) { 1250 var _p0 *byte 1251 _p0, err = BytePtrFromString(oldpath) 1252 if err != nil { 1253 return 1254 } 1255 var _p1 *byte 1256 _p1, err = BytePtrFromString(newpath) 1257 if err != nil { 1258 return 1259 } 1260 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procRenameat)), 4, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0) 1261 if e1 != 0 { 1262 err = e1 1263 } 1264 return 1265 } 1266 1267 func Rmdir(path string) (err error) { 1268 var _p0 *byte 1269 _p0, err = BytePtrFromString(path) 1270 if err != nil { 1271 return 1272 } 1273 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procRmdir)), 1, uintptr(unsafe.Pointer(_p0)), 0, 0, 0, 0, 0) 1274 if e1 != 0 { 1275 err = e1 1276 } 1277 return 1278 } 1279 1280 func Seek(fd int, offset int64, whence int) (newoffset int64, err error) { 1281 r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&proclseek)), 3, uintptr(fd), uintptr(offset), uintptr(whence), 0, 0, 0) 1282 newoffset = int64(r0) 1283 if e1 != 0 { 1284 err = e1 1285 } 1286 return 1287 } 1288 1289 func Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) { 1290 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procSelect)), 5, uintptr(n), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0) 1291 if e1 != 0 { 1292 err = e1 1293 } 1294 return 1295 } 1296 1297 func Setegid(egid int) (err error) { 1298 _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procSetegid)), 1, uintptr(egid), 0, 0, 0, 0, 0) 1299 if e1 != 0 { 1300 err = e1 1301 } 1302 return 1303 } 1304 1305 func Seteuid(euid int) (err error) { 1306 _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procSeteuid)), 1, uintptr(euid), 0, 0, 0, 0, 0) 1307 if e1 != 0 { 1308 err = e1 1309 } 1310 return 1311 } 1312 1313 func Setgid(gid int) (err error) { 1314 _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procSetgid)), 1, uintptr(gid), 0, 0, 0, 0, 0) 1315 if e1 != 0 { 1316 err = e1 1317 } 1318 return 1319 } 1320 1321 func Sethostname(p []byte) (err error) { 1322 var _p0 *byte 1323 if len(p) > 0 { 1324 _p0 = &p[0] 1325 } 1326 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procSethostname)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), 0, 0, 0, 0) 1327 if e1 != 0 { 1328 err = e1 1329 } 1330 return 1331 } 1332 1333 func Setpgid(pid int, pgid int) (err error) { 1334 _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procSetpgid)), 2, uintptr(pid), uintptr(pgid), 0, 0, 0, 0) 1335 if e1 != 0 { 1336 err = e1 1337 } 1338 return 1339 } 1340 1341 func Setpriority(which int, who int, prio int) (err error) { 1342 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procSetpriority)), 3, uintptr(which), uintptr(who), uintptr(prio), 0, 0, 0) 1343 if e1 != 0 { 1344 err = e1 1345 } 1346 return 1347 } 1348 1349 func Setregid(rgid int, egid int) (err error) { 1350 _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procSetregid)), 2, uintptr(rgid), uintptr(egid), 0, 0, 0, 0) 1351 if e1 != 0 { 1352 err = e1 1353 } 1354 return 1355 } 1356 1357 func Setreuid(ruid int, euid int) (err error) { 1358 _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procSetreuid)), 2, uintptr(ruid), uintptr(euid), 0, 0, 0, 0) 1359 if e1 != 0 { 1360 err = e1 1361 } 1362 return 1363 } 1364 1365 func Setrlimit(which int, lim *Rlimit) (err error) { 1366 _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procSetrlimit)), 2, uintptr(which), uintptr(unsafe.Pointer(lim)), 0, 0, 0, 0) 1367 if e1 != 0 { 1368 err = e1 1369 } 1370 return 1371 } 1372 1373 func Setsid() (pid int, err error) { 1374 r0, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procSetsid)), 0, 0, 0, 0, 0, 0, 0) 1375 pid = int(r0) 1376 if e1 != 0 { 1377 err = e1 1378 } 1379 return 1380 } 1381 1382 func Setuid(uid int) (err error) { 1383 _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procSetuid)), 1, uintptr(uid), 0, 0, 0, 0, 0) 1384 if e1 != 0 { 1385 err = e1 1386 } 1387 return 1388 } 1389 1390 func Shutdown(s int, how int) (err error) { 1391 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procshutdown)), 2, uintptr(s), uintptr(how), 0, 0, 0, 0) 1392 if e1 != 0 { 1393 err = e1 1394 } 1395 return 1396 } 1397 1398 func Stat(path string, stat *Stat_t) (err error) { 1399 var _p0 *byte 1400 _p0, err = BytePtrFromString(path) 1401 if err != nil { 1402 return 1403 } 1404 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procStat)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0, 0, 0, 0) 1405 if e1 != 0 { 1406 err = e1 1407 } 1408 return 1409 } 1410 1411 func Statvfs(path string, vfsstat *Statvfs_t) (err error) { 1412 var _p0 *byte 1413 _p0, err = BytePtrFromString(path) 1414 if err != nil { 1415 return 1416 } 1417 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procStatvfs)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(vfsstat)), 0, 0, 0, 0) 1418 if e1 != 0 { 1419 err = e1 1420 } 1421 return 1422 } 1423 1424 func Symlink(path string, link string) (err error) { 1425 var _p0 *byte 1426 _p0, err = BytePtrFromString(path) 1427 if err != nil { 1428 return 1429 } 1430 var _p1 *byte 1431 _p1, err = BytePtrFromString(link) 1432 if err != nil { 1433 return 1434 } 1435 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procSymlink)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0, 0, 0, 0) 1436 if e1 != 0 { 1437 err = e1 1438 } 1439 return 1440 } 1441 1442 func Sync() (err error) { 1443 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procSync)), 0, 0, 0, 0, 0, 0, 0) 1444 if e1 != 0 { 1445 err = e1 1446 } 1447 return 1448 } 1449 1450 func Times(tms *Tms) (ticks uintptr, err error) { 1451 r0, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procTimes)), 1, uintptr(unsafe.Pointer(tms)), 0, 0, 0, 0, 0) 1452 ticks = uintptr(r0) 1453 if e1 != 0 { 1454 err = e1 1455 } 1456 return 1457 } 1458 1459 func Truncate(path string, length int64) (err error) { 1460 var _p0 *byte 1461 _p0, err = BytePtrFromString(path) 1462 if err != nil { 1463 return 1464 } 1465 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procTruncate)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0, 0, 0, 0) 1466 if e1 != 0 { 1467 err = e1 1468 } 1469 return 1470 } 1471 1472 func Fsync(fd int) (err error) { 1473 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFsync)), 1, uintptr(fd), 0, 0, 0, 0, 0) 1474 if e1 != 0 { 1475 err = e1 1476 } 1477 return 1478 } 1479 1480 func Ftruncate(fd int, length int64) (err error) { 1481 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFtruncate)), 2, uintptr(fd), uintptr(length), 0, 0, 0, 0) 1482 if e1 != 0 { 1483 err = e1 1484 } 1485 return 1486 } 1487 1488 func Umask(mask int) (oldmask int) { 1489 r0, _, _ := sysvicall6(uintptr(unsafe.Pointer(&procUmask)), 1, uintptr(mask), 0, 0, 0, 0, 0) 1490 oldmask = int(r0) 1491 return 1492 } 1493 1494 func Uname(buf *Utsname) (err error) { 1495 _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procUname)), 1, uintptr(unsafe.Pointer(buf)), 0, 0, 0, 0, 0) 1496 if e1 != 0 { 1497 err = e1 1498 } 1499 return 1500 } 1501 1502 func Unmount(target string, flags int) (err error) { 1503 var _p0 *byte 1504 _p0, err = BytePtrFromString(target) 1505 if err != nil { 1506 return 1507 } 1508 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procumount)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0, 0, 0, 0) 1509 if e1 != 0 { 1510 err = e1 1511 } 1512 return 1513 } 1514 1515 func Unlink(path string) (err error) { 1516 var _p0 *byte 1517 _p0, err = BytePtrFromString(path) 1518 if err != nil { 1519 return 1520 } 1521 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procUnlink)), 1, uintptr(unsafe.Pointer(_p0)), 0, 0, 0, 0, 0) 1522 if e1 != 0 { 1523 err = e1 1524 } 1525 return 1526 } 1527 1528 func Unlinkat(dirfd int, path string, flags int) (err error) { 1529 var _p0 *byte 1530 _p0, err = BytePtrFromString(path) 1531 if err != nil { 1532 return 1533 } 1534 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procUnlinkat)), 3, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0, 0, 0) 1535 if e1 != 0 { 1536 err = e1 1537 } 1538 return 1539 } 1540 1541 func Ustat(dev int, ubuf *Ustat_t) (err error) { 1542 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procUstat)), 2, uintptr(dev), uintptr(unsafe.Pointer(ubuf)), 0, 0, 0, 0) 1543 if e1 != 0 { 1544 err = e1 1545 } 1546 return 1547 } 1548 1549 func Utime(path string, buf *Utimbuf) (err error) { 1550 var _p0 *byte 1551 _p0, err = BytePtrFromString(path) 1552 if err != nil { 1553 return 1554 } 1555 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procUtime)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0, 0, 0, 0) 1556 if e1 != 0 { 1557 err = e1 1558 } 1559 return 1560 } 1561 1562 func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { 1563 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&proc__xnet_bind)), 3, uintptr(s), uintptr(addr), uintptr(addrlen), 0, 0, 0) 1564 if e1 != 0 { 1565 err = e1 1566 } 1567 return 1568 } 1569 1570 func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { 1571 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&proc__xnet_connect)), 3, uintptr(s), uintptr(addr), uintptr(addrlen), 0, 0, 0) 1572 if e1 != 0 { 1573 err = e1 1574 } 1575 return 1576 } 1577 1578 func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) { 1579 r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procmmap)), 6, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos)) 1580 ret = uintptr(r0) 1581 if e1 != 0 { 1582 err = e1 1583 } 1584 return 1585 } 1586 1587 func munmap(addr uintptr, length uintptr) (err error) { 1588 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procmunmap)), 2, uintptr(addr), uintptr(length), 0, 0, 0, 0) 1589 if e1 != 0 { 1590 err = e1 1591 } 1592 return 1593 } 1594 1595 func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) { 1596 r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procsendfile)), 4, uintptr(outfd), uintptr(infd), uintptr(unsafe.Pointer(offset)), uintptr(count), 0, 0) 1597 written = int(r0) 1598 if e1 != 0 { 1599 err = e1 1600 } 1601 return 1602 } 1603 1604 func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) { 1605 var _p0 *byte 1606 if len(buf) > 0 { 1607 _p0 = &buf[0] 1608 } 1609 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&proc__xnet_sendto)), 6, uintptr(s), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen)) 1610 if e1 != 0 { 1611 err = e1 1612 } 1613 return 1614 } 1615 1616 func socket(domain int, typ int, proto int) (fd int, err error) { 1617 r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&proc__xnet_socket)), 3, uintptr(domain), uintptr(typ), uintptr(proto), 0, 0, 0) 1618 fd = int(r0) 1619 if e1 != 0 { 1620 err = e1 1621 } 1622 return 1623 } 1624 1625 func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) { 1626 _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&proc__xnet_socketpair)), 4, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0) 1627 if e1 != 0 { 1628 err = e1 1629 } 1630 return 1631 } 1632 1633 func write(fd int, p []byte) (n int, err error) { 1634 var _p0 *byte 1635 if len(p) > 0 { 1636 _p0 = &p[0] 1637 } 1638 r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procwrite)), 3, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), 0, 0, 0) 1639 n = int(r0) 1640 if e1 != 0 { 1641 err = e1 1642 } 1643 return 1644 } 1645 1646 func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) { 1647 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&proc__xnet_getsockopt)), 5, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0) 1648 if e1 != 0 { 1649 err = e1 1650 } 1651 return 1652 } 1653 1654 func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { 1655 _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procgetpeername)), 3, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), 0, 0, 0) 1656 if e1 != 0 { 1657 err = e1 1658 } 1659 return 1660 } 1661 1662 func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) { 1663 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procsetsockopt)), 5, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0) 1664 if e1 != 0 { 1665 err = e1 1666 } 1667 return 1668 } 1669 1670 func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) { 1671 var _p0 *byte 1672 if len(p) > 0 { 1673 _p0 = &p[0] 1674 } 1675 r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procrecvfrom)), 6, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen))) 1676 n = int(r0) 1677 if e1 != 0 { 1678 err = e1 1679 } 1680 return 1681 }