Cleanup, check sched_param and SCHED_* constants in pthread_freebsd.odin

This commit is contained in:
Christian Seibold
2020-09-15 01:34:01 -05:00
parent 65787381c1
commit a13eed9894
2 changed files with 3 additions and 14 deletions

View File

@@ -150,7 +150,6 @@ _File_Time :: struct {
}
pid_t :: u32;
// timespec
Stat :: struct {
device_id: u64,

View File

@@ -67,19 +67,15 @@ PTHREAD_EXPLICIT_SCHED :: 0;
PTHREAD_PROCESS_PRIVATE :: 0;
PTHREAD_PROCESS_SHARED :: 1;
/*SCHED_OTHER :: 0;
SCHED_FIFO :: 1;
SCHED_RR :: 2; // Round robin.
*/
SCHED_OTHER :: 2;
SCHED_RR :: 3; // Round robin.
sched_param :: struct {
sched_priority: c.int,
}
/*sem_t :: struct #align 16 {
_: [SEM_T_SIZE] c.char,
}*/
SEM_T_SIZE :: 16;
_usem :: struct {
_has_waiters: u32,
_count: u32,
@@ -95,12 +91,6 @@ sem_t :: struct {
_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"
@(default_calling_convention="c")