From 9da144157eca6519dcc5fc254bf2471908a9a770 Mon Sep 17 00:00:00 2001 From: flysand7 Date: Thu, 16 Jan 2025 19:33:09 +0300 Subject: [PATCH] [sync]: Fix typos in comments and remove my note. --- core/sync/futex_linux.odin | 3 --- core/sync/futex_windows.odin | 4 ++-- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/core/sync/futex_linux.odin b/core/sync/futex_linux.odin index 52143880b..2f4b5af72 100644 --- a/core/sync/futex_linux.odin +++ b/core/sync/futex_linux.odin @@ -49,9 +49,6 @@ _futex_signal :: proc "contextless" (futex: ^Futex) { } _futex_broadcast :: proc "contextless" (futex: ^Futex) { - // NOTE(flysand): This code was kinda funny and I don't want to remove it, but here I will - // record history of what has been in here before - // FUTEX_WAKE_PRIVATE | FUTEX_WAKE _, errno := linux.futex(cast(^linux.Futex) futex, linux.FUTEX_WAKE, {.PRIVATE}, max(i32)) #partial switch errno { case .NONE: diff --git a/core/sync/futex_windows.odin b/core/sync/futex_windows.odin index bb9686a1a..927e6781e 100644 --- a/core/sync/futex_windows.odin +++ b/core/sync/futex_windows.odin @@ -26,7 +26,7 @@ foreign Ntdll { BUT requires taking the return value of it and if it is non-zero converting that status to a DOS error and then SetLastError If this is not done, then things don't work as expected when - and error occurs + an error occurs GODDAMN MICROSOFT! */ @@ -46,7 +46,7 @@ _futex_wait :: proc "contextless" (f: ^Futex, expect: u32) -> bool { _futex_wait_with_timeout :: proc "contextless" (f: ^Futex, expect: u32, duration: time.Duration) -> bool { expect := expect - // NOTE(bill): for some bizarre reason, this has be a negative number + // NOTE(bill): for some bizarre reason, this has to be a negative number timeout := -i64(duration / 100) return CustomWaitOnAddress(f, &expect, size_of(expect), &timeout) }