From a13eed98947b6d6694fc68db22b3c27d50d5e588 Mon Sep 17 00:00:00 2001 From: Christian Seibold Date: Tue, 15 Sep 2020 01:34:01 -0500 Subject: [PATCH] Cleanup, check sched_param and SCHED_* constants in pthread_freebsd.odin --- core/os/os_freebsd.odin | 1 - core/sys/unix/pthread_freebsd.odin | 16 +++------------- 2 files changed, 3 insertions(+), 14 deletions(-) diff --git a/core/os/os_freebsd.odin b/core/os/os_freebsd.odin index 230ead401..03c44a1ae 100644 --- a/core/os/os_freebsd.odin +++ b/core/os/os_freebsd.odin @@ -150,7 +150,6 @@ _File_Time :: struct { } pid_t :: u32; -// timespec Stat :: struct { device_id: u64, diff --git a/core/sys/unix/pthread_freebsd.odin b/core/sys/unix/pthread_freebsd.odin index 3a632b4b9..77b922686 100644 --- a/core/sys/unix/pthread_freebsd.odin +++ b/core/sys/unix/pthread_freebsd.odin @@ -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")