github.com/go-xe2/third@v1.0.3/golang.org/x/sys/unix/zsyscall_linux_arm.go (about) 1 // go run mksyscall.go -l32 -arm -tags linux,arm syscall_linux.go syscall_linux_arm.go 2 // Code generated by the command above; see README.md. DO NOT EDIT. 3 4 // +build linux,arm 5 6 package unix 7 8 import ( 9 "syscall" 10 "unsafe" 11 ) 12 13 var _ syscall.Errno 14 15 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 16 17 func fchmodat(dirfd int, path string, mode uint32) (err error) { 18 var _p0 *byte 19 _p0, err = BytePtrFromString(path) 20 if err != nil { 21 return 22 } 23 _, _, e1 := Syscall(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) 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 ioctl(fd int, req uint, arg uintptr) (err error) { 33 _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg)) 34 if e1 != 0 { 35 err = errnoErr(e1) 36 } 37 return 38 } 39 40 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 41 42 func Linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags int) (err error) { 43 var _p0 *byte 44 _p0, err = BytePtrFromString(oldpath) 45 if err != nil { 46 return 47 } 48 var _p1 *byte 49 _p1, err = BytePtrFromString(newpath) 50 if err != nil { 51 return 52 } 53 _, _, e1 := Syscall6(SYS_LINKAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0) 54 if e1 != 0 { 55 err = errnoErr(e1) 56 } 57 return 58 } 59 60 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 61 62 func openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) { 63 var _p0 *byte 64 _p0, err = BytePtrFromString(path) 65 if err != nil { 66 return 67 } 68 r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mode), 0, 0) 69 fd = int(r0) 70 if e1 != 0 { 71 err = errnoErr(e1) 72 } 73 return 74 } 75 76 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 77 78 func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) { 79 r0, _, e1 := Syscall6(SYS_PPOLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0) 80 n = int(r0) 81 if e1 != 0 { 82 err = errnoErr(e1) 83 } 84 return 85 } 86 87 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 88 89 func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) { 90 var _p0 *byte 91 _p0, err = BytePtrFromString(path) 92 if err != nil { 93 return 94 } 95 var _p1 unsafe.Pointer 96 if len(buf) > 0 { 97 _p1 = unsafe.Pointer(&buf[0]) 98 } else { 99 _p1 = unsafe.Pointer(&_zero) 100 } 101 r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0) 102 n = int(r0) 103 if e1 != 0 { 104 err = errnoErr(e1) 105 } 106 return 107 } 108 109 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 110 111 func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) { 112 var _p0 *byte 113 _p0, err = BytePtrFromString(oldpath) 114 if err != nil { 115 return 116 } 117 var _p1 *byte 118 _p1, err = BytePtrFromString(newpath) 119 if err != nil { 120 return 121 } 122 _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1))) 123 if e1 != 0 { 124 err = errnoErr(e1) 125 } 126 return 127 } 128 129 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 130 131 func Unlinkat(dirfd int, path string, flags int) (err error) { 132 var _p0 *byte 133 _p0, err = BytePtrFromString(path) 134 if err != nil { 135 return 136 } 137 _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags)) 138 if e1 != 0 { 139 err = errnoErr(e1) 140 } 141 return 142 } 143 144 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 145 146 func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) { 147 var _p0 *byte 148 _p0, err = BytePtrFromString(path) 149 if err != nil { 150 return 151 } 152 _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0) 153 if e1 != 0 { 154 err = errnoErr(e1) 155 } 156 return 157 } 158 159 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 160 161 func Getcwd(buf []byte) (n int, err error) { 162 var _p0 unsafe.Pointer 163 if len(buf) > 0 { 164 _p0 = unsafe.Pointer(&buf[0]) 165 } else { 166 _p0 = unsafe.Pointer(&_zero) 167 } 168 r0, _, e1 := Syscall(SYS_GETCWD, uintptr(_p0), uintptr(len(buf)), 0) 169 n = int(r0) 170 if e1 != 0 { 171 err = errnoErr(e1) 172 } 173 return 174 } 175 176 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 177 178 func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) { 179 r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0) 180 wpid = int(r0) 181 if e1 != 0 { 182 err = errnoErr(e1) 183 } 184 return 185 } 186 187 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 188 189 func KeyctlInt(cmd int, arg2 int, arg3 int, arg4 int, arg5 int) (ret int, err error) { 190 r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0) 191 ret = int(r0) 192 if e1 != 0 { 193 err = errnoErr(e1) 194 } 195 return 196 } 197 198 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 199 200 func KeyctlBuffer(cmd int, arg2 int, buf []byte, arg5 int) (ret int, err error) { 201 var _p0 unsafe.Pointer 202 if len(buf) > 0 { 203 _p0 = unsafe.Pointer(&buf[0]) 204 } else { 205 _p0 = unsafe.Pointer(&_zero) 206 } 207 r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(_p0), uintptr(len(buf)), uintptr(arg5), 0) 208 ret = int(r0) 209 if e1 != 0 { 210 err = errnoErr(e1) 211 } 212 return 213 } 214 215 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 216 217 func keyctlJoin(cmd int, arg2 string) (ret int, err error) { 218 var _p0 *byte 219 _p0, err = BytePtrFromString(arg2) 220 if err != nil { 221 return 222 } 223 r0, _, e1 := Syscall(SYS_KEYCTL, uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0) 224 ret = int(r0) 225 if e1 != 0 { 226 err = errnoErr(e1) 227 } 228 return 229 } 230 231 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 232 233 func keyctlSearch(cmd int, arg2 int, arg3 string, arg4 string, arg5 int) (ret int, err error) { 234 var _p0 *byte 235 _p0, err = BytePtrFromString(arg3) 236 if err != nil { 237 return 238 } 239 var _p1 *byte 240 _p1, err = BytePtrFromString(arg4) 241 if err != nil { 242 return 243 } 244 r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(arg5), 0) 245 ret = int(r0) 246 if e1 != 0 { 247 err = errnoErr(e1) 248 } 249 return 250 } 251 252 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 253 254 func keyctlIOV(cmd int, arg2 int, payload []Iovec, arg5 int) (err error) { 255 var _p0 unsafe.Pointer 256 if len(payload) > 0 { 257 _p0 = unsafe.Pointer(&payload[0]) 258 } else { 259 _p0 = unsafe.Pointer(&_zero) 260 } 261 _, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(_p0), uintptr(len(payload)), uintptr(arg5), 0) 262 if e1 != 0 { 263 err = errnoErr(e1) 264 } 265 return 266 } 267 268 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 269 270 func keyctlDH(cmd int, arg2 *KeyctlDHParams, buf []byte) (ret int, err error) { 271 var _p0 unsafe.Pointer 272 if len(buf) > 0 { 273 _p0 = unsafe.Pointer(&buf[0]) 274 } else { 275 _p0 = unsafe.Pointer(&_zero) 276 } 277 r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(unsafe.Pointer(arg2)), uintptr(_p0), uintptr(len(buf)), 0, 0) 278 ret = int(r0) 279 if e1 != 0 { 280 err = errnoErr(e1) 281 } 282 return 283 } 284 285 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 286 287 func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) { 288 _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0) 289 if e1 != 0 { 290 err = errnoErr(e1) 291 } 292 return 293 } 294 295 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 296 297 func reboot(magic1 uint, magic2 uint, cmd int, arg string) (err error) { 298 var _p0 *byte 299 _p0, err = BytePtrFromString(arg) 300 if err != nil { 301 return 302 } 303 _, _, e1 := Syscall6(SYS_REBOOT, uintptr(magic1), uintptr(magic2), uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0, 0) 304 if e1 != 0 { 305 err = errnoErr(e1) 306 } 307 return 308 } 309 310 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 311 312 func mount(source string, target string, fstype string, flags uintptr, data *byte) (err error) { 313 var _p0 *byte 314 _p0, err = BytePtrFromString(source) 315 if err != nil { 316 return 317 } 318 var _p1 *byte 319 _p1, err = BytePtrFromString(target) 320 if err != nil { 321 return 322 } 323 var _p2 *byte 324 _p2, err = BytePtrFromString(fstype) 325 if err != nil { 326 return 327 } 328 _, _, e1 := Syscall6(SYS_MOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(flags), uintptr(unsafe.Pointer(data)), 0) 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 Acct(path string) (err error) { 338 var _p0 *byte 339 _p0, err = BytePtrFromString(path) 340 if err != nil { 341 return 342 } 343 _, _, e1 := Syscall(SYS_ACCT, uintptr(unsafe.Pointer(_p0)), 0, 0) 344 if e1 != 0 { 345 err = errnoErr(e1) 346 } 347 return 348 } 349 350 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 351 352 func AddKey(keyType string, description string, payload []byte, ringid int) (id int, err error) { 353 var _p0 *byte 354 _p0, err = BytePtrFromString(keyType) 355 if err != nil { 356 return 357 } 358 var _p1 *byte 359 _p1, err = BytePtrFromString(description) 360 if err != nil { 361 return 362 } 363 var _p2 unsafe.Pointer 364 if len(payload) > 0 { 365 _p2 = unsafe.Pointer(&payload[0]) 366 } else { 367 _p2 = unsafe.Pointer(&_zero) 368 } 369 r0, _, e1 := Syscall6(SYS_ADD_KEY, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(payload)), uintptr(ringid), 0) 370 id = int(r0) 371 if e1 != 0 { 372 err = errnoErr(e1) 373 } 374 return 375 } 376 377 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 378 379 func Adjtimex(buf *Timex) (state int, err error) { 380 r0, _, e1 := Syscall(SYS_ADJTIMEX, uintptr(unsafe.Pointer(buf)), 0, 0) 381 state = int(r0) 382 if e1 != 0 { 383 err = errnoErr(e1) 384 } 385 return 386 } 387 388 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 389 390 func Chdir(path string) (err error) { 391 var _p0 *byte 392 _p0, err = BytePtrFromString(path) 393 if err != nil { 394 return 395 } 396 _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0) 397 if e1 != 0 { 398 err = errnoErr(e1) 399 } 400 return 401 } 402 403 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 404 405 func Chroot(path string) (err error) { 406 var _p0 *byte 407 _p0, err = BytePtrFromString(path) 408 if err != nil { 409 return 410 } 411 _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0) 412 if e1 != 0 { 413 err = errnoErr(e1) 414 } 415 return 416 } 417 418 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 419 420 func ClockGetres(clockid int32, res *Timespec) (err error) { 421 _, _, e1 := Syscall(SYS_CLOCK_GETRES, uintptr(clockid), uintptr(unsafe.Pointer(res)), 0) 422 if e1 != 0 { 423 err = errnoErr(e1) 424 } 425 return 426 } 427 428 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 429 430 func ClockGettime(clockid int32, time *Timespec) (err error) { 431 _, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0) 432 if e1 != 0 { 433 err = errnoErr(e1) 434 } 435 return 436 } 437 438 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 439 440 func ClockNanosleep(clockid int32, flags int, request *Timespec, remain *Timespec) (err error) { 441 _, _, e1 := Syscall6(SYS_CLOCK_NANOSLEEP, uintptr(clockid), uintptr(flags), uintptr(unsafe.Pointer(request)), uintptr(unsafe.Pointer(remain)), 0, 0) 442 if e1 != 0 { 443 err = errnoErr(e1) 444 } 445 return 446 } 447 448 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 449 450 func Close(fd int) (err error) { 451 _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0) 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 CopyFileRange(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error) { 461 r0, _, e1 := Syscall6(SYS_COPY_FILE_RANGE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags)) 462 n = 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 DeleteModule(name string, flags int) (err error) { 472 var _p0 *byte 473 _p0, err = BytePtrFromString(name) 474 if err != nil { 475 return 476 } 477 _, _, e1 := Syscall(SYS_DELETE_MODULE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) 478 if e1 != 0 { 479 err = errnoErr(e1) 480 } 481 return 482 } 483 484 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 485 486 func Dup(oldfd int) (fd int, err error) { 487 r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 0, 0) 488 fd = int(r0) 489 if e1 != 0 { 490 err = errnoErr(e1) 491 } 492 return 493 } 494 495 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 496 497 func Dup3(oldfd int, newfd int, flags int) (err error) { 498 _, _, e1 := Syscall(SYS_DUP3, uintptr(oldfd), uintptr(newfd), uintptr(flags)) 499 if e1 != 0 { 500 err = errnoErr(e1) 501 } 502 return 503 } 504 505 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 506 507 func EpollCreate1(flag int) (fd int, err error) { 508 r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE1, uintptr(flag), 0, 0) 509 fd = 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 EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) { 519 _, _, e1 := RawSyscall6(SYS_EPOLL_CTL, uintptr(epfd), uintptr(op), uintptr(fd), uintptr(unsafe.Pointer(event)), 0, 0) 520 if e1 != 0 { 521 err = errnoErr(e1) 522 } 523 return 524 } 525 526 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 527 528 func Eventfd(initval uint, flags int) (fd int, err error) { 529 r0, _, e1 := Syscall(SYS_EVENTFD2, uintptr(initval), uintptr(flags), 0) 530 fd = int(r0) 531 if e1 != 0 { 532 err = errnoErr(e1) 533 } 534 return 535 } 536 537 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 538 539 func Exit(code int) { 540 SyscallNoError(SYS_EXIT_GROUP, uintptr(code), 0, 0) 541 return 542 } 543 544 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 545 546 func Fallocate(fd int, mode uint32, off int64, len int64) (err error) { 547 _, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(off>>32), uintptr(len), uintptr(len>>32)) 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 Fchdir(fd int) (err error) { 557 _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 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 Fchmod(fd int, mode uint32) (err error) { 567 _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0) 568 if e1 != 0 { 569 err = errnoErr(e1) 570 } 571 return 572 } 573 574 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 575 576 func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) { 577 var _p0 *byte 578 _p0, err = BytePtrFromString(path) 579 if err != nil { 580 return 581 } 582 _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0) 583 if e1 != 0 { 584 err = errnoErr(e1) 585 } 586 return 587 } 588 589 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 590 591 func fcntl(fd int, cmd int, arg int) (val int, err error) { 592 r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg)) 593 val = int(r0) 594 if e1 != 0 { 595 err = errnoErr(e1) 596 } 597 return 598 } 599 600 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 601 602 func Fdatasync(fd int) (err error) { 603 _, _, e1 := Syscall(SYS_FDATASYNC, uintptr(fd), 0, 0) 604 if e1 != 0 { 605 err = errnoErr(e1) 606 } 607 return 608 } 609 610 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 611 612 func Fgetxattr(fd int, attr string, dest []byte) (sz int, err error) { 613 var _p0 *byte 614 _p0, err = BytePtrFromString(attr) 615 if err != nil { 616 return 617 } 618 var _p1 unsafe.Pointer 619 if len(dest) > 0 { 620 _p1 = unsafe.Pointer(&dest[0]) 621 } else { 622 _p1 = unsafe.Pointer(&_zero) 623 } 624 r0, _, e1 := Syscall6(SYS_FGETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), 0, 0) 625 sz = int(r0) 626 if e1 != 0 { 627 err = errnoErr(e1) 628 } 629 return 630 } 631 632 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 633 634 func FinitModule(fd int, params string, flags int) (err error) { 635 var _p0 *byte 636 _p0, err = BytePtrFromString(params) 637 if err != nil { 638 return 639 } 640 _, _, e1 := Syscall(SYS_FINIT_MODULE, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(flags)) 641 if e1 != 0 { 642 err = errnoErr(e1) 643 } 644 return 645 } 646 647 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 648 649 func Flistxattr(fd int, dest []byte) (sz int, err error) { 650 var _p0 unsafe.Pointer 651 if len(dest) > 0 { 652 _p0 = unsafe.Pointer(&dest[0]) 653 } else { 654 _p0 = unsafe.Pointer(&_zero) 655 } 656 r0, _, e1 := Syscall(SYS_FLISTXATTR, uintptr(fd), uintptr(_p0), uintptr(len(dest))) 657 sz = int(r0) 658 if e1 != 0 { 659 err = errnoErr(e1) 660 } 661 return 662 } 663 664 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 665 666 func Flock(fd int, how int) (err error) { 667 _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0) 668 if e1 != 0 { 669 err = errnoErr(e1) 670 } 671 return 672 } 673 674 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 675 676 func Fremovexattr(fd int, attr string) (err error) { 677 var _p0 *byte 678 _p0, err = BytePtrFromString(attr) 679 if err != nil { 680 return 681 } 682 _, _, e1 := Syscall(SYS_FREMOVEXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), 0) 683 if e1 != 0 { 684 err = errnoErr(e1) 685 } 686 return 687 } 688 689 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 690 691 func Fsetxattr(fd int, attr string, dest []byte, flags int) (err error) { 692 var _p0 *byte 693 _p0, err = BytePtrFromString(attr) 694 if err != nil { 695 return 696 } 697 var _p1 unsafe.Pointer 698 if len(dest) > 0 { 699 _p1 = unsafe.Pointer(&dest[0]) 700 } else { 701 _p1 = unsafe.Pointer(&_zero) 702 } 703 _, _, e1 := Syscall6(SYS_FSETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), uintptr(flags), 0) 704 if e1 != 0 { 705 err = errnoErr(e1) 706 } 707 return 708 } 709 710 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 711 712 func Fsync(fd int) (err error) { 713 _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0) 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 Getdents(fd int, buf []byte) (n int, err error) { 723 var _p0 unsafe.Pointer 724 if len(buf) > 0 { 725 _p0 = unsafe.Pointer(&buf[0]) 726 } else { 727 _p0 = unsafe.Pointer(&_zero) 728 } 729 r0, _, e1 := Syscall(SYS_GETDENTS64, uintptr(fd), uintptr(_p0), uintptr(len(buf))) 730 n = int(r0) 731 if e1 != 0 { 732 err = errnoErr(e1) 733 } 734 return 735 } 736 737 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 738 739 func Getpgid(pid int) (pgid int, err error) { 740 r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0) 741 pgid = int(r0) 742 if e1 != 0 { 743 err = errnoErr(e1) 744 } 745 return 746 } 747 748 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 749 750 func Getpid() (pid int) { 751 r0, _ := RawSyscallNoError(SYS_GETPID, 0, 0, 0) 752 pid = int(r0) 753 return 754 } 755 756 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 757 758 func Getppid() (ppid int) { 759 r0, _ := RawSyscallNoError(SYS_GETPPID, 0, 0, 0) 760 ppid = int(r0) 761 return 762 } 763 764 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 765 766 func Getpriority(which int, who int) (prio int, err error) { 767 r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0) 768 prio = int(r0) 769 if e1 != 0 { 770 err = errnoErr(e1) 771 } 772 return 773 } 774 775 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 776 777 func Getrandom(buf []byte, flags int) (n int, err error) { 778 var _p0 unsafe.Pointer 779 if len(buf) > 0 { 780 _p0 = unsafe.Pointer(&buf[0]) 781 } else { 782 _p0 = unsafe.Pointer(&_zero) 783 } 784 r0, _, e1 := Syscall(SYS_GETRANDOM, uintptr(_p0), uintptr(len(buf)), uintptr(flags)) 785 n = int(r0) 786 if e1 != 0 { 787 err = errnoErr(e1) 788 } 789 return 790 } 791 792 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 793 794 func Getrusage(who int, rusage *Rusage) (err error) { 795 _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0) 796 if e1 != 0 { 797 err = errnoErr(e1) 798 } 799 return 800 } 801 802 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 803 804 func Getsid(pid int) (sid int, err error) { 805 r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0) 806 sid = int(r0) 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 Gettid() (tid int) { 816 r0, _ := RawSyscallNoError(SYS_GETTID, 0, 0, 0) 817 tid = int(r0) 818 return 819 } 820 821 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 822 823 func Getxattr(path string, attr string, dest []byte) (sz int, err error) { 824 var _p0 *byte 825 _p0, err = BytePtrFromString(path) 826 if err != nil { 827 return 828 } 829 var _p1 *byte 830 _p1, err = BytePtrFromString(attr) 831 if err != nil { 832 return 833 } 834 var _p2 unsafe.Pointer 835 if len(dest) > 0 { 836 _p2 = unsafe.Pointer(&dest[0]) 837 } else { 838 _p2 = unsafe.Pointer(&_zero) 839 } 840 r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0) 841 sz = int(r0) 842 if e1 != 0 { 843 err = errnoErr(e1) 844 } 845 return 846 } 847 848 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 849 850 func InitModule(moduleImage []byte, params string) (err error) { 851 var _p0 unsafe.Pointer 852 if len(moduleImage) > 0 { 853 _p0 = unsafe.Pointer(&moduleImage[0]) 854 } else { 855 _p0 = unsafe.Pointer(&_zero) 856 } 857 var _p1 *byte 858 _p1, err = BytePtrFromString(params) 859 if err != nil { 860 return 861 } 862 _, _, e1 := Syscall(SYS_INIT_MODULE, uintptr(_p0), uintptr(len(moduleImage)), uintptr(unsafe.Pointer(_p1))) 863 if e1 != 0 { 864 err = errnoErr(e1) 865 } 866 return 867 } 868 869 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 870 871 func InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) { 872 var _p0 *byte 873 _p0, err = BytePtrFromString(pathname) 874 if err != nil { 875 return 876 } 877 r0, _, e1 := Syscall(SYS_INOTIFY_ADD_WATCH, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mask)) 878 watchdesc = int(r0) 879 if e1 != 0 { 880 err = errnoErr(e1) 881 } 882 return 883 } 884 885 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 886 887 func InotifyInit1(flags int) (fd int, err error) { 888 r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT1, uintptr(flags), 0, 0) 889 fd = int(r0) 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 InotifyRmWatch(fd int, watchdesc uint32) (success int, err error) { 899 r0, _, e1 := RawSyscall(SYS_INOTIFY_RM_WATCH, uintptr(fd), uintptr(watchdesc), 0) 900 success = int(r0) 901 if e1 != 0 { 902 err = errnoErr(e1) 903 } 904 return 905 } 906 907 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 908 909 func Kill(pid int, sig syscall.Signal) (err error) { 910 _, _, e1 := RawSyscall(SYS_KILL, uintptr(pid), uintptr(sig), 0) 911 if e1 != 0 { 912 err = errnoErr(e1) 913 } 914 return 915 } 916 917 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 918 919 func Klogctl(typ int, buf []byte) (n int, err error) { 920 var _p0 unsafe.Pointer 921 if len(buf) > 0 { 922 _p0 = unsafe.Pointer(&buf[0]) 923 } else { 924 _p0 = unsafe.Pointer(&_zero) 925 } 926 r0, _, e1 := Syscall(SYS_SYSLOG, uintptr(typ), uintptr(_p0), uintptr(len(buf))) 927 n = int(r0) 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 Lgetxattr(path string, attr string, dest []byte) (sz int, err error) { 937 var _p0 *byte 938 _p0, err = BytePtrFromString(path) 939 if err != nil { 940 return 941 } 942 var _p1 *byte 943 _p1, err = BytePtrFromString(attr) 944 if err != nil { 945 return 946 } 947 var _p2 unsafe.Pointer 948 if len(dest) > 0 { 949 _p2 = unsafe.Pointer(&dest[0]) 950 } else { 951 _p2 = unsafe.Pointer(&_zero) 952 } 953 r0, _, e1 := Syscall6(SYS_LGETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0) 954 sz = int(r0) 955 if e1 != 0 { 956 err = errnoErr(e1) 957 } 958 return 959 } 960 961 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 962 963 func Listxattr(path string, dest []byte) (sz int, err error) { 964 var _p0 *byte 965 _p0, err = BytePtrFromString(path) 966 if err != nil { 967 return 968 } 969 var _p1 unsafe.Pointer 970 if len(dest) > 0 { 971 _p1 = unsafe.Pointer(&dest[0]) 972 } else { 973 _p1 = unsafe.Pointer(&_zero) 974 } 975 r0, _, e1 := Syscall(SYS_LISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest))) 976 sz = int(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 Llistxattr(path string, dest []byte) (sz int, err error) { 986 var _p0 *byte 987 _p0, err = BytePtrFromString(path) 988 if err != nil { 989 return 990 } 991 var _p1 unsafe.Pointer 992 if len(dest) > 0 { 993 _p1 = unsafe.Pointer(&dest[0]) 994 } else { 995 _p1 = unsafe.Pointer(&_zero) 996 } 997 r0, _, e1 := Syscall(SYS_LLISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest))) 998 sz = int(r0) 999 if e1 != 0 { 1000 err = errnoErr(e1) 1001 } 1002 return 1003 } 1004 1005 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1006 1007 func Lremovexattr(path string, attr string) (err error) { 1008 var _p0 *byte 1009 _p0, err = BytePtrFromString(path) 1010 if err != nil { 1011 return 1012 } 1013 var _p1 *byte 1014 _p1, err = BytePtrFromString(attr) 1015 if err != nil { 1016 return 1017 } 1018 _, _, e1 := Syscall(SYS_LREMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) 1019 if e1 != 0 { 1020 err = errnoErr(e1) 1021 } 1022 return 1023 } 1024 1025 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1026 1027 func Lsetxattr(path string, attr string, data []byte, flags int) (err error) { 1028 var _p0 *byte 1029 _p0, err = BytePtrFromString(path) 1030 if err != nil { 1031 return 1032 } 1033 var _p1 *byte 1034 _p1, err = BytePtrFromString(attr) 1035 if err != nil { 1036 return 1037 } 1038 var _p2 unsafe.Pointer 1039 if len(data) > 0 { 1040 _p2 = unsafe.Pointer(&data[0]) 1041 } else { 1042 _p2 = unsafe.Pointer(&_zero) 1043 } 1044 _, _, e1 := Syscall6(SYS_LSETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0) 1045 if e1 != 0 { 1046 err = errnoErr(e1) 1047 } 1048 return 1049 } 1050 1051 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1052 1053 func MemfdCreate(name string, flags int) (fd int, err error) { 1054 var _p0 *byte 1055 _p0, err = BytePtrFromString(name) 1056 if err != nil { 1057 return 1058 } 1059 r0, _, e1 := Syscall(SYS_MEMFD_CREATE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) 1060 fd = int(r0) 1061 if e1 != 0 { 1062 err = errnoErr(e1) 1063 } 1064 return 1065 } 1066 1067 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1068 1069 func Mkdirat(dirfd int, path string, mode uint32) (err error) { 1070 var _p0 *byte 1071 _p0, err = BytePtrFromString(path) 1072 if err != nil { 1073 return 1074 } 1075 _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) 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 Mknodat(dirfd int, path string, mode uint32, dev int) (err error) { 1085 var _p0 *byte 1086 _p0, err = BytePtrFromString(path) 1087 if err != nil { 1088 return 1089 } 1090 _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0) 1091 if e1 != 0 { 1092 err = errnoErr(e1) 1093 } 1094 return 1095 } 1096 1097 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1098 1099 func Nanosleep(time *Timespec, leftover *Timespec) (err error) { 1100 _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0) 1101 if e1 != 0 { 1102 err = errnoErr(e1) 1103 } 1104 return 1105 } 1106 1107 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1108 1109 func PerfEventOpen(attr *PerfEventAttr, pid int, cpu int, groupFd int, flags int) (fd int, err error) { 1110 r0, _, e1 := Syscall6(SYS_PERF_EVENT_OPEN, uintptr(unsafe.Pointer(attr)), uintptr(pid), uintptr(cpu), uintptr(groupFd), uintptr(flags), 0) 1111 fd = int(r0) 1112 if e1 != 0 { 1113 err = errnoErr(e1) 1114 } 1115 return 1116 } 1117 1118 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1119 1120 func PivotRoot(newroot string, putold string) (err error) { 1121 var _p0 *byte 1122 _p0, err = BytePtrFromString(newroot) 1123 if err != nil { 1124 return 1125 } 1126 var _p1 *byte 1127 _p1, err = BytePtrFromString(putold) 1128 if err != nil { 1129 return 1130 } 1131 _, _, e1 := Syscall(SYS_PIVOT_ROOT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) 1132 if e1 != 0 { 1133 err = errnoErr(e1) 1134 } 1135 return 1136 } 1137 1138 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1139 1140 func prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) { 1141 _, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(newlimit)), uintptr(unsafe.Pointer(old)), 0, 0) 1142 if e1 != 0 { 1143 err = errnoErr(e1) 1144 } 1145 return 1146 } 1147 1148 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1149 1150 func Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error) { 1151 _, _, e1 := Syscall6(SYS_PRCTL, uintptr(option), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0) 1152 if e1 != 0 { 1153 err = errnoErr(e1) 1154 } 1155 return 1156 } 1157 1158 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1159 1160 func Pselect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timespec, sigmask *Sigset_t) (n int, err error) { 1161 r0, _, e1 := Syscall6(SYS_PSELECT6, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask))) 1162 n = int(r0) 1163 if e1 != 0 { 1164 err = errnoErr(e1) 1165 } 1166 return 1167 } 1168 1169 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1170 1171 func read(fd int, p []byte) (n int, err error) { 1172 var _p0 unsafe.Pointer 1173 if len(p) > 0 { 1174 _p0 = unsafe.Pointer(&p[0]) 1175 } else { 1176 _p0 = unsafe.Pointer(&_zero) 1177 } 1178 r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p))) 1179 n = int(r0) 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 Removexattr(path string, attr string) (err error) { 1189 var _p0 *byte 1190 _p0, err = BytePtrFromString(path) 1191 if err != nil { 1192 return 1193 } 1194 var _p1 *byte 1195 _p1, err = BytePtrFromString(attr) 1196 if err != nil { 1197 return 1198 } 1199 _, _, e1 := Syscall(SYS_REMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 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 Renameat2(olddirfd int, oldpath string, newdirfd int, newpath string, flags uint) (err error) { 1209 var _p0 *byte 1210 _p0, err = BytePtrFromString(oldpath) 1211 if err != nil { 1212 return 1213 } 1214 var _p1 *byte 1215 _p1, err = BytePtrFromString(newpath) 1216 if err != nil { 1217 return 1218 } 1219 _, _, e1 := Syscall6(SYS_RENAMEAT2, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 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 RequestKey(keyType string, description string, callback string, destRingid int) (id int, err error) { 1229 var _p0 *byte 1230 _p0, err = BytePtrFromString(keyType) 1231 if err != nil { 1232 return 1233 } 1234 var _p1 *byte 1235 _p1, err = BytePtrFromString(description) 1236 if err != nil { 1237 return 1238 } 1239 var _p2 *byte 1240 _p2, err = BytePtrFromString(callback) 1241 if err != nil { 1242 return 1243 } 1244 r0, _, e1 := Syscall6(SYS_REQUEST_KEY, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(destRingid), 0, 0) 1245 id = int(r0) 1246 if e1 != 0 { 1247 err = errnoErr(e1) 1248 } 1249 return 1250 } 1251 1252 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1253 1254 func Setdomainname(p []byte) (err error) { 1255 var _p0 unsafe.Pointer 1256 if len(p) > 0 { 1257 _p0 = unsafe.Pointer(&p[0]) 1258 } else { 1259 _p0 = unsafe.Pointer(&_zero) 1260 } 1261 _, _, e1 := Syscall(SYS_SETDOMAINNAME, uintptr(_p0), uintptr(len(p)), 0) 1262 if e1 != 0 { 1263 err = errnoErr(e1) 1264 } 1265 return 1266 } 1267 1268 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1269 1270 func Sethostname(p []byte) (err error) { 1271 var _p0 unsafe.Pointer 1272 if len(p) > 0 { 1273 _p0 = unsafe.Pointer(&p[0]) 1274 } else { 1275 _p0 = unsafe.Pointer(&_zero) 1276 } 1277 _, _, e1 := Syscall(SYS_SETHOSTNAME, uintptr(_p0), uintptr(len(p)), 0) 1278 if e1 != 0 { 1279 err = errnoErr(e1) 1280 } 1281 return 1282 } 1283 1284 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1285 1286 func Setpgid(pid int, pgid int) (err error) { 1287 _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0) 1288 if e1 != 0 { 1289 err = errnoErr(e1) 1290 } 1291 return 1292 } 1293 1294 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1295 1296 func Setsid() (pid int, err error) { 1297 r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0) 1298 pid = int(r0) 1299 if e1 != 0 { 1300 err = errnoErr(e1) 1301 } 1302 return 1303 } 1304 1305 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1306 1307 func Settimeofday(tv *Timeval) (err error) { 1308 _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0) 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 Setns(fd int, nstype int) (err error) { 1318 _, _, e1 := Syscall(SYS_SETNS, uintptr(fd), uintptr(nstype), 0) 1319 if e1 != 0 { 1320 err = errnoErr(e1) 1321 } 1322 return 1323 } 1324 1325 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1326 1327 func Setpriority(which int, who int, prio int) (err error) { 1328 _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio)) 1329 if e1 != 0 { 1330 err = errnoErr(e1) 1331 } 1332 return 1333 } 1334 1335 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1336 1337 func Setxattr(path string, attr string, data []byte, flags int) (err error) { 1338 var _p0 *byte 1339 _p0, err = BytePtrFromString(path) 1340 if err != nil { 1341 return 1342 } 1343 var _p1 *byte 1344 _p1, err = BytePtrFromString(attr) 1345 if err != nil { 1346 return 1347 } 1348 var _p2 unsafe.Pointer 1349 if len(data) > 0 { 1350 _p2 = unsafe.Pointer(&data[0]) 1351 } else { 1352 _p2 = unsafe.Pointer(&_zero) 1353 } 1354 _, _, e1 := Syscall6(SYS_SETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0) 1355 if e1 != 0 { 1356 err = errnoErr(e1) 1357 } 1358 return 1359 } 1360 1361 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1362 1363 func Signalfd(fd int, mask *Sigset_t, flags int) { 1364 SyscallNoError(SYS_SIGNALFD4, uintptr(fd), uintptr(unsafe.Pointer(mask)), uintptr(flags)) 1365 return 1366 } 1367 1368 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1369 1370 func Statx(dirfd int, path string, flags int, mask int, stat *Statx_t) (err error) { 1371 var _p0 *byte 1372 _p0, err = BytePtrFromString(path) 1373 if err != nil { 1374 return 1375 } 1376 _, _, e1 := Syscall6(SYS_STATX, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mask), uintptr(unsafe.Pointer(stat)), 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 Sync() { 1386 SyscallNoError(SYS_SYNC, 0, 0, 0) 1387 return 1388 } 1389 1390 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1391 1392 func Syncfs(fd int) (err error) { 1393 _, _, e1 := Syscall(SYS_SYNCFS, uintptr(fd), 0, 0) 1394 if e1 != 0 { 1395 err = errnoErr(e1) 1396 } 1397 return 1398 } 1399 1400 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1401 1402 func Sysinfo(info *Sysinfo_t) (err error) { 1403 _, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0) 1404 if e1 != 0 { 1405 err = errnoErr(e1) 1406 } 1407 return 1408 } 1409 1410 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1411 1412 func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) { 1413 r0, r1, e1 := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0) 1414 n = int64(int64(r1)<<32 | int64(r0)) 1415 if e1 != 0 { 1416 err = errnoErr(e1) 1417 } 1418 return 1419 } 1420 1421 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1422 1423 func Tgkill(tgid int, tid int, sig syscall.Signal) (err error) { 1424 _, _, e1 := RawSyscall(SYS_TGKILL, uintptr(tgid), uintptr(tid), uintptr(sig)) 1425 if e1 != 0 { 1426 err = errnoErr(e1) 1427 } 1428 return 1429 } 1430 1431 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1432 1433 func Times(tms *Tms) (ticks uintptr, err error) { 1434 r0, _, e1 := RawSyscall(SYS_TIMES, uintptr(unsafe.Pointer(tms)), 0, 0) 1435 ticks = uintptr(r0) 1436 if e1 != 0 { 1437 err = errnoErr(e1) 1438 } 1439 return 1440 } 1441 1442 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1443 1444 func Umask(mask int) (oldmask int) { 1445 r0, _ := RawSyscallNoError(SYS_UMASK, uintptr(mask), 0, 0) 1446 oldmask = int(r0) 1447 return 1448 } 1449 1450 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1451 1452 func Uname(buf *Utsname) (err error) { 1453 _, _, e1 := RawSyscall(SYS_UNAME, uintptr(unsafe.Pointer(buf)), 0, 0) 1454 if e1 != 0 { 1455 err = errnoErr(e1) 1456 } 1457 return 1458 } 1459 1460 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1461 1462 func Unmount(target string, flags int) (err error) { 1463 var _p0 *byte 1464 _p0, err = BytePtrFromString(target) 1465 if err != nil { 1466 return 1467 } 1468 _, _, e1 := Syscall(SYS_UMOUNT2, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) 1469 if e1 != 0 { 1470 err = errnoErr(e1) 1471 } 1472 return 1473 } 1474 1475 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1476 1477 func Unshare(flags int) (err error) { 1478 _, _, e1 := Syscall(SYS_UNSHARE, uintptr(flags), 0, 0) 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 write(fd int, p []byte) (n int, err error) { 1488 var _p0 unsafe.Pointer 1489 if len(p) > 0 { 1490 _p0 = unsafe.Pointer(&p[0]) 1491 } else { 1492 _p0 = unsafe.Pointer(&_zero) 1493 } 1494 r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p))) 1495 n = int(r0) 1496 if e1 != 0 { 1497 err = errnoErr(e1) 1498 } 1499 return 1500 } 1501 1502 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1503 1504 func exitThread(code int) (err error) { 1505 _, _, e1 := Syscall(SYS_EXIT, uintptr(code), 0, 0) 1506 if e1 != 0 { 1507 err = errnoErr(e1) 1508 } 1509 return 1510 } 1511 1512 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1513 1514 func readlen(fd int, p *byte, np int) (n int, err error) { 1515 r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np)) 1516 n = int(r0) 1517 if e1 != 0 { 1518 err = errnoErr(e1) 1519 } 1520 return 1521 } 1522 1523 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1524 1525 func writelen(fd int, p *byte, np int) (n int, err error) { 1526 r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np)) 1527 n = int(r0) 1528 if e1 != 0 { 1529 err = errnoErr(e1) 1530 } 1531 return 1532 } 1533 1534 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1535 1536 func munmap(addr uintptr, length uintptr) (err error) { 1537 _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0) 1538 if e1 != 0 { 1539 err = errnoErr(e1) 1540 } 1541 return 1542 } 1543 1544 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1545 1546 func Madvise(b []byte, advice int) (err error) { 1547 var _p0 unsafe.Pointer 1548 if len(b) > 0 { 1549 _p0 = unsafe.Pointer(&b[0]) 1550 } else { 1551 _p0 = unsafe.Pointer(&_zero) 1552 } 1553 _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(advice)) 1554 if e1 != 0 { 1555 err = errnoErr(e1) 1556 } 1557 return 1558 } 1559 1560 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1561 1562 func Mprotect(b []byte, prot int) (err error) { 1563 var _p0 unsafe.Pointer 1564 if len(b) > 0 { 1565 _p0 = unsafe.Pointer(&b[0]) 1566 } else { 1567 _p0 = unsafe.Pointer(&_zero) 1568 } 1569 _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot)) 1570 if e1 != 0 { 1571 err = errnoErr(e1) 1572 } 1573 return 1574 } 1575 1576 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1577 1578 func Mlock(b []byte) (err error) { 1579 var _p0 unsafe.Pointer 1580 if len(b) > 0 { 1581 _p0 = unsafe.Pointer(&b[0]) 1582 } else { 1583 _p0 = unsafe.Pointer(&_zero) 1584 } 1585 _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0) 1586 if e1 != 0 { 1587 err = errnoErr(e1) 1588 } 1589 return 1590 } 1591 1592 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1593 1594 func Mlockall(flags int) (err error) { 1595 _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0) 1596 if e1 != 0 { 1597 err = errnoErr(e1) 1598 } 1599 return 1600 } 1601 1602 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1603 1604 func Msync(b []byte, flags int) (err error) { 1605 var _p0 unsafe.Pointer 1606 if len(b) > 0 { 1607 _p0 = unsafe.Pointer(&b[0]) 1608 } else { 1609 _p0 = unsafe.Pointer(&_zero) 1610 } 1611 _, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags)) 1612 if e1 != 0 { 1613 err = errnoErr(e1) 1614 } 1615 return 1616 } 1617 1618 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1619 1620 func Munlock(b []byte) (err error) { 1621 var _p0 unsafe.Pointer 1622 if len(b) > 0 { 1623 _p0 = unsafe.Pointer(&b[0]) 1624 } else { 1625 _p0 = unsafe.Pointer(&_zero) 1626 } 1627 _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) 1628 if e1 != 0 { 1629 err = errnoErr(e1) 1630 } 1631 return 1632 } 1633 1634 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1635 1636 func Munlockall() (err error) { 1637 _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0) 1638 if e1 != 0 { 1639 err = errnoErr(e1) 1640 } 1641 return 1642 } 1643 1644 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1645 1646 func faccessat(dirfd int, path string, mode uint32) (err error) { 1647 var _p0 *byte 1648 _p0, err = BytePtrFromString(path) 1649 if err != nil { 1650 return 1651 } 1652 _, _, e1 := Syscall(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) 1653 if e1 != 0 { 1654 err = errnoErr(e1) 1655 } 1656 return 1657 } 1658 1659 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1660 1661 func pipe2(p *[2]_C_int, flags int) (err error) { 1662 _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0) 1663 if e1 != 0 { 1664 err = errnoErr(e1) 1665 } 1666 return 1667 } 1668 1669 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1670 1671 func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) { 1672 r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) 1673 fd = int(r0) 1674 if e1 != 0 { 1675 err = errnoErr(e1) 1676 } 1677 return 1678 } 1679 1680 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1681 1682 func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) { 1683 r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0) 1684 fd = int(r0) 1685 if e1 != 0 { 1686 err = errnoErr(e1) 1687 } 1688 return 1689 } 1690 1691 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1692 1693 func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { 1694 _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen)) 1695 if e1 != 0 { 1696 err = errnoErr(e1) 1697 } 1698 return 1699 } 1700 1701 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1702 1703 func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { 1704 _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen)) 1705 if e1 != 0 { 1706 err = errnoErr(e1) 1707 } 1708 return 1709 } 1710 1711 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1712 1713 func getgroups(n int, list *_Gid_t) (nn int, err error) { 1714 r0, _, e1 := RawSyscall(SYS_GETGROUPS32, uintptr(n), uintptr(unsafe.Pointer(list)), 0) 1715 nn = int(r0) 1716 if e1 != 0 { 1717 err = errnoErr(e1) 1718 } 1719 return 1720 } 1721 1722 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1723 1724 func setgroups(n int, list *_Gid_t) (err error) { 1725 _, _, e1 := RawSyscall(SYS_SETGROUPS32, uintptr(n), uintptr(unsafe.Pointer(list)), 0) 1726 if e1 != 0 { 1727 err = errnoErr(e1) 1728 } 1729 return 1730 } 1731 1732 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1733 1734 func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) { 1735 _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0) 1736 if e1 != 0 { 1737 err = errnoErr(e1) 1738 } 1739 return 1740 } 1741 1742 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1743 1744 func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) { 1745 _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0) 1746 if e1 != 0 { 1747 err = errnoErr(e1) 1748 } 1749 return 1750 } 1751 1752 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1753 1754 func socket(domain int, typ int, proto int) (fd int, err error) { 1755 r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto)) 1756 fd = int(r0) 1757 if e1 != 0 { 1758 err = errnoErr(e1) 1759 } 1760 return 1761 } 1762 1763 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1764 1765 func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { 1766 _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) 1767 if e1 != 0 { 1768 err = errnoErr(e1) 1769 } 1770 return 1771 } 1772 1773 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1774 1775 func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { 1776 _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) 1777 if e1 != 0 { 1778 err = errnoErr(e1) 1779 } 1780 return 1781 } 1782 1783 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1784 1785 func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) { 1786 var _p0 unsafe.Pointer 1787 if len(p) > 0 { 1788 _p0 = unsafe.Pointer(&p[0]) 1789 } else { 1790 _p0 = unsafe.Pointer(&_zero) 1791 } 1792 r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen))) 1793 n = int(r0) 1794 if e1 != 0 { 1795 err = errnoErr(e1) 1796 } 1797 return 1798 } 1799 1800 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1801 1802 func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) { 1803 var _p0 unsafe.Pointer 1804 if len(buf) > 0 { 1805 _p0 = unsafe.Pointer(&buf[0]) 1806 } else { 1807 _p0 = unsafe.Pointer(&_zero) 1808 } 1809 _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen)) 1810 if e1 != 0 { 1811 err = errnoErr(e1) 1812 } 1813 return 1814 } 1815 1816 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1817 1818 func socketpair(domain int, typ int, flags int, fd *[2]int32) (err error) { 1819 _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(flags), uintptr(unsafe.Pointer(fd)), 0, 0) 1820 if e1 != 0 { 1821 err = errnoErr(e1) 1822 } 1823 return 1824 } 1825 1826 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1827 1828 func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) { 1829 r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) 1830 n = int(r0) 1831 if e1 != 0 { 1832 err = errnoErr(e1) 1833 } 1834 return 1835 } 1836 1837 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1838 1839 func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) { 1840 r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) 1841 n = int(r0) 1842 if e1 != 0 { 1843 err = errnoErr(e1) 1844 } 1845 return 1846 } 1847 1848 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1849 1850 func Dup2(oldfd int, newfd int) (err error) { 1851 _, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0) 1852 if e1 != 0 { 1853 err = errnoErr(e1) 1854 } 1855 return 1856 } 1857 1858 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1859 1860 func EpollCreate(size int) (fd int, err error) { 1861 r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0) 1862 fd = int(r0) 1863 if e1 != 0 { 1864 err = errnoErr(e1) 1865 } 1866 return 1867 } 1868 1869 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1870 1871 func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) { 1872 var _p0 unsafe.Pointer 1873 if len(events) > 0 { 1874 _p0 = unsafe.Pointer(&events[0]) 1875 } else { 1876 _p0 = unsafe.Pointer(&_zero) 1877 } 1878 r0, _, e1 := Syscall6(SYS_EPOLL_WAIT, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec), 0, 0) 1879 n = int(r0) 1880 if e1 != 0 { 1881 err = errnoErr(e1) 1882 } 1883 return 1884 } 1885 1886 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1887 1888 func Fchown(fd int, uid int, gid int) (err error) { 1889 _, _, e1 := Syscall(SYS_FCHOWN32, uintptr(fd), uintptr(uid), uintptr(gid)) 1890 if e1 != 0 { 1891 err = errnoErr(e1) 1892 } 1893 return 1894 } 1895 1896 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1897 1898 func Fstat(fd int, stat *Stat_t) (err error) { 1899 _, _, e1 := Syscall(SYS_FSTAT64, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0) 1900 if e1 != 0 { 1901 err = errnoErr(e1) 1902 } 1903 return 1904 } 1905 1906 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1907 1908 func Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) { 1909 var _p0 *byte 1910 _p0, err = BytePtrFromString(path) 1911 if err != nil { 1912 return 1913 } 1914 _, _, e1 := Syscall6(SYS_FSTATAT64, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0) 1915 if e1 != 0 { 1916 err = errnoErr(e1) 1917 } 1918 return 1919 } 1920 1921 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1922 1923 func Getegid() (egid int) { 1924 r0, _ := RawSyscallNoError(SYS_GETEGID32, 0, 0, 0) 1925 egid = int(r0) 1926 return 1927 } 1928 1929 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1930 1931 func Geteuid() (euid int) { 1932 r0, _ := RawSyscallNoError(SYS_GETEUID32, 0, 0, 0) 1933 euid = int(r0) 1934 return 1935 } 1936 1937 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1938 1939 func Getgid() (gid int) { 1940 r0, _ := RawSyscallNoError(SYS_GETGID32, 0, 0, 0) 1941 gid = int(r0) 1942 return 1943 } 1944 1945 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1946 1947 func Getuid() (uid int) { 1948 r0, _ := RawSyscallNoError(SYS_GETUID32, 0, 0, 0) 1949 uid = int(r0) 1950 return 1951 } 1952 1953 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1954 1955 func InotifyInit() (fd int, err error) { 1956 r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT, 0, 0, 0) 1957 fd = int(r0) 1958 if e1 != 0 { 1959 err = errnoErr(e1) 1960 } 1961 return 1962 } 1963 1964 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1965 1966 func Lchown(path string, uid int, gid int) (err error) { 1967 var _p0 *byte 1968 _p0, err = BytePtrFromString(path) 1969 if err != nil { 1970 return 1971 } 1972 _, _, e1 := Syscall(SYS_LCHOWN32, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) 1973 if e1 != 0 { 1974 err = errnoErr(e1) 1975 } 1976 return 1977 } 1978 1979 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1980 1981 func Listen(s int, n int) (err error) { 1982 _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(n), 0) 1983 if e1 != 0 { 1984 err = errnoErr(e1) 1985 } 1986 return 1987 } 1988 1989 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1990 1991 func Lstat(path string, stat *Stat_t) (err error) { 1992 var _p0 *byte 1993 _p0, err = BytePtrFromString(path) 1994 if err != nil { 1995 return 1996 } 1997 _, _, e1 := Syscall(SYS_LSTAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) 1998 if e1 != 0 { 1999 err = errnoErr(e1) 2000 } 2001 return 2002 } 2003 2004 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 2005 2006 func Pause() (err error) { 2007 _, _, e1 := Syscall(SYS_PAUSE, 0, 0, 0) 2008 if e1 != 0 { 2009 err = errnoErr(e1) 2010 } 2011 return 2012 } 2013 2014 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 2015 2016 func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) { 2017 var _p0 *byte 2018 _p0, err = BytePtrFromString(oldpath) 2019 if err != nil { 2020 return 2021 } 2022 var _p1 *byte 2023 _p1, err = BytePtrFromString(newpath) 2024 if err != nil { 2025 return 2026 } 2027 _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0) 2028 if e1 != 0 { 2029 err = errnoErr(e1) 2030 } 2031 return 2032 } 2033 2034 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 2035 2036 func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) { 2037 r0, _, e1 := Syscall6(SYS_SENDFILE64, uintptr(outfd), uintptr(infd), uintptr(unsafe.Pointer(offset)), uintptr(count), 0, 0) 2038 written = int(r0) 2039 if e1 != 0 { 2040 err = errnoErr(e1) 2041 } 2042 return 2043 } 2044 2045 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 2046 2047 func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) { 2048 r0, _, e1 := Syscall6(SYS__NEWSELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0) 2049 n = int(r0) 2050 if e1 != 0 { 2051 err = errnoErr(e1) 2052 } 2053 return 2054 } 2055 2056 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 2057 2058 func Setfsgid(gid int) (err error) { 2059 _, _, e1 := Syscall(SYS_SETFSGID32, uintptr(gid), 0, 0) 2060 if e1 != 0 { 2061 err = errnoErr(e1) 2062 } 2063 return 2064 } 2065 2066 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 2067 2068 func Setfsuid(uid int) (err error) { 2069 _, _, e1 := Syscall(SYS_SETFSUID32, uintptr(uid), 0, 0) 2070 if e1 != 0 { 2071 err = errnoErr(e1) 2072 } 2073 return 2074 } 2075 2076 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 2077 2078 func Setregid(rgid int, egid int) (err error) { 2079 _, _, e1 := RawSyscall(SYS_SETREGID32, uintptr(rgid), uintptr(egid), 0) 2080 if e1 != 0 { 2081 err = errnoErr(e1) 2082 } 2083 return 2084 } 2085 2086 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 2087 2088 func Setresgid(rgid int, egid int, sgid int) (err error) { 2089 _, _, e1 := RawSyscall(SYS_SETRESGID32, uintptr(rgid), uintptr(egid), uintptr(sgid)) 2090 if e1 != 0 { 2091 err = errnoErr(e1) 2092 } 2093 return 2094 } 2095 2096 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 2097 2098 func Setresuid(ruid int, euid int, suid int) (err error) { 2099 _, _, e1 := RawSyscall(SYS_SETRESUID32, uintptr(ruid), uintptr(euid), uintptr(suid)) 2100 if e1 != 0 { 2101 err = errnoErr(e1) 2102 } 2103 return 2104 } 2105 2106 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 2107 2108 func Setreuid(ruid int, euid int) (err error) { 2109 _, _, e1 := RawSyscall(SYS_SETREUID32, uintptr(ruid), uintptr(euid), 0) 2110 if e1 != 0 { 2111 err = errnoErr(e1) 2112 } 2113 return 2114 } 2115 2116 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 2117 2118 func Shutdown(fd int, how int) (err error) { 2119 _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0) 2120 if e1 != 0 { 2121 err = errnoErr(e1) 2122 } 2123 return 2124 } 2125 2126 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 2127 2128 func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error) { 2129 r0, _, e1 := Syscall6(SYS_SPLICE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags)) 2130 n = int(r0) 2131 if e1 != 0 { 2132 err = errnoErr(e1) 2133 } 2134 return 2135 } 2136 2137 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 2138 2139 func Stat(path string, stat *Stat_t) (err error) { 2140 var _p0 *byte 2141 _p0, err = BytePtrFromString(path) 2142 if err != nil { 2143 return 2144 } 2145 _, _, e1 := Syscall(SYS_STAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) 2146 if e1 != 0 { 2147 err = errnoErr(e1) 2148 } 2149 return 2150 } 2151 2152 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 2153 2154 func Ustat(dev int, ubuf *Ustat_t) (err error) { 2155 _, _, e1 := Syscall(SYS_USTAT, uintptr(dev), uintptr(unsafe.Pointer(ubuf)), 0) 2156 if e1 != 0 { 2157 err = errnoErr(e1) 2158 } 2159 return 2160 } 2161 2162 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 2163 2164 func futimesat(dirfd int, path string, times *[2]Timeval) (err error) { 2165 var _p0 *byte 2166 _p0, err = BytePtrFromString(path) 2167 if err != nil { 2168 return 2169 } 2170 _, _, e1 := Syscall(SYS_FUTIMESAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times))) 2171 if e1 != 0 { 2172 err = errnoErr(e1) 2173 } 2174 return 2175 } 2176 2177 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 2178 2179 func Gettimeofday(tv *Timeval) (err error) { 2180 _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0) 2181 if e1 != 0 { 2182 err = errnoErr(e1) 2183 } 2184 return 2185 } 2186 2187 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 2188 2189 func utimes(path string, times *[2]Timeval) (err error) { 2190 var _p0 *byte 2191 _p0, err = BytePtrFromString(path) 2192 if err != nil { 2193 return 2194 } 2195 _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), 0) 2196 if e1 != 0 { 2197 err = errnoErr(e1) 2198 } 2199 return 2200 } 2201 2202 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 2203 2204 func Pread(fd int, p []byte, offset int64) (n int, err error) { 2205 var _p0 unsafe.Pointer 2206 if len(p) > 0 { 2207 _p0 = unsafe.Pointer(&p[0]) 2208 } else { 2209 _p0 = unsafe.Pointer(&_zero) 2210 } 2211 r0, _, e1 := Syscall6(SYS_PREAD64, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), uintptr(offset>>32)) 2212 n = int(r0) 2213 if e1 != 0 { 2214 err = errnoErr(e1) 2215 } 2216 return 2217 } 2218 2219 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 2220 2221 func Pwrite(fd int, p []byte, offset int64) (n int, err error) { 2222 var _p0 unsafe.Pointer 2223 if len(p) > 0 { 2224 _p0 = unsafe.Pointer(&p[0]) 2225 } else { 2226 _p0 = unsafe.Pointer(&_zero) 2227 } 2228 r0, _, e1 := Syscall6(SYS_PWRITE64, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), uintptr(offset>>32)) 2229 n = int(r0) 2230 if e1 != 0 { 2231 err = errnoErr(e1) 2232 } 2233 return 2234 } 2235 2236 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 2237 2238 func Truncate(path string, length int64) (err error) { 2239 var _p0 *byte 2240 _p0, err = BytePtrFromString(path) 2241 if err != nil { 2242 return 2243 } 2244 _, _, e1 := Syscall6(SYS_TRUNCATE64, uintptr(unsafe.Pointer(_p0)), 0, uintptr(length), uintptr(length>>32), 0, 0) 2245 if e1 != 0 { 2246 err = errnoErr(e1) 2247 } 2248 return 2249 } 2250 2251 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 2252 2253 func Ftruncate(fd int, length int64) (err error) { 2254 _, _, e1 := Syscall6(SYS_FTRUNCATE64, uintptr(fd), 0, uintptr(length), uintptr(length>>32), 0, 0) 2255 if e1 != 0 { 2256 err = errnoErr(e1) 2257 } 2258 return 2259 } 2260 2261 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 2262 2263 func mmap2(addr uintptr, length uintptr, prot int, flags int, fd int, pageOffset uintptr) (xaddr uintptr, err error) { 2264 r0, _, e1 := Syscall6(SYS_MMAP2, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(pageOffset)) 2265 xaddr = uintptr(r0) 2266 if e1 != 0 { 2267 err = errnoErr(e1) 2268 } 2269 return 2270 } 2271 2272 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 2273 2274 func getrlimit(resource int, rlim *rlimit32) (err error) { 2275 _, _, e1 := RawSyscall(SYS_UGETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0) 2276 if e1 != 0 { 2277 err = errnoErr(e1) 2278 } 2279 return 2280 } 2281 2282 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 2283 2284 func setrlimit(resource int, rlim *rlimit32) (err error) { 2285 _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0) 2286 if e1 != 0 { 2287 err = errnoErr(e1) 2288 } 2289 return 2290 } 2291 2292 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 2293 2294 func poll(fds *PollFd, nfds int, timeout int) (n int, err error) { 2295 r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout)) 2296 n = int(r0) 2297 if e1 != 0 { 2298 err = errnoErr(e1) 2299 } 2300 return 2301 } 2302 2303 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 2304 2305 func armSyncFileRange(fd int, flags int, off int64, n int64) (err error) { 2306 _, _, e1 := Syscall6(SYS_ARM_SYNC_FILE_RANGE, uintptr(fd), uintptr(flags), uintptr(off), uintptr(off>>32), uintptr(n), uintptr(n>>32)) 2307 if e1 != 0 { 2308 err = errnoErr(e1) 2309 } 2310 return 2311 }