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