From a78cef0ed7ce15583424f5873f0aa6fdad1d5c2f Mon Sep 17 00:00:00 2001 From: Jing Chen Date: Thu, 3 Dec 2020 19:55:20 -0800 Subject: Implement command IPC_INFO for semctl. PiperOrigin-RevId: 345589628 --- pkg/abi/linux/sem.go | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'pkg/abi') diff --git a/pkg/abi/linux/sem.go b/pkg/abi/linux/sem.go index 167d2ff74..0adff8dff 100644 --- a/pkg/abi/linux/sem.go +++ b/pkg/abi/linux/sem.go @@ -41,6 +41,12 @@ const ( SEMMNS = SEMMNI * SEMMSL SEMOPM = 500 SEMVMX = 32767 + SEMAEM = SEMVMX + + // followings are unused in kernel + SEMUME = SEMOPM + SEMMNU = SEMMNS + SEMMAP = SEMMNS ) const SEM_UNDO = 0x1000 @@ -53,3 +59,21 @@ type Sembuf struct { SemOp int16 SemFlg int16 } + +// SemInfo is equivalent to struct seminfo. +// +// Source: include/uapi/linux/sem.h +// +// +marshal +type SemInfo struct { + SemMap uint32 + SemMni uint32 + SemMns uint32 + SemMnu uint32 + SemMsl uint32 + SemOpm uint32 + SemUme uint32 + SemUsz uint32 + SemVmx uint32 + SemAem uint32 +} -- cgit v1.2.3