Home | History | Annotate | Download | only in syscall
      1 // mksyscall.pl -l32 syscall_bsd.go syscall_darwin.go syscall_darwin_arm.go
      2 // MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
      3 
      4 // +build arm,darwin
      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 	use(_p0)
    221 	if e1 != 0 {
    222 		err = errnoErr(e1)
    223 	}
    224 	return
    225 }
    226 
    227 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    228 
    229 func utimes(path string, timeval *[2]Timeval) (err error) {
    230 	var _p0 *byte
    231 	_p0, err = BytePtrFromString(path)
    232 	if err != nil {
    233 		return
    234 	}
    235 	_, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0)
    236 	use(unsafe.Pointer(_p0))
    237 	if e1 != 0 {
    238 		err = errnoErr(e1)
    239 	}
    240 	return
    241 }
    242 
    243 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    244 
    245 func futimes(fd int, timeval *[2]Timeval) (err error) {
    246 	_, _, e1 := Syscall(SYS_FUTIMES, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0)
    247 	if e1 != 0 {
    248 		err = errnoErr(e1)
    249 	}
    250 	return
    251 }
    252 
    253 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    254 
    255 func fcntl(fd int, cmd int, arg int) (val int, err error) {
    256 	r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg))
    257 	val = int(r0)
    258 	if e1 != 0 {
    259 		err = errnoErr(e1)
    260 	}
    261 	return
    262 }
    263 
    264 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    265 
    266 func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
    267 	_, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
    268 	if e1 != 0 {
    269 		err = errnoErr(e1)
    270 	}
    271 	return
    272 }
    273 
    274 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    275 
    276 func pipe() (r int, w int, err error) {
    277 	r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0)
    278 	r = int(r0)
    279 	w = int(r1)
    280 	if e1 != 0 {
    281 		err = errnoErr(e1)
    282 	}
    283 	return
    284 }
    285 
    286 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    287 
    288 func kill(pid int, signum int, posix int) (err error) {
    289 	_, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), uintptr(posix))
    290 	if e1 != 0 {
    291 		err = errnoErr(e1)
    292 	}
    293 	return
    294 }
    295 
    296 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    297 
    298 func Access(path string, mode uint32) (err error) {
    299 	var _p0 *byte
    300 	_p0, err = BytePtrFromString(path)
    301 	if err != nil {
    302 		return
    303 	}
    304 	_, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
    305 	use(unsafe.Pointer(_p0))
    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 Adjtime(delta *Timeval, olddelta *Timeval) (err error) {
    315 	_, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0)
    316 	if e1 != 0 {
    317 		err = errnoErr(e1)
    318 	}
    319 	return
    320 }
    321 
    322 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    323 
    324 func Chdir(path string) (err error) {
    325 	var _p0 *byte
    326 	_p0, err = BytePtrFromString(path)
    327 	if err != nil {
    328 		return
    329 	}
    330 	_, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
    331 	use(unsafe.Pointer(_p0))
    332 	if e1 != 0 {
    333 		err = errnoErr(e1)
    334 	}
    335 	return
    336 }
    337 
    338 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    339 
    340 func Chflags(path string, flags int) (err error) {
    341 	var _p0 *byte
    342 	_p0, err = BytePtrFromString(path)
    343 	if err != nil {
    344 		return
    345 	}
    346 	_, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
    347 	use(unsafe.Pointer(_p0))
    348 	if e1 != 0 {
    349 		err = errnoErr(e1)
    350 	}
    351 	return
    352 }
    353 
    354 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    355 
    356 func Chmod(path string, mode uint32) (err error) {
    357 	var _p0 *byte
    358 	_p0, err = BytePtrFromString(path)
    359 	if err != nil {
    360 		return
    361 	}
    362 	_, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
    363 	use(unsafe.Pointer(_p0))
    364 	if e1 != 0 {
    365 		err = errnoErr(e1)
    366 	}
    367 	return
    368 }
    369 
    370 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    371 
    372 func Chown(path string, uid int, gid int) (err error) {
    373 	var _p0 *byte
    374 	_p0, err = BytePtrFromString(path)
    375 	if err != nil {
    376 		return
    377 	}
    378 	_, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
    379 	use(unsafe.Pointer(_p0))
    380 	if e1 != 0 {
    381 		err = errnoErr(e1)
    382 	}
    383 	return
    384 }
    385 
    386 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    387 
    388 func Chroot(path string) (err error) {
    389 	var _p0 *byte
    390 	_p0, err = BytePtrFromString(path)
    391 	if err != nil {
    392 		return
    393 	}
    394 	_, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
    395 	use(unsafe.Pointer(_p0))
    396 	if e1 != 0 {
    397 		err = errnoErr(e1)
    398 	}
    399 	return
    400 }
    401 
    402 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    403 
    404 func Close(fd int) (err error) {
    405 	_, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
    406 	if e1 != 0 {
    407 		err = errnoErr(e1)
    408 	}
    409 	return
    410 }
    411 
    412 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    413 
    414 func Dup(fd int) (nfd int, err error) {
    415 	r0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0)
    416 	nfd = int(r0)
    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 Dup2(from int, to int) (err error) {
    426 	_, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 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 Exchangedata(path1 string, path2 string, options int) (err error) {
    436 	var _p0 *byte
    437 	_p0, err = BytePtrFromString(path1)
    438 	if err != nil {
    439 		return
    440 	}
    441 	var _p1 *byte
    442 	_p1, err = BytePtrFromString(path2)
    443 	if err != nil {
    444 		return
    445 	}
    446 	_, _, e1 := Syscall(SYS_EXCHANGEDATA, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(options))
    447 	use(unsafe.Pointer(_p0))
    448 	use(unsafe.Pointer(_p1))
    449 	if e1 != 0 {
    450 		err = errnoErr(e1)
    451 	}
    452 	return
    453 }
    454 
    455 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    456 
    457 func Exit(code int) {
    458 	Syscall(SYS_EXIT, uintptr(code), 0, 0)
    459 	return
    460 }
    461 
    462 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    463 
    464 func Fchdir(fd int) (err error) {
    465 	_, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
    466 	if e1 != 0 {
    467 		err = errnoErr(e1)
    468 	}
    469 	return
    470 }
    471 
    472 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    473 
    474 func Fchflags(fd int, flags int) (err error) {
    475 	_, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0)
    476 	if e1 != 0 {
    477 		err = errnoErr(e1)
    478 	}
    479 	return
    480 }
    481 
    482 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    483 
    484 func Fchmod(fd int, mode uint32) (err error) {
    485 	_, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
    486 	if e1 != 0 {
    487 		err = errnoErr(e1)
    488 	}
    489 	return
    490 }
    491 
    492 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    493 
    494 func Fchown(fd int, uid int, gid int) (err error) {
    495 	_, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
    496 	if e1 != 0 {
    497 		err = errnoErr(e1)
    498 	}
    499 	return
    500 }
    501 
    502 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    503 
    504 func Flock(fd int, how int) (err error) {
    505 	_, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
    506 	if e1 != 0 {
    507 		err = errnoErr(e1)
    508 	}
    509 	return
    510 }
    511 
    512 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    513 
    514 func Fpathconf(fd int, name int) (val int, err error) {
    515 	r0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0)
    516 	val = int(r0)
    517 	if e1 != 0 {
    518 		err = errnoErr(e1)
    519 	}
    520 	return
    521 }
    522 
    523 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    524 
    525 func Fstat(fd int, stat *Stat_t) (err error) {
    526 	_, _, e1 := Syscall(SYS_FSTAT64, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
    527 	if e1 != 0 {
    528 		err = errnoErr(e1)
    529 	}
    530 	return
    531 }
    532 
    533 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    534 
    535 func Fstatfs(fd int, stat *Statfs_t) (err error) {
    536 	_, _, e1 := Syscall(SYS_FSTATFS64, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
    537 	if e1 != 0 {
    538 		err = errnoErr(e1)
    539 	}
    540 	return
    541 }
    542 
    543 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    544 
    545 func Fsync(fd int) (err error) {
    546 	_, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
    547 	if e1 != 0 {
    548 		err = errnoErr(e1)
    549 	}
    550 	return
    551 }
    552 
    553 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    554 
    555 func Ftruncate(fd int, length int64) (err error) {
    556 	_, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), uintptr(length>>32))
    557 	if e1 != 0 {
    558 		err = errnoErr(e1)
    559 	}
    560 	return
    561 }
    562 
    563 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    564 
    565 func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
    566 	var _p0 unsafe.Pointer
    567 	if len(buf) > 0 {
    568 		_p0 = unsafe.Pointer(&buf[0])
    569 	} else {
    570 		_p0 = unsafe.Pointer(&_zero)
    571 	}
    572 	r0, _, e1 := Syscall6(SYS_GETDIRENTRIES64, uintptr(fd), uintptr(_p0), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0)
    573 	n = int(r0)
    574 	if e1 != 0 {
    575 		err = errnoErr(e1)
    576 	}
    577 	return
    578 }
    579 
    580 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    581 
    582 func Getdtablesize() (size int) {
    583 	r0, _, _ := Syscall(SYS_GETDTABLESIZE, 0, 0, 0)
    584 	size = int(r0)
    585 	return
    586 }
    587 
    588 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    589 
    590 func Getegid() (egid int) {
    591 	r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0)
    592 	egid = int(r0)
    593 	return
    594 }
    595 
    596 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    597 
    598 func Geteuid() (uid int) {
    599 	r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0)
    600 	uid = int(r0)
    601 	return
    602 }
    603 
    604 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    605 
    606 func Getgid() (gid int) {
    607 	r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0)
    608 	gid = int(r0)
    609 	return
    610 }
    611 
    612 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    613 
    614 func Getpgid(pid int) (pgid int, err error) {
    615 	r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
    616 	pgid = int(r0)
    617 	if e1 != 0 {
    618 		err = errnoErr(e1)
    619 	}
    620 	return
    621 }
    622 
    623 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    624 
    625 func Getpgrp() (pgrp int) {
    626 	r0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0)
    627 	pgrp = int(r0)
    628 	return
    629 }
    630 
    631 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    632 
    633 func Getpid() (pid int) {
    634 	r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)
    635 	pid = int(r0)
    636 	return
    637 }
    638 
    639 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    640 
    641 func Getppid() (ppid int) {
    642 	r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)
    643 	ppid = int(r0)
    644 	return
    645 }
    646 
    647 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    648 
    649 func Getpriority(which int, who int) (prio int, err error) {
    650 	r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
    651 	prio = int(r0)
    652 	if e1 != 0 {
    653 		err = errnoErr(e1)
    654 	}
    655 	return
    656 }
    657 
    658 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    659 
    660 func Getrlimit(which int, lim *Rlimit) (err error) {
    661 	_, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
    662 	if e1 != 0 {
    663 		err = errnoErr(e1)
    664 	}
    665 	return
    666 }
    667 
    668 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    669 
    670 func Getrusage(who int, rusage *Rusage) (err error) {
    671 	_, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
    672 	if e1 != 0 {
    673 		err = errnoErr(e1)
    674 	}
    675 	return
    676 }
    677 
    678 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    679 
    680 func Getsid(pid int) (sid int, err error) {
    681 	r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
    682 	sid = int(r0)
    683 	if e1 != 0 {
    684 		err = errnoErr(e1)
    685 	}
    686 	return
    687 }
    688 
    689 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    690 
    691 func Getuid() (uid int) {
    692 	r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
    693 	uid = int(r0)
    694 	return
    695 }
    696 
    697 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    698 
    699 func Issetugid() (tainted bool) {
    700 	r0, _, _ := RawSyscall(SYS_ISSETUGID, 0, 0, 0)
    701 	tainted = bool(r0 != 0)
    702 	return
    703 }
    704 
    705 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    706 
    707 func Kqueue() (fd int, err error) {
    708 	r0, _, e1 := Syscall(SYS_KQUEUE, 0, 0, 0)
    709 	fd = int(r0)
    710 	if e1 != 0 {
    711 		err = errnoErr(e1)
    712 	}
    713 	return
    714 }
    715 
    716 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    717 
    718 func Lchown(path string, uid int, gid int) (err error) {
    719 	var _p0 *byte
    720 	_p0, err = BytePtrFromString(path)
    721 	if err != nil {
    722 		return
    723 	}
    724 	_, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
    725 	use(unsafe.Pointer(_p0))
    726 	if e1 != 0 {
    727 		err = errnoErr(e1)
    728 	}
    729 	return
    730 }
    731 
    732 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    733 
    734 func Link(path string, link string) (err error) {
    735 	var _p0 *byte
    736 	_p0, err = BytePtrFromString(path)
    737 	if err != nil {
    738 		return
    739 	}
    740 	var _p1 *byte
    741 	_p1, err = BytePtrFromString(link)
    742 	if err != nil {
    743 		return
    744 	}
    745 	_, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
    746 	use(unsafe.Pointer(_p0))
    747 	use(unsafe.Pointer(_p1))
    748 	if e1 != 0 {
    749 		err = errnoErr(e1)
    750 	}
    751 	return
    752 }
    753 
    754 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    755 
    756 func Listen(s int, backlog int) (err error) {
    757 	_, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0)
    758 	if e1 != 0 {
    759 		err = errnoErr(e1)
    760 	}
    761 	return
    762 }
    763 
    764 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    765 
    766 func Lstat(path string, stat *Stat_t) (err error) {
    767 	var _p0 *byte
    768 	_p0, err = BytePtrFromString(path)
    769 	if err != nil {
    770 		return
    771 	}
    772 	_, _, e1 := Syscall(SYS_LSTAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
    773 	use(unsafe.Pointer(_p0))
    774 	if e1 != 0 {
    775 		err = errnoErr(e1)
    776 	}
    777 	return
    778 }
    779 
    780 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    781 
    782 func Mkdir(path string, mode uint32) (err error) {
    783 	var _p0 *byte
    784 	_p0, err = BytePtrFromString(path)
    785 	if err != nil {
    786 		return
    787 	}
    788 	_, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
    789 	use(unsafe.Pointer(_p0))
    790 	if e1 != 0 {
    791 		err = errnoErr(e1)
    792 	}
    793 	return
    794 }
    795 
    796 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    797 
    798 func Mkfifo(path string, mode uint32) (err error) {
    799 	var _p0 *byte
    800 	_p0, err = BytePtrFromString(path)
    801 	if err != nil {
    802 		return
    803 	}
    804 	_, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
    805 	use(unsafe.Pointer(_p0))
    806 	if e1 != 0 {
    807 		err = errnoErr(e1)
    808 	}
    809 	return
    810 }
    811 
    812 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    813 
    814 func Mknod(path string, mode uint32, dev int) (err error) {
    815 	var _p0 *byte
    816 	_p0, err = BytePtrFromString(path)
    817 	if err != nil {
    818 		return
    819 	}
    820 	_, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
    821 	use(unsafe.Pointer(_p0))
    822 	if e1 != 0 {
    823 		err = errnoErr(e1)
    824 	}
    825 	return
    826 }
    827 
    828 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    829 
    830 func Mlock(b []byte) (err error) {
    831 	var _p0 unsafe.Pointer
    832 	if len(b) > 0 {
    833 		_p0 = unsafe.Pointer(&b[0])
    834 	} else {
    835 		_p0 = unsafe.Pointer(&_zero)
    836 	}
    837 	_, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
    838 	if e1 != 0 {
    839 		err = errnoErr(e1)
    840 	}
    841 	return
    842 }
    843 
    844 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    845 
    846 func Mlockall(flags int) (err error) {
    847 	_, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
    848 	if e1 != 0 {
    849 		err = errnoErr(e1)
    850 	}
    851 	return
    852 }
    853 
    854 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    855 
    856 func Mprotect(b []byte, prot int) (err error) {
    857 	var _p0 unsafe.Pointer
    858 	if len(b) > 0 {
    859 		_p0 = unsafe.Pointer(&b[0])
    860 	} else {
    861 		_p0 = unsafe.Pointer(&_zero)
    862 	}
    863 	_, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
    864 	if e1 != 0 {
    865 		err = errnoErr(e1)
    866 	}
    867 	return
    868 }
    869 
    870 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    871 
    872 func Munlock(b []byte) (err error) {
    873 	var _p0 unsafe.Pointer
    874 	if len(b) > 0 {
    875 		_p0 = unsafe.Pointer(&b[0])
    876 	} else {
    877 		_p0 = unsafe.Pointer(&_zero)
    878 	}
    879 	_, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
    880 	if e1 != 0 {
    881 		err = errnoErr(e1)
    882 	}
    883 	return
    884 }
    885 
    886 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    887 
    888 func Munlockall() (err error) {
    889 	_, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
    890 	if e1 != 0 {
    891 		err = errnoErr(e1)
    892 	}
    893 	return
    894 }
    895 
    896 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    897 
    898 func Open(path string, mode int, perm uint32) (fd int, err error) {
    899 	var _p0 *byte
    900 	_p0, err = BytePtrFromString(path)
    901 	if err != nil {
    902 		return
    903 	}
    904 	r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
    905 	use(unsafe.Pointer(_p0))
    906 	fd = int(r0)
    907 	if e1 != 0 {
    908 		err = errnoErr(e1)
    909 	}
    910 	return
    911 }
    912 
    913 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    914 
    915 func Pathconf(path string, name int) (val int, err error) {
    916 	var _p0 *byte
    917 	_p0, err = BytePtrFromString(path)
    918 	if err != nil {
    919 		return
    920 	}
    921 	r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)
    922 	use(unsafe.Pointer(_p0))
    923 	val = int(r0)
    924 	if e1 != 0 {
    925 		err = errnoErr(e1)
    926 	}
    927 	return
    928 }
    929 
    930 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    931 
    932 func Pread(fd int, p []byte, offset int64) (n int, err error) {
    933 	var _p0 unsafe.Pointer
    934 	if len(p) > 0 {
    935 		_p0 = unsafe.Pointer(&p[0])
    936 	} else {
    937 		_p0 = unsafe.Pointer(&_zero)
    938 	}
    939 	r0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0)
    940 	n = int(r0)
    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 Pwrite(fd int, p []byte, offset int64) (n int, err error) {
    950 	var _p0 unsafe.Pointer
    951 	if len(p) > 0 {
    952 		_p0 = unsafe.Pointer(&p[0])
    953 	} else {
    954 		_p0 = unsafe.Pointer(&_zero)
    955 	}
    956 	r0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0)
    957 	n = int(r0)
    958 	if e1 != 0 {
    959 		err = errnoErr(e1)
    960 	}
    961 	return
    962 }
    963 
    964 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    965 
    966 func read(fd int, p []byte) (n int, err error) {
    967 	var _p0 unsafe.Pointer
    968 	if len(p) > 0 {
    969 		_p0 = unsafe.Pointer(&p[0])
    970 	} else {
    971 		_p0 = unsafe.Pointer(&_zero)
    972 	}
    973 	r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
    974 	n = int(r0)
    975 	if e1 != 0 {
    976 		err = errnoErr(e1)
    977 	}
    978 	return
    979 }
    980 
    981 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    982 
    983 func Readlink(path string, buf []byte) (n int, err error) {
    984 	var _p0 *byte
    985 	_p0, err = BytePtrFromString(path)
    986 	if err != nil {
    987 		return
    988 	}
    989 	var _p1 unsafe.Pointer
    990 	if len(buf) > 0 {
    991 		_p1 = unsafe.Pointer(&buf[0])
    992 	} else {
    993 		_p1 = unsafe.Pointer(&_zero)
    994 	}
    995 	r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))
    996 	use(unsafe.Pointer(_p0))
    997 	n = int(r0)
    998 	if e1 != 0 {
    999 		err = errnoErr(e1)
   1000 	}
   1001 	return
   1002 }
   1003 
   1004 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   1005 
   1006 func Rename(from string, to string) (err error) {
   1007 	var _p0 *byte
   1008 	_p0, err = BytePtrFromString(from)
   1009 	if err != nil {
   1010 		return
   1011 	}
   1012 	var _p1 *byte
   1013 	_p1, err = BytePtrFromString(to)
   1014 	if err != nil {
   1015 		return
   1016 	}
   1017 	_, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
   1018 	use(unsafe.Pointer(_p0))
   1019 	use(unsafe.Pointer(_p1))
   1020 	if e1 != 0 {
   1021 		err = errnoErr(e1)
   1022 	}
   1023 	return
   1024 }
   1025 
   1026 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   1027 
   1028 func Revoke(path string) (err error) {
   1029 	var _p0 *byte
   1030 	_p0, err = BytePtrFromString(path)
   1031 	if err != nil {
   1032 		return
   1033 	}
   1034 	_, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0)
   1035 	use(unsafe.Pointer(_p0))
   1036 	if e1 != 0 {
   1037 		err = errnoErr(e1)
   1038 	}
   1039 	return
   1040 }
   1041 
   1042 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   1043 
   1044 func Rmdir(path string) (err error) {
   1045 	var _p0 *byte
   1046 	_p0, err = BytePtrFromString(path)
   1047 	if err != nil {
   1048 		return
   1049 	}
   1050 	_, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
   1051 	use(unsafe.Pointer(_p0))
   1052 	if e1 != 0 {
   1053 		err = errnoErr(e1)
   1054 	}
   1055 	return
   1056 }
   1057 
   1058 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   1059 
   1060 func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
   1061 	r0, r1, e1 := Syscall6(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(offset>>32), uintptr(whence), 0, 0)
   1062 	newoffset = int64(int64(r1)<<32 | int64(r0))
   1063 	if e1 != 0 {
   1064 		err = errnoErr(e1)
   1065 	}
   1066 	return
   1067 }
   1068 
   1069 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   1070 
   1071 func Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) {
   1072 	_, _, e1 := Syscall6(SYS_SELECT, uintptr(n), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
   1073 	if e1 != 0 {
   1074 		err = errnoErr(e1)
   1075 	}
   1076 	return
   1077 }
   1078 
   1079 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   1080 
   1081 func Setegid(egid int) (err error) {
   1082 	_, _, e1 := Syscall(SYS_SETEGID, uintptr(egid), 0, 0)
   1083 	if e1 != 0 {
   1084 		err = errnoErr(e1)
   1085 	}
   1086 	return
   1087 }
   1088 
   1089 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   1090 
   1091 func Seteuid(euid int) (err error) {
   1092 	_, _, e1 := RawSyscall(SYS_SETEUID, uintptr(euid), 0, 0)
   1093 	if e1 != 0 {
   1094 		err = errnoErr(e1)
   1095 	}
   1096 	return
   1097 }
   1098 
   1099 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   1100 
   1101 func Setgid(gid int) (err error) {
   1102 	_, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 0, 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 Setlogin(name string) (err error) {
   1112 	var _p0 *byte
   1113 	_p0, err = BytePtrFromString(name)
   1114 	if err != nil {
   1115 		return
   1116 	}
   1117 	_, _, e1 := Syscall(SYS_SETLOGIN, uintptr(unsafe.Pointer(_p0)), 0, 0)
   1118 	use(unsafe.Pointer(_p0))
   1119 	if e1 != 0 {
   1120 		err = errnoErr(e1)
   1121 	}
   1122 	return
   1123 }
   1124 
   1125 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   1126 
   1127 func Setpgid(pid int, pgid int) (err error) {
   1128 	_, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
   1129 	if e1 != 0 {
   1130 		err = errnoErr(e1)
   1131 	}
   1132 	return
   1133 }
   1134 
   1135 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   1136 
   1137 func Setpriority(which int, who int, prio int) (err error) {
   1138 	_, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
   1139 	if e1 != 0 {
   1140 		err = errnoErr(e1)
   1141 	}
   1142 	return
   1143 }
   1144 
   1145 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   1146 
   1147 func Setprivexec(flag int) (err error) {
   1148 	_, _, e1 := Syscall(SYS_SETPRIVEXEC, uintptr(flag), 0, 0)
   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 Setregid(rgid int, egid int) (err error) {
   1158 	_, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
   1159 	if e1 != 0 {
   1160 		err = errnoErr(e1)
   1161 	}
   1162 	return
   1163 }
   1164 
   1165 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   1166 
   1167 func Setreuid(ruid int, euid int) (err error) {
   1168 	_, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
   1169 	if e1 != 0 {
   1170 		err = errnoErr(e1)
   1171 	}
   1172 	return
   1173 }
   1174 
   1175 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   1176 
   1177 func Setrlimit(which int, lim *Rlimit) (err error) {
   1178 	_, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
   1179 	if e1 != 0 {
   1180 		err = errnoErr(e1)
   1181 	}
   1182 	return
   1183 }
   1184 
   1185 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   1186 
   1187 func Setsid() (pid int, err error) {
   1188 	r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
   1189 	pid = int(r0)
   1190 	if e1 != 0 {
   1191 		err = errnoErr(e1)
   1192 	}
   1193 	return
   1194 }
   1195 
   1196 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   1197 
   1198 func Settimeofday(tp *Timeval) (err error) {
   1199 	_, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
   1200 	if e1 != 0 {
   1201 		err = errnoErr(e1)
   1202 	}
   1203 	return
   1204 }
   1205 
   1206 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   1207 
   1208 func Setuid(uid int) (err error) {
   1209 	_, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0)
   1210 	if e1 != 0 {
   1211 		err = errnoErr(e1)
   1212 	}
   1213 	return
   1214 }
   1215 
   1216 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   1217 
   1218 func Stat(path string, stat *Stat_t) (err error) {
   1219 	var _p0 *byte
   1220 	_p0, err = BytePtrFromString(path)
   1221 	if err != nil {
   1222 		return
   1223 	}
   1224 	_, _, e1 := Syscall(SYS_STAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
   1225 	use(unsafe.Pointer(_p0))
   1226 	if e1 != 0 {
   1227 		err = errnoErr(e1)
   1228 	}
   1229 	return
   1230 }
   1231 
   1232 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   1233 
   1234 func Statfs(path string, stat *Statfs_t) (err error) {
   1235 	var _p0 *byte
   1236 	_p0, err = BytePtrFromString(path)
   1237 	if err != nil {
   1238 		return
   1239 	}
   1240 	_, _, e1 := Syscall(SYS_STATFS64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
   1241 	use(unsafe.Pointer(_p0))
   1242 	if e1 != 0 {
   1243 		err = errnoErr(e1)
   1244 	}
   1245 	return
   1246 }
   1247 
   1248 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   1249 
   1250 func Symlink(path string, link string) (err error) {
   1251 	var _p0 *byte
   1252 	_p0, err = BytePtrFromString(path)
   1253 	if err != nil {
   1254 		return
   1255 	}
   1256 	var _p1 *byte
   1257 	_p1, err = BytePtrFromString(link)
   1258 	if err != nil {
   1259 		return
   1260 	}
   1261 	_, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
   1262 	use(unsafe.Pointer(_p0))
   1263 	use(unsafe.Pointer(_p1))
   1264 	if e1 != 0 {
   1265 		err = errnoErr(e1)
   1266 	}
   1267 	return
   1268 }
   1269 
   1270 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   1271 
   1272 func Sync() (err error) {
   1273 	_, _, e1 := Syscall(SYS_SYNC, 0, 0, 0)
   1274 	if e1 != 0 {
   1275 		err = errnoErr(e1)
   1276 	}
   1277 	return
   1278 }
   1279 
   1280 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   1281 
   1282 func Truncate(path string, length int64) (err error) {
   1283 	var _p0 *byte
   1284 	_p0, err = BytePtrFromString(path)
   1285 	if err != nil {
   1286 		return
   1287 	}
   1288 	_, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), uintptr(length>>32))
   1289 	use(unsafe.Pointer(_p0))
   1290 	if e1 != 0 {
   1291 		err = errnoErr(e1)
   1292 	}
   1293 	return
   1294 }
   1295 
   1296 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   1297 
   1298 func Umask(newmask int) (oldmask int) {
   1299 	r0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0)
   1300 	oldmask = int(r0)
   1301 	return
   1302 }
   1303 
   1304 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   1305 
   1306 func Undelete(path string) (err error) {
   1307 	var _p0 *byte
   1308 	_p0, err = BytePtrFromString(path)
   1309 	if err != nil {
   1310 		return
   1311 	}
   1312 	_, _, e1 := Syscall(SYS_UNDELETE, uintptr(unsafe.Pointer(_p0)), 0, 0)
   1313 	use(unsafe.Pointer(_p0))
   1314 	if e1 != 0 {
   1315 		err = errnoErr(e1)
   1316 	}
   1317 	return
   1318 }
   1319 
   1320 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   1321 
   1322 func Unlink(path string) (err error) {
   1323 	var _p0 *byte
   1324 	_p0, err = BytePtrFromString(path)
   1325 	if err != nil {
   1326 		return
   1327 	}
   1328 	_, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0)
   1329 	use(unsafe.Pointer(_p0))
   1330 	if e1 != 0 {
   1331 		err = errnoErr(e1)
   1332 	}
   1333 	return
   1334 }
   1335 
   1336 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   1337 
   1338 func Unmount(path string, flags int) (err error) {
   1339 	var _p0 *byte
   1340 	_p0, err = BytePtrFromString(path)
   1341 	if err != nil {
   1342 		return
   1343 	}
   1344 	_, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
   1345 	use(unsafe.Pointer(_p0))
   1346 	if e1 != 0 {
   1347 		err = errnoErr(e1)
   1348 	}
   1349 	return
   1350 }
   1351 
   1352 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   1353 
   1354 func write(fd int, p []byte) (n int, err error) {
   1355 	var _p0 unsafe.Pointer
   1356 	if len(p) > 0 {
   1357 		_p0 = unsafe.Pointer(&p[0])
   1358 	} else {
   1359 		_p0 = unsafe.Pointer(&_zero)
   1360 	}
   1361 	r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
   1362 	n = int(r0)
   1363 	if e1 != 0 {
   1364 		err = errnoErr(e1)
   1365 	}
   1366 	return
   1367 }
   1368 
   1369 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   1370 
   1371 func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {
   1372 	r0, _, e1 := Syscall9(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos), uintptr(pos>>32), 0, 0)
   1373 	ret = uintptr(r0)
   1374 	if e1 != 0 {
   1375 		err = errnoErr(e1)
   1376 	}
   1377 	return
   1378 }
   1379 
   1380 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   1381 
   1382 func munmap(addr uintptr, length uintptr) (err error) {
   1383 	_, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
   1384 	if e1 != 0 {
   1385 		err = errnoErr(e1)
   1386 	}
   1387 	return
   1388 }
   1389 
   1390 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   1391 
   1392 func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
   1393 	r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
   1394 	n = int(r0)
   1395 	if e1 != 0 {
   1396 		err = errnoErr(e1)
   1397 	}
   1398 	return
   1399 }
   1400 
   1401 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   1402 
   1403 func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
   1404 	r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
   1405 	n = int(r0)
   1406 	if e1 != 0 {
   1407 		err = errnoErr(e1)
   1408 	}
   1409 	return
   1410 }
   1411 
   1412 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   1413 
   1414 func gettimeofday(tp *Timeval) (sec int32, usec int32, err error) {
   1415 	r0, r1, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
   1416 	sec = int32(r0)
   1417 	usec = int32(r1)
   1418 	if e1 != 0 {
   1419 		err = errnoErr(e1)
   1420 	}
   1421 	return
   1422 }
   1423