diff options
| author | Laytan <laytanlaats@hotmail.com> | 2024-10-13 20:00:06 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-10-13 20:00:06 +0200 |
| commit | 591f827e5f5d5bef5953b84f77be1631e088a00a (patch) | |
| tree | 920ae1bb3146859afe30754734cd4733139516f7 /core/sys | |
| parent | 55ff1769d0591c3b26ddba746e5f6c6dba1ff286 (diff) | |
| parent | e240c034deeb0d9048791c5cff3a8fb9dc6b4adb (diff) | |
Merge pull request #4371 from beaumccartney/mach-enum-member-aliases
mach darwin: enum member aliases are other enum members, not constants
Diffstat (limited to 'core/sys')
| -rw-r--r-- | core/sys/darwin/mach_darwin.odin | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/core/sys/darwin/mach_darwin.odin b/core/sys/darwin/mach_darwin.odin index 2d82a0fe6..2cc823e69 100644 --- a/core/sys/darwin/mach_darwin.odin +++ b/core/sys/darwin/mach_darwin.odin @@ -421,6 +421,8 @@ VM_Flag :: enum c.int { Alias_Mask6, Alias_Mask7, Alias_Mask8, + + HW = TPRO, } VM_Flags :: distinct bit_set[VM_Flag; c.int] @@ -455,9 +457,6 @@ VM_GET_FLAGS_ALIAS :: proc(flags: VM_Flags) -> c.int { // NOTE(beau): no need for VM_SET_FLAGS_ALIAS, just mask in things from // VM_Flag.Alias_Mask* -VM_FLAG_HW :: VM_Flag.TPRO -VM_FLAGS_HW :: VM_Flags{VM_FLAG_HW} - /* These are the flags that we accept from user-space */ VM_FLAGS_USER_ALLOCATE :: VM_Flags { .Anywhere, @@ -467,7 +466,7 @@ VM_FLAGS_USER_ALLOCATE :: VM_Flags { .No_Cache, .Permanent, .Overwrite, -} | VM_FLAGS_FIXED | VM_FLAGS_SUPERPAGE_MASK | VM_FLAGS_ALIAS_MASK | VM_FLAGS_HW +} | VM_FLAGS_FIXED | VM_FLAGS_SUPERPAGE_MASK | VM_FLAGS_ALIAS_MASK VM_FLAGS_USER_MAP :: VM_Flags { .Return_4K_Data_Addr, @@ -510,16 +509,16 @@ VM_Inherit :: enum vm_inherit_t { Copy, None, Donate_Copy, -} -VM_INHERIT_DEFAULT :: VM_Inherit.Copy -VM_INHERIT_LAST_VALID :: VM_Inherit.None + Default = Copy, + Last_Valid = None, +} Sync_Policy :: enum sync_policy_t { Fifo, Fixed_Priority, Reversed, Order_Mask, -} -SYNC_POLICY_LIFO :: Sync_Policy.Fifo | Sync_Policy.Reversed + Lifo = Fifo | Reversed, +} |