Initial commit
This commit is contained in:
17
vendor/github.com/shirou/gopsutil/load/load_openbsd.go
generated
vendored
Normal file
17
vendor/github.com/shirou/gopsutil/load/load_openbsd.go
generated
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
// +build openbsd
|
||||
|
||||
package load
|
||||
|
||||
import (
|
||||
"unsafe"
|
||||
|
||||
"golang.org/x/sys/unix"
|
||||
)
|
||||
|
||||
func getForkStat() (forkstat, error) {
|
||||
b, err := unix.SysctlRaw("kern.forkstat")
|
||||
if err != nil {
|
||||
return forkstat{}, err
|
||||
}
|
||||
return *(*forkstat)(unsafe.Pointer((&b[0]))), nil
|
||||
}
|
||||
Reference in New Issue
Block a user