aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2024-05-24 11:41:56 +0100
committergingerBill <bill@gingerbill.org>2024-05-24 11:41:56 +0100
commit1081e9ac09816601b7cc055a7d677b5d928f16a7 (patch)
tree72489d3ff56dc542f897e597061fe5cdfdcef36b
parent7dc1f114b96b9e25dfc2537ab153fe655e65affc (diff)
Fix enum definition for `bit_set` use
-rw-r--r--core/sys/darwin/sync.odin14
1 files changed, 4 insertions, 10 deletions
diff --git a/core/sys/darwin/sync.odin b/core/sys/darwin/sync.odin
index 361b4b8b4..d3f8bf979 100644
--- a/core/sys/darwin/sync.odin
+++ b/core/sys/darwin/sync.odin
@@ -17,9 +17,6 @@ when ODIN_OS == .Darwin {
}
os_sync_wait_on_address_flag :: enum u32 {
- // This flag should be used as a default flag when no other flags listed below are required.
- NONE,
-
// This flag should be used when synchronizing among multiple processes by
// placing the @addr passed to os_sync_wait_on_address and its variants
// in a shared memory region.
@@ -31,15 +28,12 @@ os_sync_wait_on_address_flag :: enum u32 {
// This flag should not be used when synchronizing among multiple threads of
// a single process. It allows the kernel to perform performance optimizations
// as the @addr is local to the calling process.
- SHARED,
+ SHARED = 0,
}
-os_sync_wait_on_address_flags :: bit_set[os_sync_wait_on_address_flag; u32]
+os_sync_wait_on_address_flags :: distinct bit_set[os_sync_wait_on_address_flag; u32]
os_sync_wake_by_address_flag :: enum u32 {
- // This flag should be used as a default flag when no other flags listed below are required.
- NONE,
-
// This flag should be used when synchronizing among multiple processes by
// placing the @addr passed to os_sync_wake_by_address_any and its variants
// in a shared memory region.
@@ -51,10 +45,10 @@ os_sync_wake_by_address_flag :: enum u32 {
// This flag should not be used when synchronizing among multiple threads of
// a single process. It allows the kernel to perform performance optimizations
// as the @addr is local the calling process.
- SHARED,
+ SHARED = 0,
}
-os_sync_wake_by_address_flags :: bit_set[os_sync_wake_by_address_flag; u32]
+os_sync_wake_by_address_flags :: distinct bit_set[os_sync_wake_by_address_flag; u32]
os_clockid :: enum u32 {
MACH_ABSOLUTE_TIME = 32,