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