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