diff --git a/core/thread/thread_unix.odin b/core/thread/thread_unix.odin index 5c935bbe6..285b1fee9 100644 --- a/core/thread/thread_unix.odin +++ b/core/thread/thread_unix.odin @@ -190,8 +190,11 @@ _get_name :: proc(thread: ^Thread, allocator: runtime.Allocator, loc: runtime.So } tid : posix.pthread_t - if thread == nil do tid = transmute(posix.pthread_t)sync.current_thread_id() - else do tid = thread.unix_thread + if thread == nil { + tid = transmute(posix.pthread_t)sync.current_thread_id() + } else { + tid = thread.unix_thread + } buf := make([]u8, _MAX_PTHREAD_NAME_LENGTH, allocator, loc) or_return @@ -214,8 +217,11 @@ _set_name :: proc(thread: ^Thread, name:string) { if thread != nil do return } else { tid: posix.pthread_t - if thread == nil do tid = transmute(posix.pthread_t)sync.current_thread_id - else do tid = t.unix_thread + if thread == nil { + tid = transmute(posix.pthread_t)sync.current_thread_id + } else { + tid = t.unix_thread + } } buf : [_MAX_PTHREAD_NAME_LENGTH]u8 diff --git a/core/thread/thread_windows.odin b/core/thread/thread_windows.odin index 1609043dd..e73bb30c7 100644 --- a/core/thread/thread_windows.odin +++ b/core/thread/thread_windows.odin @@ -157,8 +157,11 @@ _yield :: proc() { _get_name :: proc(thread: ^Thread, allocator: runtime.Allocator, loc : runtime.Source_Code_Location) -> (name:string, err:runtime.Allocator_Error) { t_handle : win32.HANDLE - if thread == nil do t_handle = win32.GetCurrentThread() - else do t_handle = t.win32_thread + if thread == nil { + t_handle = win32.GetCurrentThread() + } else { + t_handle = t.win32_thread + } buf_8 : [_THREAD_DESCRIPTION_LENGTH * 2]u8 buf_16 : [_THREAD_DESCRIPTION_LENGTH]u16 @@ -175,8 +178,11 @@ _get_name :: proc(thread: ^Thread, allocator: runtime.Allocator, loc : runtime.S _set_name :: proc(thread: ^Thread, name: string) { t_handle : win32.HANDLE - if thread == nil do t_handle = win32.GetCurrentThread() - else do t_handle = t.win32_thread + if thread == nil { + t_handle = win32.GetCurrentThread() + } else { + t_handle = t.win32_thread + } buf : [_THREAD_DESCRIPTION_LENGTH]u16 utf16.encode_string(buf_16[:], name)