mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 07:38:48 +00:00
Cleanup, check sched_param and SCHED_* constants in pthread_freebsd.odin
This commit is contained in:
@@ -150,7 +150,6 @@ _File_Time :: struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pid_t :: u32;
|
pid_t :: u32;
|
||||||
// timespec
|
|
||||||
|
|
||||||
Stat :: struct {
|
Stat :: struct {
|
||||||
device_id: u64,
|
device_id: u64,
|
||||||
|
|||||||
@@ -67,19 +67,15 @@ PTHREAD_EXPLICIT_SCHED :: 0;
|
|||||||
PTHREAD_PROCESS_PRIVATE :: 0;
|
PTHREAD_PROCESS_PRIVATE :: 0;
|
||||||
PTHREAD_PROCESS_SHARED :: 1;
|
PTHREAD_PROCESS_SHARED :: 1;
|
||||||
|
|
||||||
/*SCHED_OTHER :: 0;
|
|
||||||
SCHED_FIFO :: 1;
|
SCHED_FIFO :: 1;
|
||||||
SCHED_RR :: 2; // Round robin.
|
SCHED_OTHER :: 2;
|
||||||
*/
|
SCHED_RR :: 3; // Round robin.
|
||||||
|
|
||||||
|
|
||||||
sched_param :: struct {
|
sched_param :: struct {
|
||||||
sched_priority: c.int,
|
sched_priority: c.int,
|
||||||
}
|
}
|
||||||
|
|
||||||
/*sem_t :: struct #align 16 {
|
|
||||||
_: [SEM_T_SIZE] c.char,
|
|
||||||
}*/
|
|
||||||
SEM_T_SIZE :: 16;
|
|
||||||
_usem :: struct {
|
_usem :: struct {
|
||||||
_has_waiters: u32,
|
_has_waiters: u32,
|
||||||
_count: u32,
|
_count: u32,
|
||||||
@@ -95,12 +91,6 @@ sem_t :: struct {
|
|||||||
_padding: u32,
|
_padding: u32,
|
||||||
}
|
}
|
||||||
|
|
||||||
/*when size_of(int) == 8 {
|
|
||||||
SEM_T_SIZE :: 32;
|
|
||||||
} else when size_of(int) == 4 {
|
|
||||||
SEM_T_SIZE :: 16;
|
|
||||||
}*/
|
|
||||||
|
|
||||||
foreign import "system:pthread"
|
foreign import "system:pthread"
|
||||||
|
|
||||||
@(default_calling_convention="c")
|
@(default_calling_convention="c")
|
||||||
|
|||||||
Reference in New Issue
Block a user