@@ -310,10 +310,10 @@ impl Thread {
310310 target_os = "android" ,
311311 target_os = "solaris" ,
312312 target_os = "illumos" ,
313- target_os = "macos " ,
314- target_os = "ios " ,
315- target_os = "tvos " ,
316- target_os = "watchos "
313+ target_os = "dragonfly " ,
314+ target_os = "hurd " ,
315+ target_os = "fuchsia " ,
316+ target_vendor = "apple "
317317 ) ) ) ]
318318 pub fn sleep_until ( deadline : Instant ) {
319319 let now = Instant :: now ( ) ;
@@ -323,14 +323,17 @@ impl Thread {
323323 }
324324 }
325325
326- // Note depends on clock_nanosleep (not supported on macos/ios/watchos/tvos )
326+ // Note depends on clock_nanosleep (not supported on os's by apple )
327327 #[ cfg( any(
328328 target_os = "freebsd" ,
329329 target_os = "netbsd" ,
330330 target_os = "linux" ,
331331 target_os = "android" ,
332332 target_os = "solaris" ,
333333 target_os = "illumos" ,
334+ target_os = "dragonfly" ,
335+ target_os = "hurd" ,
336+ target_os = "fuchsia" ,
334337 ) ) ]
335338 pub fn sleep_until ( deadline : crate :: time:: Instant ) {
336339 let mut ts = deadline
@@ -355,13 +358,7 @@ impl Thread {
355358 }
356359 }
357360
358- #[ cfg( any(
359- target_os = "macos" ,
360- target_os = "ios" ,
361- target_os = "tvos" ,
362- target_os = "watchos" ,
363- target_os = "visionos"
364- ) ) ]
361+ #[ cfg( target_vendor = "apple" ) ]
365362 pub fn sleep_until ( deadline : crate :: time:: Instant ) {
366363 use core:: mem:: MaybeUninit ;
367364
@@ -398,35 +395,17 @@ impl Thread {
398395 }
399396}
400397
401- #[ cfg( any(
402- target_os = "macos" ,
403- target_os = "ios" ,
404- target_os = "tvos" ,
405- target_os = "watchos" ,
406- target_os = "visionos"
407- ) ) ]
398+ #[ cfg( target_vendor = "apple" ) ]
408399const KERN_SUCCESS : libc:: c_int = 0 ;
409400
410- #[ cfg( any(
411- target_os = "macos" ,
412- target_os = "ios" ,
413- target_os = "tvos" ,
414- target_os = "watchos" ,
415- target_os = "visionos"
416- ) ) ]
401+ #[ cfg( target_vendor = "apple" ) ]
417402#[ repr( C ) ]
418403struct mach_timebase_info_type {
419404 numer : u32 ,
420405 denom : u32 ,
421406}
422407
423- #[ cfg( any(
424- target_os = "macos" ,
425- target_os = "ios" ,
426- target_os = "tvos" ,
427- target_os = "watchos" ,
428- target_os = "visionos"
429- ) ) ]
408+ #[ cfg( target_vendor = "apple" ) ]
430409extern "C" {
431410 fn mach_wait_until ( deadline : u64 ) -> libc:: c_int ;
432411 fn mach_timebase_info ( info : * mut mach_timebase_info_type ) -> libc:: c_int ;
0 commit comments