mirror of
https://github.com/odin-lang/Odin.git
synced 2026-07-14 20:00:31 +00:00
Merge branch 'master' into windows-llvm-13.0.0
This commit is contained in:
@@ -76,6 +76,9 @@ _create :: proc(procedure: Thread_Proc, priority := Thread_Priority.Normal) -> ^
|
||||
return nil
|
||||
}
|
||||
thread.creation_allocator = context.allocator
|
||||
|
||||
sync.mutex_init(&thread.start_mutex)
|
||||
sync.condition_init(&thread.start_gate, &thread.start_mutex)
|
||||
|
||||
// Set thread priority.
|
||||
policy: i32
|
||||
@@ -96,12 +99,13 @@ _create :: proc(procedure: Thread_Proc, priority := Thread_Priority.Normal) -> ^
|
||||
|
||||
if unix.pthread_create(&thread.unix_thread, &attrs, __linux_thread_entry_proc, thread) != 0 {
|
||||
free(thread, thread.creation_allocator)
|
||||
|
||||
sync.condition_destroy(&thread.start_gate)
|
||||
sync.mutex_destroy(&thread.start_mutex)
|
||||
return nil
|
||||
}
|
||||
thread.procedure = procedure
|
||||
|
||||
sync.mutex_init(&thread.start_mutex)
|
||||
sync.condition_init(&thread.start_gate, &thread.start_mutex)
|
||||
|
||||
return thread
|
||||
}
|
||||
|
||||
2
vendor/glfw/bindings/bindings.odin
vendored
2
vendor/glfw/bindings/bindings.odin
vendored
@@ -46,7 +46,7 @@ foreign glfw {
|
||||
WindowHint :: proc(hint, value: c.int) ---
|
||||
DefaultWindowHints :: proc() ---
|
||||
WindowHintString :: proc(hint: c.int, value: cstring) ---
|
||||
WindowShouldClose :: proc(window: WindowHandle) -> c.int ---
|
||||
WindowShouldClose :: proc(window: WindowHandle) -> b32 ---
|
||||
|
||||
SwapInterval :: proc(interval: c.int) ---
|
||||
SwapBuffers :: proc(window: WindowHandle) ---
|
||||
|
||||
2
vendor/glfw/wrapper.odin
vendored
2
vendor/glfw/wrapper.odin
vendored
@@ -228,4 +228,4 @@ SetErrorCallback :: glfw.SetErrorCallback
|
||||
// Used by vendor:OpenGL
|
||||
gl_set_proc_address :: proc(p: rawptr, name: cstring) {
|
||||
(^rawptr)(p)^ = GetProcAddress(name)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user