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