unix: add cgroupstats type and constants
The cgroupstats structure is available via Linux's generic netlink
taskstats interface.
For more information, please see:
https://www.kernel.org/doc/Documentation/accounting/cgroupstats.txt.
Fixes golang/go#23388.
Change-Id: I8a05a3875209e99a427d54049eacc98f415e44cf
Reviewed-on: https://go-review.googlesource.com/86975
Run-TryBot: Matt Layher <mdlayher@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
diff --git a/unix/ztypes_linux_mipsle.go b/unix/ztypes_linux_mipsle.go
index 0a65636..dff3f1f 100644
--- a/unix/ztypes_linux_mipsle.go
+++ b/unix/ztypes_linux_mipsle.go
@@ -754,6 +754,24 @@
TASKSTATS_CMD_ATTR_DEREGISTER_CPUMASK = 0x4
)
+type CGroupStats struct {
+ Sleeping uint64
+ Running uint64
+ Stopped uint64
+ Uninterruptible uint64
+ Io_wait uint64
+}
+
+const (
+ CGROUPSTATS_CMD_UNSPEC = 0x3
+ CGROUPSTATS_CMD_GET = 0x4
+ CGROUPSTATS_CMD_NEW = 0x5
+ CGROUPSTATS_TYPE_UNSPEC = 0x0
+ CGROUPSTATS_TYPE_CGROUP_STATS = 0x1
+ CGROUPSTATS_CMD_ATTR_UNSPEC = 0x0
+ CGROUPSTATS_CMD_ATTR_FD = 0x1
+)
+
type Genlmsghdr struct {
Cmd uint8
Version uint8