unix: add SI_LOAD_SHIFT on Linux

This is used to convert the loadavg values read using Sysinfo into
float.

Change-Id: I3866c17c908a463373db89690152acc720c73ef3
Reviewed-on: https://go-review.googlesource.com/c/sys/+/246897
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Matt Layher <mdlayher@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
Tobias Klauser
2020-08-05 15:36:00 +02:00
committed by Tobias Klauser
parent 0cf7623e9d
commit fcf3340312
2 changed files with 4 additions and 0 deletions

View File

@@ -815,6 +815,8 @@ type FdSet C.fd_set
type Sysinfo_t C.struct_sysinfo
const SI_LOAD_SHIFT = C.SI_LOAD_SHIFT
type Utsname C.struct_utsname
type Ustat_t C.struct_ustat

View File

@@ -673,6 +673,8 @@ type InotifyEvent struct {
const SizeofInotifyEvent = 0x10
const SI_LOAD_SHIFT = 0x10
type Utsname struct {
Sysname [65]byte
Nodename [65]byte