summaryrefslogtreecommitdiffhomepage
path: root/pkg/abi
diff options
context:
space:
mode:
authorNicolas Lacasse <nlacasse@google.com>2020-07-23 17:40:46 -0700
committergVisor bot <gvisor-bot@google.com>2020-07-23 17:42:50 -0700
commit4ec351633206fdbd191bc3aef29a007925a731cc (patch)
treeef71fa86a6d319145a268e0c8e461b8dbef7ca0e /pkg/abi
parent5e34ee68c93888eba3d56a2b713dbeebf406efa3 (diff)
Implement get/set_robust_list.
PiperOrigin-RevId: 322904430
Diffstat (limited to 'pkg/abi')
-rw-r--r--pkg/abi/linux/futex.go18
1 files changed, 18 insertions, 0 deletions
diff --git a/pkg/abi/linux/futex.go b/pkg/abi/linux/futex.go
index 08bfde3b5..8138088a6 100644
--- a/pkg/abi/linux/futex.go
+++ b/pkg/abi/linux/futex.go
@@ -60,3 +60,21 @@ const (
FUTEX_WAITERS = 0x80000000
FUTEX_OWNER_DIED = 0x40000000
)
+
+// FUTEX_BITSET_MATCH_ANY has all bits set.
+const FUTEX_BITSET_MATCH_ANY = 0xffffffff
+
+// ROBUST_LIST_LIMIT protects against a deliberately circular list.
+const ROBUST_LIST_LIMIT = 2048
+
+// RobustListHead corresponds to Linux's struct robust_list_head.
+//
+// +marshal
+type RobustListHead struct {
+ List uint64
+ FutexOffset uint64
+ ListOpPending uint64
+}
+
+// SizeOfRobustListHead is the size of a RobustListHead struct.
+var SizeOfRobustListHead = (*RobustListHead)(nil).SizeBytes()