github.com/likebike/go--@v0.0.0-20190911215757-0bd925d16e96/go/src/syscall/zsyscall_freebsd_arm.go (about) 1 // mksyscall.pl -l32 -arm -tags freebsd,arm syscall_bsd.go syscall_freebsd.go syscall_freebsd_arm.go 2 // MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT 3 4 // +build freebsd,arm 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 getgroups(ngid int, gid *_Gid_t) (n int, err error) { 13 r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0) 14 n = int(r0) 15 if e1 != 0 { 16 err = errnoErr(e1) 17 } 18 return 19 } 20 21 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 22 23 func setgroups(ngid int, gid *_Gid_t) (err error) { 24 _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0) 25 if e1 != 0 { 26 err = errnoErr(e1) 27 } 28 return 29 } 30 31 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 32 33 func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) { 34 r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0) 35 wpid = int(r0) 36 if e1 != 0 { 37 err = errnoErr(e1) 38 } 39 return 40 } 41 42 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 43 44 func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) { 45 r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) 46 fd = int(r0) 47 if e1 != 0 { 48 err = errnoErr(e1) 49 } 50 return 51 } 52 53 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 54 55 func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { 56 _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen)) 57 if e1 != 0 { 58 err = errnoErr(e1) 59 } 60 return 61 } 62 63 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 64 65 func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { 66 _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen)) 67 if e1 != 0 { 68 err = errnoErr(e1) 69 } 70 return 71 } 72 73 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 74 75 func socket(domain int, typ int, proto int) (fd int, err error) { 76 r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto)) 77 fd = int(r0) 78 if e1 != 0 { 79 err = errnoErr(e1) 80 } 81 return 82 } 83 84 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 85 86 func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) { 87 _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0) 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 setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) { 97 _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0) 98 if e1 != 0 { 99 err = errnoErr(e1) 100 } 101 return 102 } 103 104 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 105 106 func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { 107 _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) 108 if e1 != 0 { 109 err = errnoErr(e1) 110 } 111 return 112 } 113 114 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 115 116 func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { 117 _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) 118 if e1 != 0 { 119 err = errnoErr(e1) 120 } 121 return 122 } 123 124 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 125 126 func Shutdown(s int, how int) (err error) { 127 _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(s), uintptr(how), 0) 128 if e1 != 0 { 129 err = errnoErr(e1) 130 } 131 return 132 } 133 134 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 135 136 func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) { 137 _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0) 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 recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) { 147 var _p0 unsafe.Pointer 148 if len(p) > 0 { 149 _p0 = unsafe.Pointer(&p[0]) 150 } else { 151 _p0 = unsafe.Pointer(&_zero) 152 } 153 r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen))) 154 n = int(r0) 155 if e1 != 0 { 156 err = errnoErr(e1) 157 } 158 return 159 } 160 161 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 162 163 func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) { 164 var _p0 unsafe.Pointer 165 if len(buf) > 0 { 166 _p0 = unsafe.Pointer(&buf[0]) 167 } else { 168 _p0 = unsafe.Pointer(&_zero) 169 } 170 _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen)) 171 if e1 != 0 { 172 err = errnoErr(e1) 173 } 174 return 175 } 176 177 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 178 179 func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) { 180 r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) 181 n = int(r0) 182 if e1 != 0 { 183 err = errnoErr(e1) 184 } 185 return 186 } 187 188 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 189 190 func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) { 191 r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) 192 n = int(r0) 193 if e1 != 0 { 194 err = errnoErr(e1) 195 } 196 return 197 } 198 199 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 200 201 func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error) { 202 r0, _, e1 := Syscall6(SYS_KEVENT, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout))) 203 n = int(r0) 204 if e1 != 0 { 205 err = errnoErr(e1) 206 } 207 return 208 } 209 210 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 211 212 func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) { 213 var _p0 unsafe.Pointer 214 if len(mib) > 0 { 215 _p0 = unsafe.Pointer(&mib[0]) 216 } else { 217 _p0 = unsafe.Pointer(&_zero) 218 } 219 _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen)) 220 if e1 != 0 { 221 err = errnoErr(e1) 222 } 223 return 224 } 225 226 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 227 228 func utimes(path string, timeval *[2]Timeval) (err error) { 229 var _p0 *byte 230 _p0, err = BytePtrFromString(path) 231 if err != nil { 232 return 233 } 234 _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0) 235 if e1 != 0 { 236 err = errnoErr(e1) 237 } 238 return 239 } 240 241 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 242 243 func futimes(fd int, timeval *[2]Timeval) (err error) { 244 _, _, e1 := Syscall(SYS_FUTIMES, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0) 245 if e1 != 0 { 246 err = errnoErr(e1) 247 } 248 return 249 } 250 251 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 252 253 func fcntl(fd int, cmd int, arg int) (val int, err error) { 254 r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg)) 255 val = int(r0) 256 if e1 != 0 { 257 err = errnoErr(e1) 258 } 259 return 260 } 261 262 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 263 264 func pipe2(p *[2]_C_int, flags int) (err error) { 265 _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0) 266 if e1 != 0 { 267 err = errnoErr(e1) 268 } 269 return 270 } 271 272 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 273 274 func Access(path string, mode uint32) (err error) { 275 var _p0 *byte 276 _p0, err = BytePtrFromString(path) 277 if err != nil { 278 return 279 } 280 _, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) 281 if e1 != 0 { 282 err = errnoErr(e1) 283 } 284 return 285 } 286 287 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 288 289 func Adjtime(delta *Timeval, olddelta *Timeval) (err error) { 290 _, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0) 291 if e1 != 0 { 292 err = errnoErr(e1) 293 } 294 return 295 } 296 297 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 298 299 func Chdir(path string) (err error) { 300 var _p0 *byte 301 _p0, err = BytePtrFromString(path) 302 if err != nil { 303 return 304 } 305 _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0) 306 if e1 != 0 { 307 err = errnoErr(e1) 308 } 309 return 310 } 311 312 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 313 314 func Chflags(path string, flags int) (err error) { 315 var _p0 *byte 316 _p0, err = BytePtrFromString(path) 317 if err != nil { 318 return 319 } 320 _, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) 321 if e1 != 0 { 322 err = errnoErr(e1) 323 } 324 return 325 } 326 327 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 328 329 func Chmod(path string, mode uint32) (err error) { 330 var _p0 *byte 331 _p0, err = BytePtrFromString(path) 332 if err != nil { 333 return 334 } 335 _, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) 336 if e1 != 0 { 337 err = errnoErr(e1) 338 } 339 return 340 } 341 342 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 343 344 func Chown(path string, uid int, gid int) (err error) { 345 var _p0 *byte 346 _p0, err = BytePtrFromString(path) 347 if err != nil { 348 return 349 } 350 _, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) 351 if e1 != 0 { 352 err = errnoErr(e1) 353 } 354 return 355 } 356 357 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 358 359 func Chroot(path string) (err error) { 360 var _p0 *byte 361 _p0, err = BytePtrFromString(path) 362 if err != nil { 363 return 364 } 365 _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0) 366 if e1 != 0 { 367 err = errnoErr(e1) 368 } 369 return 370 } 371 372 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 373 374 func Close(fd int) (err error) { 375 _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0) 376 if e1 != 0 { 377 err = errnoErr(e1) 378 } 379 return 380 } 381 382 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 383 384 func Dup(fd int) (nfd int, err error) { 385 r0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0) 386 nfd = int(r0) 387 if e1 != 0 { 388 err = errnoErr(e1) 389 } 390 return 391 } 392 393 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 394 395 func Dup2(from int, to int) (err error) { 396 _, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 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 Fchdir(fd int) (err error) { 406 _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0) 407 if e1 != 0 { 408 err = errnoErr(e1) 409 } 410 return 411 } 412 413 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 414 415 func Fchflags(fd int, flags int) (err error) { 416 _, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0) 417 if e1 != 0 { 418 err = errnoErr(e1) 419 } 420 return 421 } 422 423 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 424 425 func Fchmod(fd int, mode uint32) (err error) { 426 _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0) 427 if e1 != 0 { 428 err = errnoErr(e1) 429 } 430 return 431 } 432 433 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 434 435 func Fchown(fd int, uid int, gid int) (err error) { 436 _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid)) 437 if e1 != 0 { 438 err = errnoErr(e1) 439 } 440 return 441 } 442 443 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 444 445 func Flock(fd int, how int) (err error) { 446 _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0) 447 if e1 != 0 { 448 err = errnoErr(e1) 449 } 450 return 451 } 452 453 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 454 455 func Fpathconf(fd int, name int) (val int, err error) { 456 r0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0) 457 val = int(r0) 458 if e1 != 0 { 459 err = errnoErr(e1) 460 } 461 return 462 } 463 464 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 465 466 func Fstat(fd int, stat *Stat_t) (err error) { 467 _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0) 468 if e1 != 0 { 469 err = errnoErr(e1) 470 } 471 return 472 } 473 474 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 475 476 func Fstatfs(fd int, stat *Statfs_t) (err error) { 477 _, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(stat)), 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 Fsync(fd int) (err error) { 487 _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0) 488 if e1 != 0 { 489 err = errnoErr(e1) 490 } 491 return 492 } 493 494 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 495 496 func Ftruncate(fd int, length int64) (err error) { 497 _, _, e1 := Syscall6(SYS_FTRUNCATE, uintptr(fd), 0, uintptr(length), uintptr(length>>32), 0, 0) 498 if e1 != 0 { 499 err = errnoErr(e1) 500 } 501 return 502 } 503 504 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 505 506 func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) { 507 var _p0 unsafe.Pointer 508 if len(buf) > 0 { 509 _p0 = unsafe.Pointer(&buf[0]) 510 } else { 511 _p0 = unsafe.Pointer(&_zero) 512 } 513 r0, _, e1 := Syscall6(SYS_GETDIRENTRIES, uintptr(fd), uintptr(_p0), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0) 514 n = int(r0) 515 if e1 != 0 { 516 err = errnoErr(e1) 517 } 518 return 519 } 520 521 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 522 523 func Getdtablesize() (size int) { 524 r0, _, _ := Syscall(SYS_GETDTABLESIZE, 0, 0, 0) 525 size = int(r0) 526 return 527 } 528 529 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 530 531 func Getegid() (egid int) { 532 r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0) 533 egid = int(r0) 534 return 535 } 536 537 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 538 539 func Geteuid() (uid int) { 540 r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0) 541 uid = int(r0) 542 return 543 } 544 545 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 546 547 func Getgid() (gid int) { 548 r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0) 549 gid = int(r0) 550 return 551 } 552 553 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 554 555 func Getpgid(pid int) (pgid int, err error) { 556 r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0) 557 pgid = int(r0) 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 Getpgrp() (pgrp int) { 567 r0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0) 568 pgrp = int(r0) 569 return 570 } 571 572 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 573 574 func Getpid() (pid int) { 575 r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0) 576 pid = int(r0) 577 return 578 } 579 580 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 581 582 func Getppid() (ppid int) { 583 r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0) 584 ppid = int(r0) 585 return 586 } 587 588 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 589 590 func Getpriority(which int, who int) (prio int, err error) { 591 r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0) 592 prio = int(r0) 593 if e1 != 0 { 594 err = errnoErr(e1) 595 } 596 return 597 } 598 599 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 600 601 func Getrlimit(which int, lim *Rlimit) (err error) { 602 _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0) 603 if e1 != 0 { 604 err = errnoErr(e1) 605 } 606 return 607 } 608 609 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 610 611 func Getrusage(who int, rusage *Rusage) (err error) { 612 _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0) 613 if e1 != 0 { 614 err = errnoErr(e1) 615 } 616 return 617 } 618 619 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 620 621 func Getsid(pid int) (sid int, err error) { 622 r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0) 623 sid = int(r0) 624 if e1 != 0 { 625 err = errnoErr(e1) 626 } 627 return 628 } 629 630 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 631 632 func Gettimeofday(tv *Timeval) (err error) { 633 _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0) 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 Getuid() (uid int) { 643 r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0) 644 uid = int(r0) 645 return 646 } 647 648 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 649 650 func Issetugid() (tainted bool) { 651 r0, _, _ := Syscall(SYS_ISSETUGID, 0, 0, 0) 652 tainted = bool(r0 != 0) 653 return 654 } 655 656 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 657 658 func Kill(pid int, signum Signal) (err error) { 659 _, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), 0) 660 if e1 != 0 { 661 err = errnoErr(e1) 662 } 663 return 664 } 665 666 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 667 668 func Kqueue() (fd int, err error) { 669 r0, _, e1 := Syscall(SYS_KQUEUE, 0, 0, 0) 670 fd = int(r0) 671 if e1 != 0 { 672 err = errnoErr(e1) 673 } 674 return 675 } 676 677 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 678 679 func Lchown(path string, uid int, gid int) (err error) { 680 var _p0 *byte 681 _p0, err = BytePtrFromString(path) 682 if err != nil { 683 return 684 } 685 _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) 686 if e1 != 0 { 687 err = errnoErr(e1) 688 } 689 return 690 } 691 692 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 693 694 func Link(path string, link string) (err error) { 695 var _p0 *byte 696 _p0, err = BytePtrFromString(path) 697 if err != nil { 698 return 699 } 700 var _p1 *byte 701 _p1, err = BytePtrFromString(link) 702 if err != nil { 703 return 704 } 705 _, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) 706 if e1 != 0 { 707 err = errnoErr(e1) 708 } 709 return 710 } 711 712 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 713 714 func Listen(s int, backlog int) (err error) { 715 _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0) 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 Lstat(path string, stat *Stat_t) (err error) { 725 var _p0 *byte 726 _p0, err = BytePtrFromString(path) 727 if err != nil { 728 return 729 } 730 _, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) 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 Mkdir(path string, mode uint32) (err error) { 740 var _p0 *byte 741 _p0, err = BytePtrFromString(path) 742 if err != nil { 743 return 744 } 745 _, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) 746 if e1 != 0 { 747 err = errnoErr(e1) 748 } 749 return 750 } 751 752 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 753 754 func Mkfifo(path string, mode uint32) (err error) { 755 var _p0 *byte 756 _p0, err = BytePtrFromString(path) 757 if err != nil { 758 return 759 } 760 _, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) 761 if e1 != 0 { 762 err = errnoErr(e1) 763 } 764 return 765 } 766 767 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 768 769 func Mknod(path string, mode uint32, dev int) (err error) { 770 var _p0 *byte 771 _p0, err = BytePtrFromString(path) 772 if err != nil { 773 return 774 } 775 _, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev)) 776 if e1 != 0 { 777 err = errnoErr(e1) 778 } 779 return 780 } 781 782 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 783 784 func Nanosleep(time *Timespec, leftover *Timespec) (err error) { 785 _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0) 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 Open(path string, mode int, perm uint32) (fd int, err error) { 795 var _p0 *byte 796 _p0, err = BytePtrFromString(path) 797 if err != nil { 798 return 799 } 800 r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm)) 801 fd = int(r0) 802 if e1 != 0 { 803 err = errnoErr(e1) 804 } 805 return 806 } 807 808 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 809 810 func Pathconf(path string, name int) (val int, err error) { 811 var _p0 *byte 812 _p0, err = BytePtrFromString(path) 813 if err != nil { 814 return 815 } 816 r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0) 817 val = int(r0) 818 if e1 != 0 { 819 err = errnoErr(e1) 820 } 821 return 822 } 823 824 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 825 826 func Pread(fd int, p []byte, offset int64) (n int, err error) { 827 var _p0 unsafe.Pointer 828 if len(p) > 0 { 829 _p0 = unsafe.Pointer(&p[0]) 830 } else { 831 _p0 = unsafe.Pointer(&_zero) 832 } 833 r0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), uintptr(offset>>32)) 834 n = int(r0) 835 if e1 != 0 { 836 err = errnoErr(e1) 837 } 838 return 839 } 840 841 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 842 843 func Pwrite(fd int, p []byte, offset int64) (n int, err error) { 844 var _p0 unsafe.Pointer 845 if len(p) > 0 { 846 _p0 = unsafe.Pointer(&p[0]) 847 } else { 848 _p0 = unsafe.Pointer(&_zero) 849 } 850 r0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), uintptr(offset>>32)) 851 n = int(r0) 852 if e1 != 0 { 853 err = errnoErr(e1) 854 } 855 return 856 } 857 858 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 859 860 func read(fd int, p []byte) (n int, err error) { 861 var _p0 unsafe.Pointer 862 if len(p) > 0 { 863 _p0 = unsafe.Pointer(&p[0]) 864 } else { 865 _p0 = unsafe.Pointer(&_zero) 866 } 867 r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p))) 868 n = int(r0) 869 if e1 != 0 { 870 err = errnoErr(e1) 871 } 872 return 873 } 874 875 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 876 877 func Readlink(path string, buf []byte) (n int, err error) { 878 var _p0 *byte 879 _p0, err = BytePtrFromString(path) 880 if err != nil { 881 return 882 } 883 var _p1 unsafe.Pointer 884 if len(buf) > 0 { 885 _p1 = unsafe.Pointer(&buf[0]) 886 } else { 887 _p1 = unsafe.Pointer(&_zero) 888 } 889 r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf))) 890 n = int(r0) 891 if e1 != 0 { 892 err = errnoErr(e1) 893 } 894 return 895 } 896 897 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 898 899 func Rename(from string, to string) (err error) { 900 var _p0 *byte 901 _p0, err = BytePtrFromString(from) 902 if err != nil { 903 return 904 } 905 var _p1 *byte 906 _p1, err = BytePtrFromString(to) 907 if err != nil { 908 return 909 } 910 _, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 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 Revoke(path string) (err error) { 920 var _p0 *byte 921 _p0, err = BytePtrFromString(path) 922 if err != nil { 923 return 924 } 925 _, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0) 926 if e1 != 0 { 927 err = errnoErr(e1) 928 } 929 return 930 } 931 932 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 933 934 func Rmdir(path string) (err error) { 935 var _p0 *byte 936 _p0, err = BytePtrFromString(path) 937 if err != nil { 938 return 939 } 940 _, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0) 941 if e1 != 0 { 942 err = errnoErr(e1) 943 } 944 return 945 } 946 947 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 948 949 func Seek(fd int, offset int64, whence int) (newoffset int64, err error) { 950 r0, r1, e1 := Syscall6(SYS_LSEEK, uintptr(fd), 0, uintptr(offset), uintptr(offset>>32), uintptr(whence), 0) 951 newoffset = int64(int64(r1)<<32 | int64(r0)) 952 if e1 != 0 { 953 err = errnoErr(e1) 954 } 955 return 956 } 957 958 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 959 960 func Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) { 961 _, _, e1 := Syscall6(SYS_SELECT, uintptr(n), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0) 962 if e1 != 0 { 963 err = errnoErr(e1) 964 } 965 return 966 } 967 968 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 969 970 func Setegid(egid int) (err error) { 971 _, _, e1 := RawSyscall(SYS_SETEGID, uintptr(egid), 0, 0) 972 if e1 != 0 { 973 err = errnoErr(e1) 974 } 975 return 976 } 977 978 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 979 980 func Seteuid(euid int) (err error) { 981 _, _, e1 := RawSyscall(SYS_SETEUID, uintptr(euid), 0, 0) 982 if e1 != 0 { 983 err = errnoErr(e1) 984 } 985 return 986 } 987 988 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 989 990 func Setgid(gid int) (err error) { 991 _, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 0, 0) 992 if e1 != 0 { 993 err = errnoErr(e1) 994 } 995 return 996 } 997 998 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 999 1000 func Setlogin(name string) (err error) { 1001 var _p0 *byte 1002 _p0, err = BytePtrFromString(name) 1003 if err != nil { 1004 return 1005 } 1006 _, _, e1 := Syscall(SYS_SETLOGIN, uintptr(unsafe.Pointer(_p0)), 0, 0) 1007 if e1 != 0 { 1008 err = errnoErr(e1) 1009 } 1010 return 1011 } 1012 1013 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1014 1015 func Setpgid(pid int, pgid int) (err error) { 1016 _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0) 1017 if e1 != 0 { 1018 err = errnoErr(e1) 1019 } 1020 return 1021 } 1022 1023 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1024 1025 func Setpriority(which int, who int, prio int) (err error) { 1026 _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio)) 1027 if e1 != 0 { 1028 err = errnoErr(e1) 1029 } 1030 return 1031 } 1032 1033 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1034 1035 func Setregid(rgid int, egid int) (err error) { 1036 _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0) 1037 if e1 != 0 { 1038 err = errnoErr(e1) 1039 } 1040 return 1041 } 1042 1043 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1044 1045 func Setreuid(ruid int, euid int) (err error) { 1046 _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0) 1047 if e1 != 0 { 1048 err = errnoErr(e1) 1049 } 1050 return 1051 } 1052 1053 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1054 1055 func Setrlimit(which int, lim *Rlimit) (err error) { 1056 _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0) 1057 if e1 != 0 { 1058 err = errnoErr(e1) 1059 } 1060 return 1061 } 1062 1063 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1064 1065 func Setsid() (pid int, err error) { 1066 r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0) 1067 pid = int(r0) 1068 if e1 != 0 { 1069 err = errnoErr(e1) 1070 } 1071 return 1072 } 1073 1074 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1075 1076 func Settimeofday(tp *Timeval) (err error) { 1077 _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0) 1078 if e1 != 0 { 1079 err = errnoErr(e1) 1080 } 1081 return 1082 } 1083 1084 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1085 1086 func Setuid(uid int) (err error) { 1087 _, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0) 1088 if e1 != 0 { 1089 err = errnoErr(e1) 1090 } 1091 return 1092 } 1093 1094 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1095 1096 func Stat(path string, stat *Stat_t) (err error) { 1097 var _p0 *byte 1098 _p0, err = BytePtrFromString(path) 1099 if err != nil { 1100 return 1101 } 1102 _, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) 1103 if e1 != 0 { 1104 err = errnoErr(e1) 1105 } 1106 return 1107 } 1108 1109 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1110 1111 func Statfs(path string, stat *Statfs_t) (err error) { 1112 var _p0 *byte 1113 _p0, err = BytePtrFromString(path) 1114 if err != nil { 1115 return 1116 } 1117 _, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) 1118 if e1 != 0 { 1119 err = errnoErr(e1) 1120 } 1121 return 1122 } 1123 1124 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1125 1126 func Symlink(path string, link string) (err error) { 1127 var _p0 *byte 1128 _p0, err = BytePtrFromString(path) 1129 if err != nil { 1130 return 1131 } 1132 var _p1 *byte 1133 _p1, err = BytePtrFromString(link) 1134 if err != nil { 1135 return 1136 } 1137 _, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) 1138 if e1 != 0 { 1139 err = errnoErr(e1) 1140 } 1141 return 1142 } 1143 1144 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1145 1146 func Sync() (err error) { 1147 _, _, e1 := Syscall(SYS_SYNC, 0, 0, 0) 1148 if e1 != 0 { 1149 err = errnoErr(e1) 1150 } 1151 return 1152 } 1153 1154 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1155 1156 func Truncate(path string, length int64) (err error) { 1157 var _p0 *byte 1158 _p0, err = BytePtrFromString(path) 1159 if err != nil { 1160 return 1161 } 1162 _, _, e1 := Syscall6(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), 0, uintptr(length), uintptr(length>>32), 0, 0) 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 Umask(newmask int) (oldmask int) { 1172 r0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0) 1173 oldmask = int(r0) 1174 return 1175 } 1176 1177 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1178 1179 func Undelete(path string) (err error) { 1180 var _p0 *byte 1181 _p0, err = BytePtrFromString(path) 1182 if err != nil { 1183 return 1184 } 1185 _, _, e1 := Syscall(SYS_UNDELETE, uintptr(unsafe.Pointer(_p0)), 0, 0) 1186 if e1 != 0 { 1187 err = errnoErr(e1) 1188 } 1189 return 1190 } 1191 1192 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1193 1194 func Unlink(path string) (err error) { 1195 var _p0 *byte 1196 _p0, err = BytePtrFromString(path) 1197 if err != nil { 1198 return 1199 } 1200 _, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0) 1201 if e1 != 0 { 1202 err = errnoErr(e1) 1203 } 1204 return 1205 } 1206 1207 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1208 1209 func Unmount(path string, flags int) (err error) { 1210 var _p0 *byte 1211 _p0, err = BytePtrFromString(path) 1212 if err != nil { 1213 return 1214 } 1215 _, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) 1216 if e1 != 0 { 1217 err = errnoErr(e1) 1218 } 1219 return 1220 } 1221 1222 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1223 1224 func write(fd int, p []byte) (n int, err error) { 1225 var _p0 unsafe.Pointer 1226 if len(p) > 0 { 1227 _p0 = unsafe.Pointer(&p[0]) 1228 } else { 1229 _p0 = unsafe.Pointer(&_zero) 1230 } 1231 r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p))) 1232 n = int(r0) 1233 if e1 != 0 { 1234 err = errnoErr(e1) 1235 } 1236 return 1237 } 1238 1239 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1240 1241 func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) { 1242 r0, _, e1 := Syscall9(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), 0, uintptr(pos), uintptr(pos>>32), 0) 1243 ret = uintptr(r0) 1244 if e1 != 0 { 1245 err = errnoErr(e1) 1246 } 1247 return 1248 } 1249 1250 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1251 1252 func munmap(addr uintptr, length uintptr) (err error) { 1253 _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0) 1254 if e1 != 0 { 1255 err = errnoErr(e1) 1256 } 1257 return 1258 } 1259 1260 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1261 1262 func readlen(fd int, buf *byte, nbuf int) (n int, err error) { 1263 r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf)) 1264 n = int(r0) 1265 if e1 != 0 { 1266 err = errnoErr(e1) 1267 } 1268 return 1269 } 1270 1271 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1272 1273 func writelen(fd int, buf *byte, nbuf int) (n int, err error) { 1274 r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf)) 1275 n = int(r0) 1276 if e1 != 0 { 1277 err = errnoErr(e1) 1278 } 1279 return 1280 } 1281 1282 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1283 1284 func accept4(fd int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (nfd int, err error) { 1285 r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0) 1286 nfd = int(r0) 1287 if e1 != 0 { 1288 err = errnoErr(e1) 1289 } 1290 return 1291 } 1292 1293 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1294 1295 func utimensat(dirfd int, path string, times *[2]Timespec, flag int) (err error) { 1296 var _p0 *byte 1297 _p0, err = BytePtrFromString(path) 1298 if err != nil { 1299 return 1300 } 1301 _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flag), 0, 0) 1302 if e1 != 0 { 1303 err = errnoErr(e1) 1304 } 1305 return 1306 }