Split-up require_results foreign blocks

This commit is contained in:
gingerBill
2025-02-05 10:41:45 +00:00
parent 83542a3f04
commit 898bea8a97
6 changed files with 39 additions and 25 deletions
+9 -5
View File
@@ -75,16 +75,20 @@ EndThreadFunction :: proc "c" () -> FunctionPointer {
}
}
@(default_calling_convention="c", link_prefix="SDL_")
@(default_calling_convention="c", link_prefix="SDL_", require_results)
foreign lib {
GetThreadName :: proc(thread: ^Thread) -> cstring ---
GetCurrentThreadID :: proc() -> ThreadID ---
GetThreadID :: proc(thread: ^Thread) -> ThreadID ---
SetCurrentThreadPriority :: proc(priority: ThreadPriority) -> bool ---
WaitThread :: proc(thread: ^Thread, status: ^c.int) ---
GetThreadState :: proc(thread: ^Thread) -> ThreadState ---
DetachThread :: proc(thread: ^Thread) ---
GetTLS :: proc(id: ^TLSID) -> rawptr ---
SetTLS :: proc(id: ^TLSID, value: rawptr, destructor: TLSDestructorCallback) -> bool ---
CleanupTLS :: proc() ---
}
@(default_calling_convention="c", link_prefix="SDL_")
foreign lib {
SetCurrentThreadPriority :: proc(priority: ThreadPriority) -> bool ---
WaitThread :: proc(thread: ^Thread, status: ^c.int) ---
DetachThread :: proc(thread: ^Thread) ---
CleanupTLS :: proc() ---
}