diff options
| author | bors <bors@rust-lang.org> | 2023-09-24 05:21:27 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-09-24 05:21:27 +0000 |
| commit | 00a8d4830e700d7f53e176a4e042f54495dd8365 (patch) | |
| tree | c10be66ac64476f89919a4c29078d1ef6f40ff34 /library/std/src/sys | |
| parent | 5ddf866c9c91afa53d26a3bf13c2cce4dd8bb21d (diff) | |
| parent | cf766029b6502cedac0be9104fd7589b7abd8de9 (diff) | |
| download | rust-00a8d4830e700d7f53e176a4e042f54495dd8365.tar.gz rust-00a8d4830e700d7f53e176a4e042f54495dd8365.zip | |
Auto merge of #3079 - rust-lang:rustup-2023-09-24, r=saethlin
Automatic sync from rustc
Diffstat (limited to 'library/std/src/sys')
| -rw-r--r-- | library/std/src/sys/unix/thread_local_dtor.rs | 2 | ||||
| -rw-r--r-- | library/std/src/sys/unix/thread_parking/darwin.rs | 3 |
2 files changed, 2 insertions, 3 deletions
diff --git a/library/std/src/sys/unix/thread_local_dtor.rs b/library/std/src/sys/unix/thread_local_dtor.rs index 1da41d4b4bf..fba2a676f28 100644 --- a/library/std/src/sys/unix/thread_local_dtor.rs +++ b/library/std/src/sys/unix/thread_local_dtor.rs @@ -48,7 +48,7 @@ pub unsafe fn register_dtor(t: *mut u8, dtor: unsafe extern "C" fn(*mut u8)) { // workaround below is to register, via _tlv_atexit, a custom DTOR list once per // thread. thread_local dtors are pushed to the DTOR list without calling // _tlv_atexit. -#[cfg(target_os = "macos")] +#[cfg(any(target_os = "macos", target_os = "ios", target_os = "watchos"))] pub unsafe fn register_dtor(t: *mut u8, dtor: unsafe extern "C" fn(*mut u8)) { use crate::cell::Cell; use crate::mem; diff --git a/library/std/src/sys/unix/thread_parking/darwin.rs b/library/std/src/sys/unix/thread_parking/darwin.rs index b709fada3b4..8231f3cba2d 100644 --- a/library/std/src/sys/unix/thread_parking/darwin.rs +++ b/library/std/src/sys/unix/thread_parking/darwin.rs @@ -2,8 +2,7 @@ //! //! Darwin actually has futex syscalls (`__ulock_wait`/`__ulock_wake`), but they //! cannot be used in `std` because they are non-public (their use will lead to -//! rejection from the App Store) and because they are only available starting -//! with macOS version 10.12, even though the minimum target version is 10.7. +//! rejection from the App Store). //! //! Therefore, we need to look for other synchronization primitives. Luckily, Darwin //! supports semaphores, which allow us to implement the behaviour we need with |
