1 // mksyscall.pl syscall_linux.go syscall_linux_arm64.go 2 // MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT 3 4 // +build arm64,linux 5 6 package syscall 7 8 import "unsafe" 9 10 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 11 12 func linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags int) (err error) { 13 var _p0 *byte 14 _p0, err = BytePtrFromString(oldpath) 15 if err != nil { 16 return 17 } 18 var _p1 *byte 19 _p1, err = BytePtrFromString(newpath) 20 if err != nil { 21 return 22 } 23 _, _, e1 := Syscall6(SYS_LINKAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0) 24 use(unsafe.Pointer(_p0)) 25 use(unsafe.Pointer(_p1)) 26 if e1 != 0 { 27 err = errnoErr(e1) 28 } 29 return 30 } 31 32 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 33 34 func openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) { 35 var _p0 *byte 36 _p0, err = BytePtrFromString(path) 37 if err != nil { 38 return 39 } 40 r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mode), 0, 0) 41 use(unsafe.Pointer(_p0)) 42 fd = int(r0) 43 if e1 != 0 { 44 err = errnoErr(e1) 45 } 46 return 47 } 48 49 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 50 51 func readlinkat(dirfd int, path string, buf []byte) (n int, err error) { 52 var _p0 *byte 53 _p0, err = BytePtrFromString(path) 54 if err != nil { 55 return 56 } 57 var _p1 unsafe.Pointer 58 if len(buf) > 0 { 59 _p1 = unsafe.Pointer(&buf[0]) 60 } else { 61 _p1 = unsafe.Pointer(&_zero) 62 } 63 r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0) 64 use(unsafe.Pointer(_p0)) 65 n = int(r0) 66 if e1 != 0 { 67 err = errnoErr(e1) 68 } 69 return 70 } 71 72 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 73 74 func symlinkat(oldpath string, newdirfd int, newpath string) (err error) { 75 var _p0 *byte 76 _p0, err = BytePtrFromString(oldpath) 77 if err != nil { 78 return 79 } 80 var _p1 *byte 81 _p1, err = BytePtrFromString(newpath) 82 if err != nil { 83 return 84 } 85 _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1))) 86 use(unsafe.Pointer(_p0)) 87 use(unsafe.Pointer(_p1)) 88 if e1 != 0 { 89 err = errnoErr(e1) 90 } 91 return 92 } 93 94 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 95 96 func unlinkat(dirfd int, path string, flags int) (err error) { 97 var _p0 *byte 98 _p0, err = BytePtrFromString(path) 99 if err != nil { 100 return 101 } 102 _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags)) 103 use(unsafe.Pointer(_p0)) 104 if e1 != 0 { 105 err = errnoErr(e1) 106 } 107 return 108 } 109 110 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 111 112 func utimes(path string, times *[2]Timeval) (err error) { 113 var _p0 *byte 114 _p0, err = BytePtrFromString(path) 115 if err != nil { 116 return 117 } 118 _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), 0) 119 use(unsafe.Pointer(_p0)) 120 if e1 != 0 { 121 err = errnoErr(e1) 122 } 123 return 124 } 125 126 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 127 128 func utimensat(dirfd int, path string, times *[2]Timespec) (err error) { 129 var _p0 *byte 130 _p0, err = BytePtrFromString(path) 131 if err != nil { 132 return 133 } 134 _, _, e1 := Syscall(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times))) 135 use(unsafe.Pointer(_p0)) 136 if e1 != 0 { 137 err = errnoErr(e1) 138 } 139 return 140 } 141 142 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 143 144 func futimesat(dirfd int, path *byte, times *[2]Timeval) (err error) { 145 _, _, e1 := Syscall(SYS_FUTIMESAT, uintptr(dirfd), uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(times))) 146 if e1 != 0 { 147 err = errnoErr(e1) 148 } 149 return 150 } 151 152 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 153 154 func Getcwd(buf []byte) (n int, err error) { 155 var _p0 unsafe.Pointer 156 if len(buf) > 0 { 157 _p0 = unsafe.Pointer(&buf[0]) 158 } else { 159 _p0 = unsafe.Pointer(&_zero) 160 } 161 r0, _, e1 := Syscall(SYS_GETCWD, uintptr(_p0), uintptr(len(buf)), 0) 162 n = int(r0) 163 if e1 != 0 { 164 err = errnoErr(e1) 165 } 166 return 167 } 168 169 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 170 171 func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) { 172 r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0) 173 wpid = int(r0) 174 if e1 != 0 { 175 err = errnoErr(e1) 176 } 177 return 178 } 179 180 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 181 182 func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) { 183 _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0) 184 if e1 != 0 { 185 err = errnoErr(e1) 186 } 187 return 188 } 189 190 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 191 192 func reboot(magic1 uint, magic2 uint, cmd int, arg string) (err error) { 193 var _p0 *byte 194 _p0, err = BytePtrFromString(arg) 195 if err != nil { 196 return 197 } 198 _, _, e1 := Syscall6(SYS_REBOOT, uintptr(magic1), uintptr(magic2), uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0, 0) 199 use(unsafe.Pointer(_p0)) 200 if e1 != 0 { 201 err = errnoErr(e1) 202 } 203 return 204 } 205 206 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 207 208 func mount(source string, target string, fstype string, flags uintptr, data *byte) (err error) { 209 var _p0 *byte 210 _p0, err = BytePtrFromString(source) 211 if err != nil { 212 return 213 } 214 var _p1 *byte 215 _p1, err = BytePtrFromString(target) 216 if err != nil { 217 return 218 } 219 var _p2 *byte 220 _p2, err = BytePtrFromString(fstype) 221 if err != nil { 222 return 223 } 224 _, _, e1 := Syscall6(SYS_MOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(flags), uintptr(unsafe.Pointer(data)), 0) 225 use(unsafe.Pointer(_p0)) 226 use(unsafe.Pointer(_p1)) 227 use(unsafe.Pointer(_p2)) 228 if e1 != 0 { 229 err = errnoErr(e1) 230 } 231 return 232 } 233 234 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 235 236 func Acct(path string) (err error) { 237 var _p0 *byte 238 _p0, err = BytePtrFromString(path) 239 if err != nil { 240 return 241 } 242 _, _, e1 := Syscall(SYS_ACCT, uintptr(unsafe.Pointer(_p0)), 0, 0) 243 use(unsafe.Pointer(_p0)) 244 if e1 != 0 { 245 err = errnoErr(e1) 246 } 247 return 248 } 249 250 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 251 252 func Adjtimex(buf *Timex) (state int, err error) { 253 r0, _, e1 := Syscall(SYS_ADJTIMEX, uintptr(unsafe.Pointer(buf)), 0, 0) 254 state = int(r0) 255 if e1 != 0 { 256 err = errnoErr(e1) 257 } 258 return 259 } 260 261 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 262 263 func Chdir(path string) (err error) { 264 var _p0 *byte 265 _p0, err = BytePtrFromString(path) 266 if err != nil { 267 return 268 } 269 _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0) 270 use(unsafe.Pointer(_p0)) 271 if e1 != 0 { 272 err = errnoErr(e1) 273 } 274 return 275 } 276 277 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 278 279 func Chroot(path string) (err error) { 280 var _p0 *byte 281 _p0, err = BytePtrFromString(path) 282 if err != nil { 283 return 284 } 285 _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0) 286 use(unsafe.Pointer(_p0)) 287 if e1 != 0 { 288 err = errnoErr(e1) 289 } 290 return 291 } 292 293 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 294 295 func Close(fd int) (err error) { 296 _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0) 297 if e1 != 0 { 298 err = errnoErr(e1) 299 } 300 return 301 } 302 303 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 304 305 func Dup(oldfd int) (fd int, err error) { 306 r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 0, 0) 307 fd = int(r0) 308 if e1 != 0 { 309 err = errnoErr(e1) 310 } 311 return 312 } 313 314 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 315 316 func Dup3(oldfd int, newfd int, flags int) (err error) { 317 _, _, e1 := Syscall(SYS_DUP3, uintptr(oldfd), uintptr(newfd), uintptr(flags)) 318 if e1 != 0 { 319 err = errnoErr(e1) 320 } 321 return 322 } 323 324 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 325 326 func EpollCreate(size int) (fd int, err error) { 327 r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0) 328 fd = int(r0) 329 if e1 != 0 { 330 err = errnoErr(e1) 331 } 332 return 333 } 334 335 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 336 337 func EpollCreate1(flag int) (fd int, err error) { 338 r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE1, uintptr(flag), 0, 0) 339 fd = int(r0) 340 if e1 != 0 { 341 err = errnoErr(e1) 342 } 343 return 344 } 345 346 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 347 348 func EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) { 349 _, _, e1 := RawSyscall6(SYS_EPOLL_CTL, uintptr(epfd), uintptr(op), uintptr(fd), uintptr(unsafe.Pointer(event)), 0, 0) 350 if e1 != 0 { 351 err = errnoErr(e1) 352 } 353 return 354 } 355 356 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 357 358 func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) { 359 var _p0 unsafe.Pointer 360 if len(events) > 0 { 361 _p0 = unsafe.Pointer(&events[0]) 362 } else { 363 _p0 = unsafe.Pointer(&_zero) 364 } 365 r0, _, e1 := Syscall6(SYS_EPOLL_WAIT, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec), 0, 0) 366 n = int(r0) 367 if e1 != 0 { 368 err = errnoErr(e1) 369 } 370 return 371 } 372 373 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 374 375 func Exit(code int) { 376 Syscall(SYS_EXIT_GROUP, uintptr(code), 0, 0) 377 return 378 } 379 380 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 381 382 func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) { 383 var _p0 *byte 384 _p0, err = BytePtrFromString(path) 385 if err != nil { 386 return 387 } 388 _, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0) 389 use(unsafe.Pointer(_p0)) 390 if e1 != 0 { 391 err = errnoErr(e1) 392 } 393 return 394 } 395 396 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 397 398 func Fallocate(fd int, mode uint32, off int64, len int64) (err error) { 399 _, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(len), 0, 0) 400 if e1 != 0 { 401 err = errnoErr(e1) 402 } 403 return 404 } 405 406 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 407 408 func Fchdir(fd int) (err error) { 409 _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0) 410 if e1 != 0 { 411 err = errnoErr(e1) 412 } 413 return 414 } 415 416 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 417 418 func Fchmod(fd int, mode uint32) (err error) { 419 _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0) 420 if e1 != 0 { 421 err = errnoErr(e1) 422 } 423 return 424 } 425 426 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 427 428 func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) { 429 var _p0 *byte 430 _p0, err = BytePtrFromString(path) 431 if err != nil { 432 return 433 } 434 _, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0) 435 use(unsafe.Pointer(_p0)) 436 if e1 != 0 { 437 err = errnoErr(e1) 438 } 439 return 440 } 441 442 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 443 444 func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) { 445 var _p0 *byte 446 _p0, err = BytePtrFromString(path) 447 if err != nil { 448 return 449 } 450 _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0) 451 use(unsafe.Pointer(_p0)) 452 if e1 != 0 { 453 err = errnoErr(e1) 454 } 455 return 456 } 457 458 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 459 460 func fcntl(fd int, cmd int, arg int) (val int, err error) { 461 r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg)) 462 val = int(r0) 463 if e1 != 0 { 464 err = errnoErr(e1) 465 } 466 return 467 } 468 469 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 470 471 func Fdatasync(fd int) (err error) { 472 _, _, e1 := Syscall(SYS_FDATASYNC, uintptr(fd), 0, 0) 473 if e1 != 0 { 474 err = errnoErr(e1) 475 } 476 return 477 } 478 479 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 480 481 func Flock(fd int, how int) (err error) { 482 _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0) 483 if e1 != 0 { 484 err = errnoErr(e1) 485 } 486 return 487 } 488 489 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 490 491 func Fsync(fd int) (err error) { 492 _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0) 493 if e1 != 0 { 494 err = errnoErr(e1) 495 } 496 return 497 } 498 499 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 500 501 func Getdents(fd int, buf []byte) (n int, err error) { 502 var _p0 unsafe.Pointer 503 if len(buf) > 0 { 504 _p0 = unsafe.Pointer(&buf[0]) 505 } else { 506 _p0 = unsafe.Pointer(&_zero) 507 } 508 r0, _, e1 := Syscall(SYS_GETDENTS64, uintptr(fd), uintptr(_p0), uintptr(len(buf))) 509 n = int(r0) 510 if e1 != 0 { 511 err = errnoErr(e1) 512 } 513 return 514 } 515 516 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 517 518 func Getpgid(pid int) (pgid int, err error) { 519 r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0) 520 pgid = int(r0) 521 if e1 != 0 { 522 err = errnoErr(e1) 523 } 524 return 525 } 526 527 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 528 529 func Getpid() (pid int) { 530 r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0) 531 pid = int(r0) 532 return 533 } 534 535 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 536 537 func Getppid() (ppid int) { 538 r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0) 539 ppid = int(r0) 540 return 541 } 542 543 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 544 545 func Getpriority(which int, who int) (prio int, err error) { 546 r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0) 547 prio = int(r0) 548 if e1 != 0 { 549 err = errnoErr(e1) 550 } 551 return 552 } 553 554 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 555 556 func Getrusage(who int, rusage *Rusage) (err error) { 557 _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0) 558 if e1 != 0 { 559 err = errnoErr(e1) 560 } 561 return 562 } 563 564 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 565 566 func Gettid() (tid int) { 567 r0, _, _ := RawSyscall(SYS_GETTID, 0, 0, 0) 568 tid = int(r0) 569 return 570 } 571 572 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 573 574 func Getxattr(path string, attr string, dest []byte) (sz int, err error) { 575 var _p0 *byte 576 _p0, err = BytePtrFromString(path) 577 if err != nil { 578 return 579 } 580 var _p1 *byte 581 _p1, err = BytePtrFromString(attr) 582 if err != nil { 583 return 584 } 585 var _p2 unsafe.Pointer 586 if len(dest) > 0 { 587 _p2 = unsafe.Pointer(&dest[0]) 588 } else { 589 _p2 = unsafe.Pointer(&_zero) 590 } 591 r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0) 592 use(unsafe.Pointer(_p0)) 593 use(unsafe.Pointer(_p1)) 594 sz = int(r0) 595 if e1 != 0 { 596 err = errnoErr(e1) 597 } 598 return 599 } 600 601 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 602 603 func InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) { 604 var _p0 *byte 605 _p0, err = BytePtrFromString(pathname) 606 if err != nil { 607 return 608 } 609 r0, _, e1 := Syscall(SYS_INOTIFY_ADD_WATCH, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mask)) 610 use(unsafe.Pointer(_p0)) 611 watchdesc = int(r0) 612 if e1 != 0 { 613 err = errnoErr(e1) 614 } 615 return 616 } 617 618 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 619 620 func InotifyInit1(flags int) (fd int, err error) { 621 r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT1, uintptr(flags), 0, 0) 622 fd = int(r0) 623 if e1 != 0 { 624 err = errnoErr(e1) 625 } 626 return 627 } 628 629 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 630 631 func InotifyRmWatch(fd int, watchdesc uint32) (success int, err error) { 632 r0, _, e1 := RawSyscall(SYS_INOTIFY_RM_WATCH, uintptr(fd), uintptr(watchdesc), 0) 633 success = int(r0) 634 if e1 != 0 { 635 err = errnoErr(e1) 636 } 637 return 638 } 639 640 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 641 642 func Kill(pid int, sig Signal) (err error) { 643 _, _, e1 := RawSyscall(SYS_KILL, uintptr(pid), uintptr(sig), 0) 644 if e1 != 0 { 645 err = errnoErr(e1) 646 } 647 return 648 } 649 650 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 651 652 func Klogctl(typ int, buf []byte) (n int, err error) { 653 var _p0 unsafe.Pointer 654 if len(buf) > 0 { 655 _p0 = unsafe.Pointer(&buf[0]) 656 } else { 657 _p0 = unsafe.Pointer(&_zero) 658 } 659 r0, _, e1 := Syscall(SYS_SYSLOG, uintptr(typ), uintptr(_p0), uintptr(len(buf))) 660 n = int(r0) 661 if e1 != 0 { 662 err = errnoErr(e1) 663 } 664 return 665 } 666 667 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 668 669 func Listxattr(path string, dest []byte) (sz int, err error) { 670 var _p0 *byte 671 _p0, err = BytePtrFromString(path) 672 if err != nil { 673 return 674 } 675 var _p1 unsafe.Pointer 676 if len(dest) > 0 { 677 _p1 = unsafe.Pointer(&dest[0]) 678 } else { 679 _p1 = unsafe.Pointer(&_zero) 680 } 681 r0, _, e1 := Syscall(SYS_LISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest))) 682 use(unsafe.Pointer(_p0)) 683 sz = int(r0) 684 if e1 != 0 { 685 err = errnoErr(e1) 686 } 687 return 688 } 689 690 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 691 692 func Mkdirat(dirfd int, path string, mode uint32) (err error) { 693 var _p0 *byte 694 _p0, err = BytePtrFromString(path) 695 if err != nil { 696 return 697 } 698 _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) 699 use(unsafe.Pointer(_p0)) 700 if e1 != 0 { 701 err = errnoErr(e1) 702 } 703 return 704 } 705 706 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 707 708 func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) { 709 var _p0 *byte 710 _p0, err = BytePtrFromString(path) 711 if err != nil { 712 return 713 } 714 _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0) 715 use(unsafe.Pointer(_p0)) 716 if e1 != 0 { 717 err = errnoErr(e1) 718 } 719 return 720 } 721 722 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 723 724 func Nanosleep(time *Timespec, leftover *Timespec) (err error) { 725 _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0) 726 if e1 != 0 { 727 err = errnoErr(e1) 728 } 729 return 730 } 731 732 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 733 734 func Pause() (err error) { 735 _, _, e1 := Syscall(SYS_PAUSE, 0, 0, 0) 736 if e1 != 0 { 737 err = errnoErr(e1) 738 } 739 return 740 } 741 742 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 743 744 func PivotRoot(newroot string, putold string) (err error) { 745 var _p0 *byte 746 _p0, err = BytePtrFromString(newroot) 747 if err != nil { 748 return 749 } 750 var _p1 *byte 751 _p1, err = BytePtrFromString(putold) 752 if err != nil { 753 return 754 } 755 _, _, e1 := Syscall(SYS_PIVOT_ROOT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) 756 use(unsafe.Pointer(_p0)) 757 use(unsafe.Pointer(_p1)) 758 if e1 != 0 { 759 err = errnoErr(e1) 760 } 761 return 762 } 763 764 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 765 766 func prlimit(pid int, resource int, old *Rlimit, newlimit *Rlimit) (err error) { 767 _, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(newlimit)), 0, 0) 768 if e1 != 0 { 769 err = errnoErr(e1) 770 } 771 return 772 } 773 774 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 775 776 func read(fd int, p []byte) (n int, err error) { 777 var _p0 unsafe.Pointer 778 if len(p) > 0 { 779 _p0 = unsafe.Pointer(&p[0]) 780 } else { 781 _p0 = unsafe.Pointer(&_zero) 782 } 783 r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p))) 784 n = int(r0) 785 if e1 != 0 { 786 err = errnoErr(e1) 787 } 788 return 789 } 790 791 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 792 793 func Removexattr(path string, attr string) (err error) { 794 var _p0 *byte 795 _p0, err = BytePtrFromString(path) 796 if err != nil { 797 return 798 } 799 var _p1 *byte 800 _p1, err = BytePtrFromString(attr) 801 if err != nil { 802 return 803 } 804 _, _, e1 := Syscall(SYS_REMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) 805 use(unsafe.Pointer(_p0)) 806 use(unsafe.Pointer(_p1)) 807 if e1 != 0 { 808 err = errnoErr(e1) 809 } 810 return 811 } 812 813 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 814 815 func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) { 816 var _p0 *byte 817 _p0, err = BytePtrFromString(oldpath) 818 if err != nil { 819 return 820 } 821 var _p1 *byte 822 _p1, err = BytePtrFromString(newpath) 823 if err != nil { 824 return 825 } 826 _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0) 827 use(unsafe.Pointer(_p0)) 828 use(unsafe.Pointer(_p1)) 829 if e1 != 0 { 830 err = errnoErr(e1) 831 } 832 return 833 } 834 835 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 836 837 func Setdomainname(p []byte) (err error) { 838 var _p0 unsafe.Pointer 839 if len(p) > 0 { 840 _p0 = unsafe.Pointer(&p[0]) 841 } else { 842 _p0 = unsafe.Pointer(&_zero) 843 } 844 _, _, e1 := Syscall(SYS_SETDOMAINNAME, uintptr(_p0), uintptr(len(p)), 0) 845 if e1 != 0 { 846 err = errnoErr(e1) 847 } 848 return 849 } 850 851 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 852 853 func Sethostname(p []byte) (err error) { 854 var _p0 unsafe.Pointer 855 if len(p) > 0 { 856 _p0 = unsafe.Pointer(&p[0]) 857 } else { 858 _p0 = unsafe.Pointer(&_zero) 859 } 860 _, _, e1 := Syscall(SYS_SETHOSTNAME, uintptr(_p0), uintptr(len(p)), 0) 861 if e1 != 0 { 862 err = errnoErr(e1) 863 } 864 return 865 } 866 867 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 868 869 func Setpgid(pid int, pgid int) (err error) { 870 _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0) 871 if e1 != 0 { 872 err = errnoErr(e1) 873 } 874 return 875 } 876 877 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 878 879 func Setsid() (pid int, err error) { 880 r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0) 881 pid = int(r0) 882 if e1 != 0 { 883 err = errnoErr(e1) 884 } 885 return 886 } 887 888 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 889 890 func Settimeofday(tv *Timeval) (err error) { 891 _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0) 892 if e1 != 0 { 893 err = errnoErr(e1) 894 } 895 return 896 } 897 898 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 899 900 func Setpriority(which int, who int, prio int) (err error) { 901 _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio)) 902 if e1 != 0 { 903 err = errnoErr(e1) 904 } 905 return 906 } 907 908 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 909 910 func Setxattr(path string, attr string, data []byte, flags int) (err error) { 911 var _p0 *byte 912 _p0, err = BytePtrFromString(path) 913 if err != nil { 914 return 915 } 916 var _p1 *byte 917 _p1, err = BytePtrFromString(attr) 918 if err != nil { 919 return 920 } 921 var _p2 unsafe.Pointer 922 if len(data) > 0 { 923 _p2 = unsafe.Pointer(&data[0]) 924 } else { 925 _p2 = unsafe.Pointer(&_zero) 926 } 927 _, _, e1 := Syscall6(SYS_SETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0) 928 use(unsafe.Pointer(_p0)) 929 use(unsafe.Pointer(_p1)) 930 if e1 != 0 { 931 err = errnoErr(e1) 932 } 933 return 934 } 935 936 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 937 938 func Sync() { 939 Syscall(SYS_SYNC, 0, 0, 0) 940 return 941 } 942 943 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 944 945 func Sysinfo(info *Sysinfo_t) (err error) { 946 _, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0) 947 if e1 != 0 { 948 err = errnoErr(e1) 949 } 950 return 951 } 952 953 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 954 955 func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) { 956 r0, _, e1 := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0) 957 n = int64(r0) 958 if e1 != 0 { 959 err = errnoErr(e1) 960 } 961 return 962 } 963 964 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 965 966 func Tgkill(tgid int, tid int, sig Signal) (err error) { 967 _, _, e1 := RawSyscall(SYS_TGKILL, uintptr(tgid), uintptr(tid), uintptr(sig)) 968 if e1 != 0 { 969 err = errnoErr(e1) 970 } 971 return 972 } 973 974 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 975 976 func Times(tms *Tms) (ticks uintptr, err error) { 977 r0, _, e1 := RawSyscall(SYS_TIMES, uintptr(unsafe.Pointer(tms)), 0, 0) 978 ticks = uintptr(r0) 979 if e1 != 0 { 980 err = errnoErr(e1) 981 } 982 return 983 } 984 985 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 986 987 func Umask(mask int) (oldmask int) { 988 r0, _, _ := RawSyscall(SYS_UMASK, uintptr(mask), 0, 0) 989 oldmask = int(r0) 990 return 991 } 992 993 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 994 995 func Uname(buf *Utsname) (err error) { 996 _, _, e1 := RawSyscall(SYS_UNAME, uintptr(unsafe.Pointer(buf)), 0, 0) 997 if e1 != 0 { 998 err = errnoErr(e1) 999 } 1000 return 1001 } 1002 1003 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1004 1005 func Unmount(target string, flags int) (err error) { 1006 var _p0 *byte 1007 _p0, err = BytePtrFromString(target) 1008 if err != nil { 1009 return 1010 } 1011 _, _, e1 := Syscall(SYS_UMOUNT2, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) 1012 use(unsafe.Pointer(_p0)) 1013 if e1 != 0 { 1014 err = errnoErr(e1) 1015 } 1016 return 1017 } 1018 1019 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1020 1021 func Unshare(flags int) (err error) { 1022 _, _, e1 := Syscall(SYS_UNSHARE, uintptr(flags), 0, 0) 1023 if e1 != 0 { 1024 err = errnoErr(e1) 1025 } 1026 return 1027 } 1028 1029 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1030 1031 func Ustat(dev int, ubuf *Ustat_t) (err error) { 1032 _, _, e1 := Syscall(SYS_USTAT, uintptr(dev), uintptr(unsafe.Pointer(ubuf)), 0) 1033 if e1 != 0 { 1034 err = errnoErr(e1) 1035 } 1036 return 1037 } 1038 1039 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1040 1041 func Utime(path string, buf *Utimbuf) (err error) { 1042 var _p0 *byte 1043 _p0, err = BytePtrFromString(path) 1044 if err != nil { 1045 return 1046 } 1047 _, _, e1 := Syscall(SYS_UTIME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0) 1048 use(unsafe.Pointer(_p0)) 1049 if e1 != 0 { 1050 err = errnoErr(e1) 1051 } 1052 return 1053 } 1054 1055 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1056 1057 func write(fd int, p []byte) (n int, err error) { 1058 var _p0 unsafe.Pointer 1059 if len(p) > 0 { 1060 _p0 = unsafe.Pointer(&p[0]) 1061 } else { 1062 _p0 = unsafe.Pointer(&_zero) 1063 } 1064 r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p))) 1065 n = int(r0) 1066 if e1 != 0 { 1067 err = errnoErr(e1) 1068 } 1069 return 1070 } 1071 1072 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1073 1074 func exitThread(code int) (err error) { 1075 _, _, e1 := Syscall(SYS_EXIT, uintptr(code), 0, 0) 1076 if e1 != 0 { 1077 err = errnoErr(e1) 1078 } 1079 return 1080 } 1081 1082 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1083 1084 func readlen(fd int, p *byte, np int) (n int, err error) { 1085 r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np)) 1086 n = int(r0) 1087 if e1 != 0 { 1088 err = errnoErr(e1) 1089 } 1090 return 1091 } 1092 1093 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1094 1095 func writelen(fd int, p *byte, np int) (n int, err error) { 1096 r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np)) 1097 n = int(r0) 1098 if e1 != 0 { 1099 err = errnoErr(e1) 1100 } 1101 return 1102 } 1103 1104 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1105 1106 func munmap(addr uintptr, length uintptr) (err error) { 1107 _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0) 1108 if e1 != 0 { 1109 err = errnoErr(e1) 1110 } 1111 return 1112 } 1113 1114 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1115 1116 func Madvise(b []byte, advice int) (err error) { 1117 var _p0 unsafe.Pointer 1118 if len(b) > 0 { 1119 _p0 = unsafe.Pointer(&b[0]) 1120 } else { 1121 _p0 = unsafe.Pointer(&_zero) 1122 } 1123 _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(advice)) 1124 if e1 != 0 { 1125 err = errnoErr(e1) 1126 } 1127 return 1128 } 1129 1130 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1131 1132 func Mprotect(b []byte, prot int) (err error) { 1133 var _p0 unsafe.Pointer 1134 if len(b) > 0 { 1135 _p0 = unsafe.Pointer(&b[0]) 1136 } else { 1137 _p0 = unsafe.Pointer(&_zero) 1138 } 1139 _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot)) 1140 if e1 != 0 { 1141 err = errnoErr(e1) 1142 } 1143 return 1144 } 1145 1146 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1147 1148 func Mlock(b []byte) (err error) { 1149 var _p0 unsafe.Pointer 1150 if len(b) > 0 { 1151 _p0 = unsafe.Pointer(&b[0]) 1152 } else { 1153 _p0 = unsafe.Pointer(&_zero) 1154 } 1155 _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0) 1156 if e1 != 0 { 1157 err = errnoErr(e1) 1158 } 1159 return 1160 } 1161 1162 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1163 1164 func Munlock(b []byte) (err error) { 1165 var _p0 unsafe.Pointer 1166 if len(b) > 0 { 1167 _p0 = unsafe.Pointer(&b[0]) 1168 } else { 1169 _p0 = unsafe.Pointer(&_zero) 1170 } 1171 _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) 1172 if e1 != 0 { 1173 err = errnoErr(e1) 1174 } 1175 return 1176 } 1177 1178 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1179 1180 func Mlockall(flags int) (err error) { 1181 _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0) 1182 if e1 != 0 { 1183 err = errnoErr(e1) 1184 } 1185 return 1186 } 1187 1188 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1189 1190 func Munlockall() (err error) { 1191 _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0) 1192 if e1 != 0 { 1193 err = errnoErr(e1) 1194 } 1195 return 1196 } 1197 1198 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1199 1200 func Fchown(fd int, uid int, gid int) (err error) { 1201 _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid)) 1202 if e1 != 0 { 1203 err = errnoErr(e1) 1204 } 1205 return 1206 } 1207 1208 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1209 1210 func Fstat(fd int, stat *Stat_t) (err error) { 1211 _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0) 1212 if e1 != 0 { 1213 err = errnoErr(e1) 1214 } 1215 return 1216 } 1217 1218 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1219 1220 func Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) { 1221 var _p0 *byte 1222 _p0, err = BytePtrFromString(path) 1223 if err != nil { 1224 return 1225 } 1226 _, _, e1 := Syscall6(SYS_FSTATAT, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0) 1227 use(unsafe.Pointer(_p0)) 1228 if e1 != 0 { 1229 err = errnoErr(e1) 1230 } 1231 return 1232 } 1233 1234 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1235 1236 func Fstatfs(fd int, buf *Statfs_t) (err error) { 1237 _, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(buf)), 0) 1238 if e1 != 0 { 1239 err = errnoErr(e1) 1240 } 1241 return 1242 } 1243 1244 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1245 1246 func Ftruncate(fd int, length int64) (err error) { 1247 _, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), 0) 1248 if e1 != 0 { 1249 err = errnoErr(e1) 1250 } 1251 return 1252 } 1253 1254 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1255 1256 func Getegid() (egid int) { 1257 r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0) 1258 egid = int(r0) 1259 return 1260 } 1261 1262 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1263 1264 func Geteuid() (euid int) { 1265 r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0) 1266 euid = int(r0) 1267 return 1268 } 1269 1270 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1271 1272 func Getgid() (gid int) { 1273 r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0) 1274 gid = int(r0) 1275 return 1276 } 1277 1278 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1279 1280 func Getrlimit(resource int, rlim *Rlimit) (err error) { 1281 _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0) 1282 if e1 != 0 { 1283 err = errnoErr(e1) 1284 } 1285 return 1286 } 1287 1288 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1289 1290 func Getuid() (uid int) { 1291 r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0) 1292 uid = int(r0) 1293 return 1294 } 1295 1296 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1297 1298 func Listen(s int, n int) (err error) { 1299 _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(n), 0) 1300 if e1 != 0 { 1301 err = errnoErr(e1) 1302 } 1303 return 1304 } 1305 1306 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1307 1308 func Pread(fd int, p []byte, offset int64) (n int, err error) { 1309 var _p0 unsafe.Pointer 1310 if len(p) > 0 { 1311 _p0 = unsafe.Pointer(&p[0]) 1312 } else { 1313 _p0 = unsafe.Pointer(&_zero) 1314 } 1315 r0, _, e1 := Syscall6(SYS_PREAD64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0) 1316 n = int(r0) 1317 if e1 != 0 { 1318 err = errnoErr(e1) 1319 } 1320 return 1321 } 1322 1323 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1324 1325 func Pwrite(fd int, p []byte, offset int64) (n int, err error) { 1326 var _p0 unsafe.Pointer 1327 if len(p) > 0 { 1328 _p0 = unsafe.Pointer(&p[0]) 1329 } else { 1330 _p0 = unsafe.Pointer(&_zero) 1331 } 1332 r0, _, e1 := Syscall6(SYS_PWRITE64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0) 1333 n = int(r0) 1334 if e1 != 0 { 1335 err = errnoErr(e1) 1336 } 1337 return 1338 } 1339 1340 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1341 1342 func Seek(fd int, offset int64, whence int) (off int64, err error) { 1343 r0, _, e1 := Syscall(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence)) 1344 off = int64(r0) 1345 if e1 != 0 { 1346 err = errnoErr(e1) 1347 } 1348 return 1349 } 1350 1351 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1352 1353 func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) { 1354 r0, _, e1 := Syscall6(SYS_PSELECT6, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0) 1355 n = int(r0) 1356 if e1 != 0 { 1357 err = errnoErr(e1) 1358 } 1359 return 1360 } 1361 1362 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1363 1364 func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) { 1365 r0, _, e1 := Syscall6(SYS_SENDFILE, uintptr(outfd), uintptr(infd), uintptr(unsafe.Pointer(offset)), uintptr(count), 0, 0) 1366 written = int(r0) 1367 if e1 != 0 { 1368 err = errnoErr(e1) 1369 } 1370 return 1371 } 1372 1373 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1374 1375 func Setfsgid(gid int) (err error) { 1376 _, _, e1 := Syscall(SYS_SETFSGID, uintptr(gid), 0, 0) 1377 if e1 != 0 { 1378 err = errnoErr(e1) 1379 } 1380 return 1381 } 1382 1383 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1384 1385 func Setfsuid(uid int) (err error) { 1386 _, _, e1 := Syscall(SYS_SETFSUID, uintptr(uid), 0, 0) 1387 if e1 != 0 { 1388 err = errnoErr(e1) 1389 } 1390 return 1391 } 1392 1393 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1394 1395 func Setregid(rgid int, egid int) (err error) { 1396 _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0) 1397 if e1 != 0 { 1398 err = errnoErr(e1) 1399 } 1400 return 1401 } 1402 1403 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1404 1405 func Setresgid(rgid int, egid int, sgid int) (err error) { 1406 _, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid)) 1407 if e1 != 0 { 1408 err = errnoErr(e1) 1409 } 1410 return 1411 } 1412 1413 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1414 1415 func Setresuid(ruid int, euid int, suid int) (err error) { 1416 _, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid)) 1417 if e1 != 0 { 1418 err = errnoErr(e1) 1419 } 1420 return 1421 } 1422 1423 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1424 1425 func Setrlimit(resource int, rlim *Rlimit) (err error) { 1426 _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0) 1427 if e1 != 0 { 1428 err = errnoErr(e1) 1429 } 1430 return 1431 } 1432 1433 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1434 1435 func Setreuid(ruid int, euid int) (err error) { 1436 _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0) 1437 if e1 != 0 { 1438 err = errnoErr(e1) 1439 } 1440 return 1441 } 1442 1443 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1444 1445 func Shutdown(fd int, how int) (err error) { 1446 _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0) 1447 if e1 != 0 { 1448 err = errnoErr(e1) 1449 } 1450 return 1451 } 1452 1453 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1454 1455 func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error) { 1456 r0, _, e1 := Syscall6(SYS_SPLICE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags)) 1457 n = int64(r0) 1458 if e1 != 0 { 1459 err = errnoErr(e1) 1460 } 1461 return 1462 } 1463 1464 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1465 1466 func Statfs(path string, buf *Statfs_t) (err error) { 1467 var _p0 *byte 1468 _p0, err = BytePtrFromString(path) 1469 if err != nil { 1470 return 1471 } 1472 _, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0) 1473 use(unsafe.Pointer(_p0)) 1474 if e1 != 0 { 1475 err = errnoErr(e1) 1476 } 1477 return 1478 } 1479 1480 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1481 1482 func SyncFileRange(fd int, off int64, n int64, flags int) (err error) { 1483 _, _, e1 := Syscall6(SYS_SYNC_FILE_RANGE2, uintptr(fd), uintptr(off), uintptr(n), uintptr(flags), 0, 0) 1484 if e1 != 0 { 1485 err = errnoErr(e1) 1486 } 1487 return 1488 } 1489 1490 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1491 1492 func Truncate(path string, length int64) (err error) { 1493 var _p0 *byte 1494 _p0, err = BytePtrFromString(path) 1495 if err != nil { 1496 return 1497 } 1498 _, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0) 1499 use(unsafe.Pointer(_p0)) 1500 if e1 != 0 { 1501 err = errnoErr(e1) 1502 } 1503 return 1504 } 1505 1506 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1507 1508 func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) { 1509 r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) 1510 fd = int(r0) 1511 if e1 != 0 { 1512 err = errnoErr(e1) 1513 } 1514 return 1515 } 1516 1517 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1518 1519 func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) { 1520 r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0) 1521 fd = int(r0) 1522 if e1 != 0 { 1523 err = errnoErr(e1) 1524 } 1525 return 1526 } 1527 1528 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1529 1530 func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { 1531 _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen)) 1532 if e1 != 0 { 1533 err = errnoErr(e1) 1534 } 1535 return 1536 } 1537 1538 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1539 1540 func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { 1541 _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen)) 1542 if e1 != 0 { 1543 err = errnoErr(e1) 1544 } 1545 return 1546 } 1547 1548 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1549 1550 func getgroups(n int, list *_Gid_t) (nn int, err error) { 1551 r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0) 1552 nn = int(r0) 1553 if e1 != 0 { 1554 err = errnoErr(e1) 1555 } 1556 return 1557 } 1558 1559 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1560 1561 func setgroups(n int, list *_Gid_t) (err error) { 1562 _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0) 1563 if e1 != 0 { 1564 err = errnoErr(e1) 1565 } 1566 return 1567 } 1568 1569 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1570 1571 func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) { 1572 _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0) 1573 if e1 != 0 { 1574 err = errnoErr(e1) 1575 } 1576 return 1577 } 1578 1579 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1580 1581 func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) { 1582 _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0) 1583 if e1 != 0 { 1584 err = errnoErr(e1) 1585 } 1586 return 1587 } 1588 1589 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1590 1591 func socket(domain int, typ int, proto int) (fd int, err error) { 1592 r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto)) 1593 fd = int(r0) 1594 if e1 != 0 { 1595 err = errnoErr(e1) 1596 } 1597 return 1598 } 1599 1600 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1601 1602 func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) { 1603 _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0) 1604 if e1 != 0 { 1605 err = errnoErr(e1) 1606 } 1607 return 1608 } 1609 1610 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1611 1612 func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { 1613 _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) 1614 if e1 != 0 { 1615 err = errnoErr(e1) 1616 } 1617 return 1618 } 1619 1620 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1621 1622 func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { 1623 _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) 1624 if e1 != 0 { 1625 err = errnoErr(e1) 1626 } 1627 return 1628 } 1629 1630 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1631 1632 func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) { 1633 var _p0 unsafe.Pointer 1634 if len(p) > 0 { 1635 _p0 = unsafe.Pointer(&p[0]) 1636 } else { 1637 _p0 = unsafe.Pointer(&_zero) 1638 } 1639 r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen))) 1640 n = int(r0) 1641 if e1 != 0 { 1642 err = errnoErr(e1) 1643 } 1644 return 1645 } 1646 1647 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1648 1649 func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) { 1650 var _p0 unsafe.Pointer 1651 if len(buf) > 0 { 1652 _p0 = unsafe.Pointer(&buf[0]) 1653 } else { 1654 _p0 = unsafe.Pointer(&_zero) 1655 } 1656 _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen)) 1657 if e1 != 0 { 1658 err = errnoErr(e1) 1659 } 1660 return 1661 } 1662 1663 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1664 1665 func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) { 1666 r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) 1667 n = int(r0) 1668 if e1 != 0 { 1669 err = errnoErr(e1) 1670 } 1671 return 1672 } 1673 1674 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1675 1676 func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) { 1677 r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) 1678 n = int(r0) 1679 if e1 != 0 { 1680 err = errnoErr(e1) 1681 } 1682 return 1683 } 1684 1685 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1686 1687 func mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) { 1688 r0, _, e1 := Syscall6(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(offset)) 1689 xaddr = uintptr(r0) 1690 if e1 != 0 { 1691 err = errnoErr(e1) 1692 } 1693 return 1694 } 1695 1696 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1697 1698 func Gettimeofday(tv *Timeval) (err error) { 1699 _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0) 1700 if e1 != 0 { 1701 err = errnoErr(e1) 1702 } 1703 return 1704 } 1705 1706 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1707 1708 func Time(t *Time_t) (tt Time_t, err error) { 1709 r0, _, e1 := RawSyscall(SYS_TIME, uintptr(unsafe.Pointer(t)), 0, 0) 1710 tt = Time_t(r0) 1711 if e1 != 0 { 1712 err = errnoErr(e1) 1713 } 1714 return 1715 } 1716 1717 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1718 1719 func pipe2(p *[2]_C_int, flags int) (err error) { 1720 _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0) 1721 if e1 != 0 { 1722 err = errnoErr(e1) 1723 } 1724 return 1725 } 1726