mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-03 05:08:14 +00:00
Fix various foreign signatures
This commit is contained in:
@@ -50,7 +50,6 @@ foreign lib {
|
||||
af: AF, // INET or INET6
|
||||
src: cstring,
|
||||
dst: rawptr, // either ^in_addr or ^in_addr6
|
||||
size: socklen_t, // size_of(dst^)
|
||||
) -> pton_result ---
|
||||
}
|
||||
|
||||
|
||||
@@ -124,7 +124,7 @@ foreign lib {
|
||||
|
||||
[[ More; https://pubs.opengroup.org/onlinepubs/9699919799/functions/pthread_attr_getscope.html ]]
|
||||
*/
|
||||
pthread_attr_setscope :: proc(attr: ^pthread_attr_t, contentionscope: ^Thread_Scope) -> Errno ---
|
||||
pthread_attr_setscope :: proc(attr: ^pthread_attr_t, contentionscope: Thread_Scope) -> Errno ---
|
||||
|
||||
/*
|
||||
Get the area of storage to be used for the created thread's stack.
|
||||
@@ -400,7 +400,7 @@ when ODIN_OS == .Darwin {
|
||||
PTHREAD_SCOPE_PROCESS :: 2
|
||||
PTHREAD_SCOPE_SYSTEM :: 1
|
||||
|
||||
pthread_t :: distinct u64
|
||||
pthread_t :: distinct rawptr
|
||||
|
||||
pthread_attr_t :: struct {
|
||||
__sig: c.long,
|
||||
|
||||
@@ -92,7 +92,12 @@ foreign lib {
|
||||
|
||||
[[ More; https://pubs.opengroup.org/onlinepubs/9699919799/functions/shm_open.html ]]
|
||||
*/
|
||||
shm_open :: proc(name: cstring, oflag: O_Flags, mode: mode_t) -> FD ---
|
||||
when ODIN_OS == .Darwin {
|
||||
// https://developer.apple.com/library/archive/documentation/System/Conceptual/ManPages_iPhoneOS/man2/shm_open.2.html
|
||||
shm_open :: proc(name: cstring, oflag: O_Flags, #c_vararg args: ..any) -> FD ---
|
||||
} else {
|
||||
shm_open :: proc(name: cstring, oflag: O_Flags, mode: mode_t) -> FD ---
|
||||
}
|
||||
|
||||
/*
|
||||
Removes a shared memory object.
|
||||
|
||||
Reference in New Issue
Block a user