mirror of
https://github.com/Ed94/Odin.git
synced 2026-07-28 18:30:06 +00:00
Updated core lib and did cleanup
Updated core with some path related functions and did some minor code cleanup. Most of the standard library function is just a matter of copy what is there for the other BSDs.
This commit is contained in:
@@ -20,7 +20,7 @@ Thread_Os_Specific :: struct #align(16) {
|
||||
// It then waits for `start` to be called.
|
||||
//
|
||||
_create :: proc(procedure: Thread_Proc, priority: Thread_Priority) -> ^Thread {
|
||||
__linux_thread_entry_proc :: proc "c" (t: rawptr) -> rawptr {
|
||||
__unix_thread_entry_proc :: proc "c" (t: rawptr) -> rawptr {
|
||||
t := (^Thread)(t)
|
||||
|
||||
when ODIN_OS != .Darwin {
|
||||
@@ -109,7 +109,7 @@ _create :: proc(procedure: Thread_Proc, priority: Thread_Priority) -> ^Thread {
|
||||
assert(res == 0)
|
||||
|
||||
thread.procedure = procedure
|
||||
if unix.pthread_create(&thread.unix_thread, &attrs, __linux_thread_entry_proc, thread) != 0 {
|
||||
if unix.pthread_create(&thread.unix_thread, &attrs, __unix_thread_entry_proc, thread) != 0 {
|
||||
free(thread, thread.creation_allocator)
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user