1 // go run mksyscall.go -tags freebsd,arm64 -- syscall_bsd.go syscall_freebsd.go syscall_freebsd_arm64.go |
1 // go run mksyscall.go -tags freebsd,arm64 syscall_bsd.go syscall_freebsd.go syscall_freebsd_arm64.go |
2 // Code generated by the command above; see README.md. DO NOT EDIT. |
2 // Code generated by the command above; see README.md. DO NOT EDIT. |
3 |
3 |
|
4 //go:build freebsd && arm64 |
4 // +build freebsd,arm64 |
5 // +build freebsd,arm64 |
5 |
6 |
6 package unix |
7 package unix |
7 |
8 |
8 import ( |
9 import ( |
348 return |
349 return |
349 } |
350 } |
350 |
351 |
351 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
352 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
352 |
353 |
|
354 func pipe2(p *[2]_C_int, flags int) (err error) { |
|
355 _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0) |
|
356 if e1 != 0 { |
|
357 err = errnoErr(e1) |
|
358 } |
|
359 return |
|
360 } |
|
361 |
|
362 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
|
363 |
|
364 func Getcwd(buf []byte) (n int, err error) { |
|
365 var _p0 unsafe.Pointer |
|
366 if len(buf) > 0 { |
|
367 _p0 = unsafe.Pointer(&buf[0]) |
|
368 } else { |
|
369 _p0 = unsafe.Pointer(&_zero) |
|
370 } |
|
371 r0, _, e1 := Syscall(SYS___GETCWD, uintptr(_p0), uintptr(len(buf)), 0) |
|
372 n = int(r0) |
|
373 if e1 != 0 { |
|
374 err = errnoErr(e1) |
|
375 } |
|
376 return |
|
377 } |
|
378 |
|
379 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
|
380 |
|
381 func ioctl(fd int, req uint, arg uintptr) (err error) { |
|
382 _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg)) |
|
383 if e1 != 0 { |
|
384 err = errnoErr(e1) |
|
385 } |
|
386 return |
|
387 } |
|
388 |
|
389 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
|
390 |
353 func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) { |
391 func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) { |
354 var _p0 unsafe.Pointer |
392 var _p0 unsafe.Pointer |
355 if len(mib) > 0 { |
393 if len(mib) > 0 { |
356 _p0 = unsafe.Pointer(&mib[0]) |
394 _p0 = unsafe.Pointer(&mib[0]) |
357 } else { |
395 } else { |
364 return |
402 return |
365 } |
403 } |
366 |
404 |
367 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
405 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
368 |
406 |
369 func pipe2(p *[2]_C_int, flags int) (err error) { |
|
370 _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0) |
|
371 if e1 != 0 { |
|
372 err = errnoErr(e1) |
|
373 } |
|
374 return |
|
375 } |
|
376 |
|
377 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
|
378 |
|
379 func Getcwd(buf []byte) (n int, err error) { |
|
380 var _p0 unsafe.Pointer |
|
381 if len(buf) > 0 { |
|
382 _p0 = unsafe.Pointer(&buf[0]) |
|
383 } else { |
|
384 _p0 = unsafe.Pointer(&_zero) |
|
385 } |
|
386 r0, _, e1 := Syscall(SYS___GETCWD, uintptr(_p0), uintptr(len(buf)), 0) |
|
387 n = int(r0) |
|
388 if e1 != 0 { |
|
389 err = errnoErr(e1) |
|
390 } |
|
391 return |
|
392 } |
|
393 |
|
394 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
|
395 |
|
396 func ioctl(fd int, req uint, arg uintptr) (err error) { |
|
397 _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg)) |
|
398 if e1 != 0 { |
|
399 err = errnoErr(e1) |
|
400 } |
|
401 return |
|
402 } |
|
403 |
|
404 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
|
405 |
|
406 func ptrace(request int, pid int, addr uintptr, data int) (err error) { |
407 func ptrace(request int, pid int, addr uintptr, data int) (err error) { |
407 _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0) |
408 _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0) |
408 if e1 != 0 { |
409 if e1 != 0 { |
409 err = errnoErr(e1) |
410 err = errnoErr(e1) |
410 } |
411 } |