-
Notifications
You must be signed in to change notification settings - Fork 92
/
Cargo.toml
76 lines (59 loc) · 2.45 KB
/
Cargo.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
[package]
name = "spin"
version = "0.9.8"
authors = [
"Mathijs van de Nes <[email protected]>",
"John Ericson <[email protected]>",
"Joshua Barretto <[email protected]>",
]
license = "MIT"
repository = "https://github.com/mvdnes/spin-rs.git"
keywords = ["spinlock", "mutex", "rwlock"]
description = "Spin-based synchronization primitives"
rust-version = "1.38"
[dependencies]
lock_api_crate = { package = "lock_api", version = "0.4", optional = true }
# Enable require-cas feature to provide a better error message if the end user forgets to use the cfg or feature.
portable-atomic = { version = "1.3", optional = true, default-features = false, features = ["require-cas"] }
[features]
default = ["lock_api", "mutex", "spin_mutex", "rwlock", "once", "lazy", "barrier"]
# Enables `Mutex`. Must be used with either `spin_mutex` or `use_ticket_mutex`.
mutex = []
# Enables `SpinMutex` and the default spin mutex implementation for `Mutex`.
spin_mutex = ["mutex"]
# Enables `TicketMutex`.
ticket_mutex = ["mutex"]
# Enables `FairMutex`.
fair_mutex = ["mutex"]
# Enables the non-default ticket mutex implementation for `Mutex`.
use_ticket_mutex = ["mutex", "ticket_mutex"]
# Enables `RwLock`.
rwlock = []
# Enables `Once`.
once = []
# Enables `Lazy`.
lazy = ["once"]
# Enables `Barrier`. Because this feature uses `mutex`, either `spin_mutex` or `use_ticket_mutex` must be enabled.
barrier = ["mutex"]
# Enables `lock_api`-compatible types that use the primitives in this crate internally.
lock_api = ["lock_api_crate"]
# Enables std-only features such as yield-relaxing.
std = []
# Use the portable_atomic crate to support platforms without native atomic operations.
# The `portable_atomic_unsafe_assume_single_core` cfg or `critical-section` feature
# of `portable-atomic` crate must also be set by the final binary crate.
# When using the cfg, note that it is unsafe and enabling it for multicore systems is unsound.
# When using the `critical-section` feature, you need to implement the critical-section
# implementation that sound for your system by implementing an unsafe trait.
# See the documentation for the `portable-atomic` crate for more information:
# https://docs.rs/portable-atomic/latest/portable_atomic/#optional-cfg
portable_atomic = ["portable-atomic"]
[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]
[dev-dependencies]
criterion = "0.4"
[[bench]]
name = "mutex"
harness = false
required-features = ["ticket_mutex"]