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