Skip to content

Commit 40906de

Browse files
committed
Add macos futex impl
Shamelessly stolen from pending PR: rust-lang/rust#122408
1 parent f569a98 commit 40906de

File tree

6 files changed

+1830
-3
lines changed

6 files changed

+1830
-3
lines changed

Cargo.toml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,12 @@ keywords = ["atomic", "futex"]
66
version = "1.1.0"
77
edition = "2021"
88
license = "BSD-2-Clause"
9-
categories = ["concurrency", "os", "no-std"]
9+
categories = ["concurrency", "os"]
1010

11-
[target.'cfg(any(target_os = "linux", target_os = "android", target_os = "freebsd"))'.dependencies]
11+
[target.'cfg(any(target_os = "linux", target_os = "android", target_os = "freebsd", target_vendor = "apple"))'.dependencies]
1212
libc = "0.2"
13+
cfg-if = "1.0.0"
14+
memchr = "2.7.4"
1315

1416
[target.'cfg(windows)'.dependencies]
1517
windows-sys = { version = "0.42.0", features = ["Win32_System_Threading", "Win32_Foundation", "Win32_System_WindowsProgramming"] }

src/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
#![no_std]
21
#![doc = include_str!("../README.md")]
32

43
use core::sync::atomic::{AtomicPtr, AtomicU32, AtomicU64};
54

5+
mod unix_futex;
6+
67
#[cfg(any(target_os = "linux", target_os = "android"))]
78
#[path = "linux.rs"]
89
mod platform;

0 commit comments

Comments
 (0)