Home | History | Annotate | Download | only in syscall
      1 // mksyscall.pl -l32 -netbsd syscall_bsd.go syscall_netbsd.go syscall_netbsd_386.go
      2 // MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
      3 
      4 // +build 386,netbsd
      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 	use(unsafe.Pointer(_p0))
    236 	if e1 != 0 {
    237 		err = errnoErr(e1)
    238 	}
    239 	return
    240 }
    241 
    242 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    243 
    244 func futimes(fd int, timeval *[2]Timeval) (err error) {
    245 	_, _, e1 := Syscall(SYS_FUTIMES, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0)
    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 fcntl(fd int, cmd int, arg int) (val int, err error) {
    255 	r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg))
    256 	val = int(r0)
    257 	if e1 != 0 {
    258 		err = errnoErr(e1)
    259 	}
    260 	return
    261 }
    262 
    263 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    264 
    265 func pipe() (fd1 int, fd2 int, err error) {
    266 	r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0)
    267 	fd1 = int(r0)
    268 	fd2 = int(r1)
    269 	if e1 != 0 {
    270 		err = errnoErr(e1)
    271 	}
    272 	return
    273 }
    274 
    275 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    276 
    277 func getdents(fd int, buf []byte) (n int, err error) {
    278 	var _p0 unsafe.Pointer
    279 	if len(buf) > 0 {
    280 		_p0 = unsafe.Pointer(&buf[0])
    281 	} else {
    282 		_p0 = unsafe.Pointer(&_zero)
    283 	}
    284 	r0, _, e1 := Syscall(SYS_GETDENTS, uintptr(fd), uintptr(_p0), uintptr(len(buf)))
    285 	n = int(r0)
    286 	if e1 != 0 {
    287 		err = errnoErr(e1)
    288 	}
    289 	return
    290 }
    291 
    292 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    293 
    294 func Access(path string, mode uint32) (err error) {
    295 	var _p0 *byte
    296 	_p0, err = BytePtrFromString(path)
    297 	if err != nil {
    298 		return
    299 	}
    300 	_, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
    301 	use(unsafe.Pointer(_p0))
    302 	if e1 != 0 {
    303 		err = errnoErr(e1)
    304 	}
    305 	return
    306 }
    307 
    308 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    309 
    310 func Adjtime(delta *Timeval, olddelta *Timeval) (err error) {
    311 	_, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0)
    312 	if e1 != 0 {
    313 		err = errnoErr(e1)
    314 	}
    315 	return
    316 }
    317 
    318 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    319 
    320 func Chdir(path string) (err error) {
    321 	var _p0 *byte
    322 	_p0, err = BytePtrFromString(path)
    323 	if err != nil {
    324 		return
    325 	}
    326 	_, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
    327 	use(unsafe.Pointer(_p0))
    328 	if e1 != 0 {
    329 		err = errnoErr(e1)
    330 	}
    331 	return
    332 }
    333 
    334 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    335 
    336 func Chflags(path string, flags int) (err error) {
    337 	var _p0 *byte
    338 	_p0, err = BytePtrFromString(path)
    339 	if err != nil {
    340 		return
    341 	}
    342 	_, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
    343 	use(unsafe.Pointer(_p0))
    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 Chmod(path string, mode uint32) (err error) {
    353 	var _p0 *byte
    354 	_p0, err = BytePtrFromString(path)
    355 	if err != nil {
    356 		return
    357 	}
    358 	_, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
    359 	use(unsafe.Pointer(_p0))
    360 	if e1 != 0 {
    361 		err = errnoErr(e1)
    362 	}
    363 	return
    364 }
    365 
    366 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    367 
    368 func Chown(path string, uid int, gid int) (err error) {
    369 	var _p0 *byte
    370 	_p0, err = BytePtrFromString(path)
    371 	if err != nil {
    372 		return
    373 	}
    374 	_, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
    375 	use(unsafe.Pointer(_p0))
    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 Chroot(path string) (err error) {
    385 	var _p0 *byte
    386 	_p0, err = BytePtrFromString(path)
    387 	if err != nil {
    388 		return
    389 	}
    390 	_, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
    391 	use(unsafe.Pointer(_p0))
    392 	if e1 != 0 {
    393 		err = errnoErr(e1)
    394 	}
    395 	return
    396 }
    397 
    398 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    399 
    400 func Close(fd int) (err error) {
    401 	_, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
    402 	if e1 != 0 {
    403 		err = errnoErr(e1)
    404 	}
    405 	return
    406 }
    407 
    408 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    409 
    410 func Dup(fd int) (nfd int, err error) {
    411 	r0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0)
    412 	nfd = int(r0)
    413 	if e1 != 0 {
    414 		err = errnoErr(e1)
    415 	}
    416 	return
    417 }
    418 
    419 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    420 
    421 func Dup2(from int, to int) (err error) {
    422 	_, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0)
    423 	if e1 != 0 {
    424 		err = errnoErr(e1)
    425 	}
    426 	return
    427 }
    428 
    429 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    430 
    431 func Exit(code int) {
    432 	Syscall(SYS_EXIT, uintptr(code), 0, 0)
    433 	return
    434 }
    435 
    436 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    437 
    438 func Fchdir(fd int) (err error) {
    439 	_, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
    440 	if e1 != 0 {
    441 		err = errnoErr(e1)
    442 	}
    443 	return
    444 }
    445 
    446 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    447 
    448 func Fchflags(fd int, flags int) (err error) {
    449 	_, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0)
    450 	if e1 != 0 {
    451 		err = errnoErr(e1)
    452 	}
    453 	return
    454 }
    455 
    456 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    457 
    458 func Fchmod(fd int, mode uint32) (err error) {
    459 	_, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
    460 	if e1 != 0 {
    461 		err = errnoErr(e1)
    462 	}
    463 	return
    464 }
    465 
    466 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    467 
    468 func Fchown(fd int, uid int, gid int) (err error) {
    469 	_, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
    470 	if e1 != 0 {
    471 		err = errnoErr(e1)
    472 	}
    473 	return
    474 }
    475 
    476 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    477 
    478 func Flock(fd int, how int) (err error) {
    479 	_, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
    480 	if e1 != 0 {
    481 		err = errnoErr(e1)
    482 	}
    483 	return
    484 }
    485 
    486 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    487 
    488 func Fpathconf(fd int, name int) (val int, err error) {
    489 	r0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0)
    490 	val = int(r0)
    491 	if e1 != 0 {
    492 		err = errnoErr(e1)
    493 	}
    494 	return
    495 }
    496 
    497 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    498 
    499 func Fstat(fd int, stat *Stat_t) (err error) {
    500 	_, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
    501 	if e1 != 0 {
    502 		err = errnoErr(e1)
    503 	}
    504 	return
    505 }
    506 
    507 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    508 
    509 func Fsync(fd int) (err error) {
    510 	_, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
    511 	if e1 != 0 {
    512 		err = errnoErr(e1)
    513 	}
    514 	return
    515 }
    516 
    517 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    518 
    519 func Ftruncate(fd int, length int64) (err error) {
    520 	_, _, e1 := Syscall6(SYS_FTRUNCATE, uintptr(fd), 0, uintptr(length), uintptr(length>>32), 0, 0)
    521 	if e1 != 0 {
    522 		err = errnoErr(e1)
    523 	}
    524 	return
    525 }
    526 
    527 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    528 
    529 func Getegid() (egid int) {
    530 	r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0)
    531 	egid = int(r0)
    532 	return
    533 }
    534 
    535 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    536 
    537 func Geteuid() (uid int) {
    538 	r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0)
    539 	uid = int(r0)
    540 	return
    541 }
    542 
    543 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    544 
    545 func Getgid() (gid int) {
    546 	r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0)
    547 	gid = int(r0)
    548 	return
    549 }
    550 
    551 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    552 
    553 func Getpgid(pid int) (pgid int, err error) {
    554 	r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
    555 	pgid = int(r0)
    556 	if e1 != 0 {
    557 		err = errnoErr(e1)
    558 	}
    559 	return
    560 }
    561 
    562 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    563 
    564 func Getpgrp() (pgrp int) {
    565 	r0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0)
    566 	pgrp = int(r0)
    567 	return
    568 }
    569 
    570 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    571 
    572 func Getpid() (pid int) {
    573 	r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)
    574 	pid = int(r0)
    575 	return
    576 }
    577 
    578 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    579 
    580 func Getppid() (ppid int) {
    581 	r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)
    582 	ppid = int(r0)
    583 	return
    584 }
    585 
    586 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    587 
    588 func Getpriority(which int, who int) (prio int, err error) {
    589 	r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
    590 	prio = int(r0)
    591 	if e1 != 0 {
    592 		err = errnoErr(e1)
    593 	}
    594 	return
    595 }
    596 
    597 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    598 
    599 func Getrlimit(which int, lim *Rlimit) (err error) {
    600 	_, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
    601 	if e1 != 0 {
    602 		err = errnoErr(e1)
    603 	}
    604 	return
    605 }
    606 
    607 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    608 
    609 func Getrusage(who int, rusage *Rusage) (err error) {
    610 	_, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
    611 	if e1 != 0 {
    612 		err = errnoErr(e1)
    613 	}
    614 	return
    615 }
    616 
    617 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    618 
    619 func Getsid(pid int) (sid int, err error) {
    620 	r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
    621 	sid = int(r0)
    622 	if e1 != 0 {
    623 		err = errnoErr(e1)
    624 	}
    625 	return
    626 }
    627 
    628 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    629 
    630 func Gettimeofday(tv *Timeval) (err error) {
    631 	_, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
    632 	if e1 != 0 {
    633 		err = errnoErr(e1)
    634 	}
    635 	return
    636 }
    637 
    638 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    639 
    640 func Getuid() (uid int) {
    641 	r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
    642 	uid = int(r0)
    643 	return
    644 }
    645 
    646 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    647 
    648 func Issetugid() (tainted bool) {
    649 	r0, _, _ := Syscall(SYS_ISSETUGID, 0, 0, 0)
    650 	tainted = bool(r0 != 0)
    651 	return
    652 }
    653 
    654 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    655 
    656 func Kill(pid int, signum Signal) (err error) {
    657 	_, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), 0)
    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 Kqueue() (fd int, err error) {
    667 	r0, _, e1 := Syscall(SYS_KQUEUE, 0, 0, 0)
    668 	fd = int(r0)
    669 	if e1 != 0 {
    670 		err = errnoErr(e1)
    671 	}
    672 	return
    673 }
    674 
    675 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    676 
    677 func Lchown(path string, uid int, gid int) (err error) {
    678 	var _p0 *byte
    679 	_p0, err = BytePtrFromString(path)
    680 	if err != nil {
    681 		return
    682 	}
    683 	_, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
    684 	use(unsafe.Pointer(_p0))
    685 	if e1 != 0 {
    686 		err = errnoErr(e1)
    687 	}
    688 	return
    689 }
    690 
    691 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    692 
    693 func Link(path string, link string) (err error) {
    694 	var _p0 *byte
    695 	_p0, err = BytePtrFromString(path)
    696 	if err != nil {
    697 		return
    698 	}
    699 	var _p1 *byte
    700 	_p1, err = BytePtrFromString(link)
    701 	if err != nil {
    702 		return
    703 	}
    704 	_, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
    705 	use(unsafe.Pointer(_p0))
    706 	use(unsafe.Pointer(_p1))
    707 	if e1 != 0 {
    708 		err = errnoErr(e1)
    709 	}
    710 	return
    711 }
    712 
    713 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    714 
    715 func Listen(s int, backlog int) (err error) {
    716 	_, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0)
    717 	if e1 != 0 {
    718 		err = errnoErr(e1)
    719 	}
    720 	return
    721 }
    722 
    723 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    724 
    725 func Lstat(path string, stat *Stat_t) (err error) {
    726 	var _p0 *byte
    727 	_p0, err = BytePtrFromString(path)
    728 	if err != nil {
    729 		return
    730 	}
    731 	_, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
    732 	use(unsafe.Pointer(_p0))
    733 	if e1 != 0 {
    734 		err = errnoErr(e1)
    735 	}
    736 	return
    737 }
    738 
    739 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    740 
    741 func Mkdir(path string, mode uint32) (err error) {
    742 	var _p0 *byte
    743 	_p0, err = BytePtrFromString(path)
    744 	if err != nil {
    745 		return
    746 	}
    747 	_, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
    748 	use(unsafe.Pointer(_p0))
    749 	if e1 != 0 {
    750 		err = errnoErr(e1)
    751 	}
    752 	return
    753 }
    754 
    755 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    756 
    757 func Mkfifo(path string, mode uint32) (err error) {
    758 	var _p0 *byte
    759 	_p0, err = BytePtrFromString(path)
    760 	if err != nil {
    761 		return
    762 	}
    763 	_, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
    764 	use(unsafe.Pointer(_p0))
    765 	if e1 != 0 {
    766 		err = errnoErr(e1)
    767 	}
    768 	return
    769 }
    770 
    771 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    772 
    773 func Mknod(path string, mode uint32, dev int) (err error) {
    774 	var _p0 *byte
    775 	_p0, err = BytePtrFromString(path)
    776 	if err != nil {
    777 		return
    778 	}
    779 	_, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
    780 	use(unsafe.Pointer(_p0))
    781 	if e1 != 0 {
    782 		err = errnoErr(e1)
    783 	}
    784 	return
    785 }
    786 
    787 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    788 
    789 func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
    790 	_, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
    791 	if e1 != 0 {
    792 		err = errnoErr(e1)
    793 	}
    794 	return
    795 }
    796 
    797 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    798 
    799 func Open(path string, mode int, perm uint32) (fd int, err error) {
    800 	var _p0 *byte
    801 	_p0, err = BytePtrFromString(path)
    802 	if err != nil {
    803 		return
    804 	}
    805 	r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
    806 	use(unsafe.Pointer(_p0))
    807 	fd = int(r0)
    808 	if e1 != 0 {
    809 		err = errnoErr(e1)
    810 	}
    811 	return
    812 }
    813 
    814 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    815 
    816 func Pathconf(path string, name int) (val int, err error) {
    817 	var _p0 *byte
    818 	_p0, err = BytePtrFromString(path)
    819 	if err != nil {
    820 		return
    821 	}
    822 	r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)
    823 	use(unsafe.Pointer(_p0))
    824 	val = int(r0)
    825 	if e1 != 0 {
    826 		err = errnoErr(e1)
    827 	}
    828 	return
    829 }
    830 
    831 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    832 
    833 func Pread(fd int, p []byte, offset int64) (n int, err error) {
    834 	var _p0 unsafe.Pointer
    835 	if len(p) > 0 {
    836 		_p0 = unsafe.Pointer(&p[0])
    837 	} else {
    838 		_p0 = unsafe.Pointer(&_zero)
    839 	}
    840 	r0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), uintptr(offset>>32))
    841 	n = 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 Pwrite(fd int, p []byte, offset int64) (n int, err error) {
    851 	var _p0 unsafe.Pointer
    852 	if len(p) > 0 {
    853 		_p0 = unsafe.Pointer(&p[0])
    854 	} else {
    855 		_p0 = unsafe.Pointer(&_zero)
    856 	}
    857 	r0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), uintptr(offset>>32))
    858 	n = int(r0)
    859 	if e1 != 0 {
    860 		err = errnoErr(e1)
    861 	}
    862 	return
    863 }
    864 
    865 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    866 
    867 func read(fd int, p []byte) (n int, err error) {
    868 	var _p0 unsafe.Pointer
    869 	if len(p) > 0 {
    870 		_p0 = unsafe.Pointer(&p[0])
    871 	} else {
    872 		_p0 = unsafe.Pointer(&_zero)
    873 	}
    874 	r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
    875 	n = int(r0)
    876 	if e1 != 0 {
    877 		err = errnoErr(e1)
    878 	}
    879 	return
    880 }
    881 
    882 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    883 
    884 func Readlink(path string, buf []byte) (n int, err error) {
    885 	var _p0 *byte
    886 	_p0, err = BytePtrFromString(path)
    887 	if err != nil {
    888 		return
    889 	}
    890 	var _p1 unsafe.Pointer
    891 	if len(buf) > 0 {
    892 		_p1 = unsafe.Pointer(&buf[0])
    893 	} else {
    894 		_p1 = unsafe.Pointer(&_zero)
    895 	}
    896 	r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))
    897 	use(unsafe.Pointer(_p0))
    898 	n = int(r0)
    899 	if e1 != 0 {
    900 		err = errnoErr(e1)
    901 	}
    902 	return
    903 }
    904 
    905 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    906 
    907 func Rename(from string, to string) (err error) {
    908 	var _p0 *byte
    909 	_p0, err = BytePtrFromString(from)
    910 	if err != nil {
    911 		return
    912 	}
    913 	var _p1 *byte
    914 	_p1, err = BytePtrFromString(to)
    915 	if err != nil {
    916 		return
    917 	}
    918 	_, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
    919 	use(unsafe.Pointer(_p0))
    920 	use(unsafe.Pointer(_p1))
    921 	if e1 != 0 {
    922 		err = errnoErr(e1)
    923 	}
    924 	return
    925 }
    926 
    927 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    928 
    929 func Revoke(path string) (err error) {
    930 	var _p0 *byte
    931 	_p0, err = BytePtrFromString(path)
    932 	if err != nil {
    933 		return
    934 	}
    935 	_, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0)
    936 	use(unsafe.Pointer(_p0))
    937 	if e1 != 0 {
    938 		err = errnoErr(e1)
    939 	}
    940 	return
    941 }
    942 
    943 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    944 
    945 func Rmdir(path string) (err error) {
    946 	var _p0 *byte
    947 	_p0, err = BytePtrFromString(path)
    948 	if err != nil {
    949 		return
    950 	}
    951 	_, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
    952 	use(unsafe.Pointer(_p0))
    953 	if e1 != 0 {
    954 		err = errnoErr(e1)
    955 	}
    956 	return
    957 }
    958 
    959 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    960 
    961 func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
    962 	r0, r1, e1 := Syscall6(SYS_LSEEK, uintptr(fd), 0, uintptr(offset), uintptr(offset>>32), uintptr(whence), 0)
    963 	newoffset = int64(int64(r1)<<32 | int64(r0))
    964 	if e1 != 0 {
    965 		err = errnoErr(e1)
    966 	}
    967 	return
    968 }
    969 
    970 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    971 
    972 func Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) {
    973 	_, _, e1 := Syscall6(SYS_SELECT, uintptr(n), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
    974 	if e1 != 0 {
    975 		err = errnoErr(e1)
    976 	}
    977 	return
    978 }
    979 
    980 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    981 
    982 func Setegid(egid int) (err error) {
    983 	_, _, e1 := RawSyscall(SYS_SETEGID, uintptr(egid), 0, 0)
    984 	if e1 != 0 {
    985 		err = errnoErr(e1)
    986 	}
    987 	return
    988 }
    989 
    990 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    991 
    992 func Seteuid(euid int) (err error) {
    993 	_, _, e1 := RawSyscall(SYS_SETEUID, uintptr(euid), 0, 0)
    994 	if e1 != 0 {
    995 		err = errnoErr(e1)
    996 	}
    997 	return
    998 }
    999 
   1000 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   1001 
   1002 func Setgid(gid int) (err error) {
   1003 	_, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 0, 0)
   1004 	if e1 != 0 {
   1005 		err = errnoErr(e1)
   1006 	}
   1007 	return
   1008 }
   1009 
   1010 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   1011 
   1012 func Setpgid(pid int, pgid int) (err error) {
   1013 	_, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
   1014 	if e1 != 0 {
   1015 		err = errnoErr(e1)
   1016 	}
   1017 	return
   1018 }
   1019 
   1020 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   1021 
   1022 func Setpriority(which int, who int, prio int) (err error) {
   1023 	_, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
   1024 	if e1 != 0 {
   1025 		err = errnoErr(e1)
   1026 	}
   1027 	return
   1028 }
   1029 
   1030 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   1031 
   1032 func Setregid(rgid int, egid int) (err error) {
   1033 	_, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
   1034 	if e1 != 0 {
   1035 		err = errnoErr(e1)
   1036 	}
   1037 	return
   1038 }
   1039 
   1040 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   1041 
   1042 func Setreuid(ruid int, euid int) (err error) {
   1043 	_, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
   1044 	if e1 != 0 {
   1045 		err = errnoErr(e1)
   1046 	}
   1047 	return
   1048 }
   1049 
   1050 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   1051 
   1052 func Setrlimit(which int, lim *Rlimit) (err error) {
   1053 	_, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
   1054 	if e1 != 0 {
   1055 		err = errnoErr(e1)
   1056 	}
   1057 	return
   1058 }
   1059 
   1060 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   1061 
   1062 func Setsid() (pid int, err error) {
   1063 	r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
   1064 	pid = int(r0)
   1065 	if e1 != 0 {
   1066 		err = errnoErr(e1)
   1067 	}
   1068 	return
   1069 }
   1070 
   1071 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   1072 
   1073 func Settimeofday(tp *Timeval) (err error) {
   1074 	_, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
   1075 	if e1 != 0 {
   1076 		err = errnoErr(e1)
   1077 	}
   1078 	return
   1079 }
   1080 
   1081 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   1082 
   1083 func Setuid(uid int) (err error) {
   1084 	_, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0)
   1085 	if e1 != 0 {
   1086 		err = errnoErr(e1)
   1087 	}
   1088 	return
   1089 }
   1090 
   1091 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   1092 
   1093 func Stat(path string, stat *Stat_t) (err error) {
   1094 	var _p0 *byte
   1095 	_p0, err = BytePtrFromString(path)
   1096 	if err != nil {
   1097 		return
   1098 	}
   1099 	_, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
   1100 	use(unsafe.Pointer(_p0))
   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 Symlink(path string, link string) (err error) {
   1110 	var _p0 *byte
   1111 	_p0, err = BytePtrFromString(path)
   1112 	if err != nil {
   1113 		return
   1114 	}
   1115 	var _p1 *byte
   1116 	_p1, err = BytePtrFromString(link)
   1117 	if err != nil {
   1118 		return
   1119 	}
   1120 	_, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
   1121 	use(unsafe.Pointer(_p0))
   1122 	use(unsafe.Pointer(_p1))
   1123 	if e1 != 0 {
   1124 		err = errnoErr(e1)
   1125 	}
   1126 	return
   1127 }
   1128 
   1129 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   1130 
   1131 func Sync() (err error) {
   1132 	_, _, e1 := Syscall(SYS_SYNC, 0, 0, 0)
   1133 	if e1 != 0 {
   1134 		err = errnoErr(e1)
   1135 	}
   1136 	return
   1137 }
   1138 
   1139 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   1140 
   1141 func Truncate(path string, length int64) (err error) {
   1142 	var _p0 *byte
   1143 	_p0, err = BytePtrFromString(path)
   1144 	if err != nil {
   1145 		return
   1146 	}
   1147 	_, _, e1 := Syscall6(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), 0, uintptr(length), uintptr(length>>32), 0, 0)
   1148 	use(unsafe.Pointer(_p0))
   1149 	if e1 != 0 {
   1150 		err = errnoErr(e1)
   1151 	}
   1152 	return
   1153 }
   1154 
   1155 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   1156 
   1157 func Umask(newmask int) (oldmask int) {
   1158 	r0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0)
   1159 	oldmask = int(r0)
   1160 	return
   1161 }
   1162 
   1163 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   1164 
   1165 func Unlink(path string) (err error) {
   1166 	var _p0 *byte
   1167 	_p0, err = BytePtrFromString(path)
   1168 	if err != nil {
   1169 		return
   1170 	}
   1171 	_, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0)
   1172 	use(unsafe.Pointer(_p0))
   1173 	if e1 != 0 {
   1174 		err = errnoErr(e1)
   1175 	}
   1176 	return
   1177 }
   1178 
   1179 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   1180 
   1181 func Unmount(path string, flags int) (err error) {
   1182 	var _p0 *byte
   1183 	_p0, err = BytePtrFromString(path)
   1184 	if err != nil {
   1185 		return
   1186 	}
   1187 	_, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
   1188 	use(unsafe.Pointer(_p0))
   1189 	if e1 != 0 {
   1190 		err = errnoErr(e1)
   1191 	}
   1192 	return
   1193 }
   1194 
   1195 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   1196 
   1197 func write(fd int, p []byte) (n int, err error) {
   1198 	var _p0 unsafe.Pointer
   1199 	if len(p) > 0 {
   1200 		_p0 = unsafe.Pointer(&p[0])
   1201 	} else {
   1202 		_p0 = unsafe.Pointer(&_zero)
   1203 	}
   1204 	r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
   1205 	n = int(r0)
   1206 	if e1 != 0 {
   1207 		err = errnoErr(e1)
   1208 	}
   1209 	return
   1210 }
   1211 
   1212 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   1213 
   1214 func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {
   1215 	r0, _, e1 := Syscall9(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), 0, uintptr(pos), uintptr(pos>>32), 0)
   1216 	ret = uintptr(r0)
   1217 	if e1 != 0 {
   1218 		err = errnoErr(e1)
   1219 	}
   1220 	return
   1221 }
   1222 
   1223 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   1224 
   1225 func munmap(addr uintptr, length uintptr) (err error) {
   1226 	_, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
   1227 	if e1 != 0 {
   1228 		err = errnoErr(e1)
   1229 	}
   1230 	return
   1231 }
   1232 
   1233 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   1234 
   1235 func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
   1236 	r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
   1237 	n = int(r0)
   1238 	if e1 != 0 {
   1239 		err = errnoErr(e1)
   1240 	}
   1241 	return
   1242 }
   1243 
   1244 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   1245 
   1246 func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
   1247 	r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
   1248 	n = int(r0)
   1249 	if e1 != 0 {
   1250 		err = errnoErr(e1)
   1251 	}
   1252 	return
   1253 }
   1254