From 2dd181e66313ac3a017c7133084d482d0ed2e205 Mon Sep 17 00:00:00 2001 From: gingerBill Date: Thu, 12 May 2022 15:48:27 +0100 Subject: [PATCH] Remove duplication --- core/sys/unix/time_unix.odin | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/core/sys/unix/time_unix.odin b/core/sys/unix/time_unix.odin index d9452c216..fa3a7a29d 100644 --- a/core/sys/unix/time_unix.odin +++ b/core/sys/unix/time_unix.odin @@ -7,21 +7,13 @@ when ODIN_OS == .Darwin { foreign import libc "system:c" } -@(default_calling_convention="c") -foreign libc { - clock_gettime :: proc(clock_id: u64, timespec: ^timespec) -> i32 --- - sleep :: proc(seconds: u32) -> i32 --- - nanosleep :: proc(requested, remaining: ^timespec) -> i32 --- -} - -foreign import "system:pthread" - import "core:c" -@(private="file") @(default_calling_convention="c") -foreign pthread { - sched_yield :: proc() -> c.int --- +foreign libc { + clock_gettime :: proc(clock_id: u64, timespec: ^timespec) -> c.int --- + sleep :: proc(seconds: c.uint) -> c.int --- + nanosleep :: proc(requested, remaining: ^timespec) -> c.int --- } timespec :: struct {