1// Copyright 2022 The Go Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style
3// license that can be found in the LICENSE file.
4
5//go:build freebsd && (amd64 || arm64 || riscv64)
6
7package os
8
9import (
10	"syscall"
11	"unsafe"
12)
13
14const _P_PID = 0
15
16func wait6(idtype, id, options int) (status int, errno syscall.Errno) {
17	var status32 int32 // C.int
18	_, _, errno = syscall.Syscall6(syscall.SYS_WAIT6, uintptr(idtype), uintptr(id), uintptr(unsafe.Pointer(&status32)), uintptr(options), 0, 0)
19	return int(status32), errno
20}
21