summaryrefslogtreecommitdiffhomepage
path: root/pkg/abi/linux/sem.go
diff options
context:
space:
mode:
authorJing Chen <chjing@google.com>2020-12-03 19:55:20 -0800
committergVisor bot <gvisor-bot@google.com>2020-12-03 19:57:51 -0800
commita78cef0ed7ce15583424f5873f0aa6fdad1d5c2f (patch)
treec6a09e9fbbbbaea63f68bde1a9ef0a698a7b7ae3 /pkg/abi/linux/sem.go
parent9eb77281c4fe1c1f252a0df67ca2c1fee8867b80 (diff)
Implement command IPC_INFO for semctl.
PiperOrigin-RevId: 345589628
Diffstat (limited to 'pkg/abi/linux/sem.go')
-rw-r--r--pkg/abi/linux/sem.go24
1 files changed, 24 insertions, 0 deletions
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
+}