Skip to content

Commit

Permalink
Merge pull request #367 from pixlwave/watchos
Browse files Browse the repository at this point in the history
  • Loading branch information
Amanieu authored Jan 11, 2023
2 parents df69aa6 + d0cb97c commit afacc0f
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions core/src/thread_parker/unix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// http://opensource.org/licenses/MIT>, at your option. This file may not be
// copied, modified, or distributed except according to those terms.

#[cfg(any(target_os = "macos", target_os = "ios"))]
#[cfg(any(target_os = "macos", target_os = "ios", target_os = "watchos"))]
use core::ptr;
use core::{
cell::{Cell, UnsafeCell},
Expand Down Expand Up @@ -130,6 +130,7 @@ impl ThreadParker {
#[cfg(any(
target_os = "macos",
target_os = "ios",
target_os = "watchos",
target_os = "android",
target_os = "espidf"
))]
Expand All @@ -140,6 +141,7 @@ impl ThreadParker {
#[cfg(not(any(
target_os = "macos",
target_os = "ios",
target_os = "watchos",
target_os = "android",
target_os = "espidf"
)))]
Expand Down Expand Up @@ -193,7 +195,7 @@ impl super::UnparkHandleT for UnparkHandle {
}

// Returns the current time on the clock used by pthread_cond_t as a timespec.
#[cfg(any(target_os = "macos", target_os = "ios"))]
#[cfg(any(target_os = "macos", target_os = "ios", target_os = "watchos"))]
#[inline]
fn timespec_now() -> libc::timespec {
let mut now = MaybeUninit::<libc::timeval>::uninit();
Expand All @@ -206,7 +208,7 @@ fn timespec_now() -> libc::timespec {
tv_nsec: now.tv_usec as tv_nsec_t * 1000,
}
}
#[cfg(not(any(target_os = "macos", target_os = "ios")))]
#[cfg(not(any(target_os = "macos", target_os = "ios", target_os = "watchos")))]
#[inline]
fn timespec_now() -> libc::timespec {
let mut now = MaybeUninit::<libc::timespec>::uninit();
Expand Down

0 comments on commit afacc0f

Please sign in to comment.