aboutsummaryrefslogtreecommitdiff
path: root/core/thread
diff options
context:
space:
mode:
authorhikari <ftphikari@gmail.com>2023-06-07 20:03:19 +0300
committerhikari <ftphikari@gmail.com>2023-06-07 20:03:19 +0300
commit7b62b81ebd731a03db919f1df24aee4d37bb2c1d (patch)
treead81e7cf322a6cf295db183863790c97d3dc91cf /core/thread
parentdcf4e51787119d8dcf86ca0195d3a07aea6d47a8 (diff)
[core:thread] Fix compilation
Diffstat (limited to 'core/thread')
-rw-r--r--core/thread/thread_unix.odin2
-rw-r--r--core/thread/thread_windows.odin2
2 files changed, 4 insertions, 0 deletions
diff --git a/core/thread/thread_unix.odin b/core/thread/thread_unix.odin
index eac971dd7..64f2816e0 100644
--- a/core/thread/thread_unix.odin
+++ b/core/thread/thread_unix.odin
@@ -69,6 +69,8 @@ _create :: proc(procedure: Thread_Proc, priority: Thread_Priority) -> ^Thread {
if t.self_cleanup {
t.unix_thread = {}
+ // NOTE(ftphikari): It doesn't matter which context 'free' received, right?
+ context = {}
free(t, t.creation_allocator)
}
diff --git a/core/thread/thread_windows.odin b/core/thread/thread_windows.odin
index eace9a926..7a7c8b4a2 100644
--- a/core/thread/thread_windows.odin
+++ b/core/thread/thread_windows.odin
@@ -50,6 +50,8 @@ _create :: proc(procedure: Thread_Proc, priority: Thread_Priority) -> ^Thread {
if t.self_cleanup {
win32.CloseHandle(t.win32_thread)
t.win32_thread = win32.INVALID_HANDLE
+ // NOTE(ftphikari): It doesn't matter which context 'free' received, right?
+ context = {}
free(t, t.creation_allocator)
}