Browse Source

Clarify what `umtx` is

Feoramund 1 year ago
parent
commit
3f9ddfe029
2 changed files with 2 additions and 2 deletions
  1. 1 1
      core/sys/freebsd/syscalls.odin
  2. 1 1
      core/sys/freebsd/types.odin

+ 1 - 1
core/sys/freebsd/syscalls.odin

@@ -450,7 +450,7 @@ sysctl :: proc "contextless" (mib: []MIB_Identifier, oldp: rawptr, oldlenp: ^c.s
 // The _umtx_op() system call is non-standard and is used by the 1:1 Threading
 // The _umtx_op() system call is non-standard and is used by the 1:1 Threading
 // Library (libthr, -lthr) to implement IEEE Std 1003.1-2001 (“POSIX.1”)
 // Library (libthr, -lthr) to implement IEEE Std 1003.1-2001 (“POSIX.1”)
 // pthread(3) functionality.
 // pthread(3) functionality.
-_umtx_op :: proc "contextless" (obj: rawptr, op: Mutex_Operation, val: c.ulong, uaddr, uaddr2: rawptr) -> Errno {
+_umtx_op :: proc "contextless" (obj: rawptr, op: Userland_Mutex_Operation, val: c.ulong, uaddr, uaddr2: rawptr) -> Errno {
 	result, _ := intrinsics.syscall_bsd(SYS__umtx_op,
 	result, _ := intrinsics.syscall_bsd(SYS__umtx_op,
 		cast(uintptr)obj,
 		cast(uintptr)obj,
 		cast(uintptr)op,
 		cast(uintptr)op,

+ 1 - 1
core/sys/freebsd/types.odin

@@ -1546,7 +1546,7 @@ Socket_Address_Internet6 :: struct #packed {
 
 
 /* op code for _umtx_op */
 /* op code for _umtx_op */
 // #define UMTX_OP_*
 // #define UMTX_OP_*
-Mutex_Operation :: enum c.int {
+Userland_Mutex_Operation :: enum c.int {
 	LOCK              = 0,  /* COMPAT10 */
 	LOCK              = 0,  /* COMPAT10 */
 	UNLOCK            = 1,  /* COMPAT10 */
 	UNLOCK            = 1,  /* COMPAT10 */
 	WAIT              = 2,
 	WAIT              = 2,