1 // mksyscall.pl -l32 syscall_linux.go syscall_linux_386.go 2 // MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT 3 4 // +build 386,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(off>>32), uintptr(len), uintptr(len>>32)) 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_getdents, 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, newlimit *Rlimit, old *Rlimit) (err error) { 767 _, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(newlimit)), uintptr(unsafe.Pointer(old)), 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, r1, e1 := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0) 957 n = int64(int64(r1)<<32 | 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 pipe(p *[2]_C_int) (err error) { 1201 _, _, e1 := RawSyscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0) 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 pipe2(p *[2]_C_int, flags int) (err error) { 1211 _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 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 Dup2(oldfd int, newfd int) (err error) { 1221 _, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0) 1222 if e1 != 0 { 1223 err = errnoErr(e1) 1224 } 1225 return 1226 } 1227 1228 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1229 1230 func Fchown(fd int, uid int, gid int) (err error) { 1231 _, _, e1 := Syscall(SYS_FCHOWN32, uintptr(fd), uintptr(uid), uintptr(gid)) 1232 if e1 != 0 { 1233 err = errnoErr(e1) 1234 } 1235 return 1236 } 1237 1238 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1239 1240 func Fstat(fd int, stat *Stat_t) (err error) { 1241 _, _, e1 := Syscall(SYS_FSTAT64, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0) 1242 if e1 != 0 { 1243 err = errnoErr(e1) 1244 } 1245 return 1246 } 1247 1248 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1249 1250 func Ftruncate(fd int, length int64) (err error) { 1251 _, _, e1 := Syscall(SYS_FTRUNCATE64, uintptr(fd), uintptr(length), uintptr(length>>32)) 1252 if e1 != 0 { 1253 err = errnoErr(e1) 1254 } 1255 return 1256 } 1257 1258 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1259 1260 func Getegid() (egid int) { 1261 r0, _, _ := RawSyscall(SYS_GETEGID32, 0, 0, 0) 1262 egid = int(r0) 1263 return 1264 } 1265 1266 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1267 1268 func Geteuid() (euid int) { 1269 r0, _, _ := RawSyscall(SYS_GETEUID32, 0, 0, 0) 1270 euid = int(r0) 1271 return 1272 } 1273 1274 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1275 1276 func Getgid() (gid int) { 1277 r0, _, _ := RawSyscall(SYS_GETGID32, 0, 0, 0) 1278 gid = int(r0) 1279 return 1280 } 1281 1282 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1283 1284 func Getuid() (uid int) { 1285 r0, _, _ := RawSyscall(SYS_GETUID32, 0, 0, 0) 1286 uid = int(r0) 1287 return 1288 } 1289 1290 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1291 1292 func InotifyInit() (fd int, err error) { 1293 r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT, 0, 0, 0) 1294 fd = int(r0) 1295 if e1 != 0 { 1296 err = errnoErr(e1) 1297 } 1298 return 1299 } 1300 1301 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1302 1303 func Ioperm(from int, num int, on int) (err error) { 1304 _, _, e1 := Syscall(SYS_IOPERM, uintptr(from), uintptr(num), uintptr(on)) 1305 if e1 != 0 { 1306 err = errnoErr(e1) 1307 } 1308 return 1309 } 1310 1311 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1312 1313 func Iopl(level int) (err error) { 1314 _, _, e1 := Syscall(SYS_IOPL, uintptr(level), 0, 0) 1315 if e1 != 0 { 1316 err = errnoErr(e1) 1317 } 1318 return 1319 } 1320 1321 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1322 1323 func Lchown(path string, uid int, gid int) (err error) { 1324 var _p0 *byte 1325 _p0, err = BytePtrFromString(path) 1326 if err != nil { 1327 return 1328 } 1329 _, _, e1 := Syscall(SYS_LCHOWN32, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) 1330 use(unsafe.Pointer(_p0)) 1331 if e1 != 0 { 1332 err = errnoErr(e1) 1333 } 1334 return 1335 } 1336 1337 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1338 1339 func Lstat(path string, stat *Stat_t) (err error) { 1340 var _p0 *byte 1341 _p0, err = BytePtrFromString(path) 1342 if err != nil { 1343 return 1344 } 1345 _, _, e1 := Syscall(SYS_LSTAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) 1346 use(unsafe.Pointer(_p0)) 1347 if e1 != 0 { 1348 err = errnoErr(e1) 1349 } 1350 return 1351 } 1352 1353 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1354 1355 func Pread(fd int, p []byte, offset int64) (n int, err error) { 1356 var _p0 unsafe.Pointer 1357 if len(p) > 0 { 1358 _p0 = unsafe.Pointer(&p[0]) 1359 } else { 1360 _p0 = unsafe.Pointer(&_zero) 1361 } 1362 r0, _, e1 := Syscall6(SYS_PREAD64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0) 1363 n = int(r0) 1364 if e1 != 0 { 1365 err = errnoErr(e1) 1366 } 1367 return 1368 } 1369 1370 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1371 1372 func Pwrite(fd int, p []byte, offset int64) (n int, err error) { 1373 var _p0 unsafe.Pointer 1374 if len(p) > 0 { 1375 _p0 = unsafe.Pointer(&p[0]) 1376 } else { 1377 _p0 = unsafe.Pointer(&_zero) 1378 } 1379 r0, _, e1 := Syscall6(SYS_PWRITE64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 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_SENDFILE64, 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_SETFSGID32, 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_SETFSUID32, 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_SETREGID32, 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_SETRESGID32, 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_SETRESUID32, 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 Setreuid(ruid int, euid int) (err error) { 1451 _, _, e1 := RawSyscall(SYS_SETREUID32, uintptr(ruid), uintptr(euid), 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 Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error) { 1461 r0, _, e1 := Syscall6(SYS_SPLICE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags)) 1462 n = int(r0) 1463 if e1 != 0 { 1464 err = errnoErr(e1) 1465 } 1466 return 1467 } 1468 1469 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1470 1471 func Stat(path string, stat *Stat_t) (err error) { 1472 var _p0 *byte 1473 _p0, err = BytePtrFromString(path) 1474 if err != nil { 1475 return 1476 } 1477 _, _, e1 := Syscall(SYS_STAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) 1478 use(unsafe.Pointer(_p0)) 1479 if e1 != 0 { 1480 err = errnoErr(e1) 1481 } 1482 return 1483 } 1484 1485 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1486 1487 func SyncFileRange(fd int, off int64, n int64, flags int) (err error) { 1488 _, _, e1 := Syscall6(SYS_SYNC_FILE_RANGE, uintptr(fd), uintptr(off), uintptr(off>>32), uintptr(n), uintptr(n>>32), uintptr(flags)) 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 Truncate(path string, length int64) (err error) { 1498 var _p0 *byte 1499 _p0, err = BytePtrFromString(path) 1500 if err != nil { 1501 return 1502 } 1503 _, _, e1 := Syscall(SYS_TRUNCATE64, uintptr(unsafe.Pointer(_p0)), uintptr(length), uintptr(length>>32)) 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 getgroups(n int, list *_Gid_t) (nn int, err error) { 1514 r0, _, e1 := RawSyscall(SYS_GETGROUPS32, uintptr(n), uintptr(unsafe.Pointer(list)), 0) 1515 nn = int(r0) 1516 if e1 != 0 { 1517 err = errnoErr(e1) 1518 } 1519 return 1520 } 1521 1522 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1523 1524 func setgroups(n int, list *_Gid_t) (err error) { 1525 _, _, e1 := RawSyscall(SYS_SETGROUPS32, uintptr(n), uintptr(unsafe.Pointer(list)), 0) 1526 if e1 != 0 { 1527 err = errnoErr(e1) 1528 } 1529 return 1530 } 1531 1532 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1533 1534 func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) { 1535 r0, _, e1 := Syscall6(SYS__NEWSELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0) 1536 n = int(r0) 1537 if e1 != 0 { 1538 err = errnoErr(e1) 1539 } 1540 return 1541 } 1542 1543 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1544 1545 func mmap2(addr uintptr, length uintptr, prot int, flags int, fd int, pageOffset uintptr) (xaddr uintptr, err error) { 1546 r0, _, e1 := Syscall6(SYS_MMAP2, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(pageOffset)) 1547 xaddr = uintptr(r0) 1548 if e1 != 0 { 1549 err = errnoErr(e1) 1550 } 1551 return 1552 } 1553 1554 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1555 1556 func getrlimit(resource int, rlim *rlimit32) (err error) { 1557 _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0) 1558 if e1 != 0 { 1559 err = errnoErr(e1) 1560 } 1561 return 1562 } 1563 1564 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1565 1566 func setrlimit(resource int, rlim *rlimit32) (err error) { 1567 _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0) 1568 if e1 != 0 { 1569 err = errnoErr(e1) 1570 } 1571 return 1572 } 1573 1574 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1575 1576 func Gettimeofday(tv *Timeval) (err error) { 1577 _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0) 1578 if e1 != 0 { 1579 err = errnoErr(e1) 1580 } 1581 return 1582 } 1583 1584 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1585 1586 func Time(t *Time_t) (tt Time_t, err error) { 1587 r0, _, e1 := RawSyscall(SYS_TIME, uintptr(unsafe.Pointer(t)), 0, 0) 1588 tt = Time_t(r0) 1589 if e1 != 0 { 1590 err = errnoErr(e1) 1591 } 1592 return 1593 } 1594