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