6
6
//!
7
7
//! [spec]: https://github.com/WebAssembly/threads
8
8
9
- #![ cfg( target_feature = "atomics" ) ]
9
+ #![ cfg( any ( target_feature = "atomics" , dox ) ) ]
10
10
11
11
#[ cfg( test) ]
12
12
use stdsimd_test:: assert_instr;
@@ -43,6 +43,13 @@ extern "C" {
43
43
/// didn't block
44
44
/// * 2 - the thread blocked, but the timeout expired.
45
45
///
46
+ /// # Availability
47
+ ///
48
+ /// This intrinsic is only available **when the standard library itself is
49
+ /// compiled with the `atomics` target feature**. This version of the standard
50
+ /// library is not obtainable via `rustup`, but rather will require the standard
51
+ /// library to be compiled from source.
52
+ ///
46
53
/// [instr]: https://github.com/WebAssembly/threads/blob/master/proposals/threads/Overview.md#wait
47
54
#[ inline]
48
55
#[ cfg_attr( test, assert_instr( "i32.atomic.wait" ) ) ]
@@ -71,6 +78,13 @@ pub unsafe fn wait_i32(ptr: *mut i32, expression: i32, timeout_ns: i64) -> i32 {
71
78
/// didn't block
72
79
/// * 2 - the thread blocked, but the timeout expired.
73
80
///
81
+ /// # Availability
82
+ ///
83
+ /// This intrinsic is only available **when the standard library itself is
84
+ /// compiled with the `atomics` target feature**. This version of the standard
85
+ /// library is not obtainable via `rustup`, but rather will require the standard
86
+ /// library to be compiled from source.
87
+ ///
74
88
/// [instr]: https://github.com/WebAssembly/threads/blob/master/proposals/threads/Overview.md#wait
75
89
#[ inline]
76
90
#[ cfg_attr( test, assert_instr( "i64.atomic.wait" ) ) ]
@@ -92,6 +106,13 @@ pub unsafe fn wait_i64(ptr: *mut i64, expression: i64, timeout_ns: i64) -> i32 {
92
106
///
93
107
/// Returns the number of waiters which were actually woken up.
94
108
///
109
+ /// # Availability
110
+ ///
111
+ /// This intrinsic is only available **when the standard library itself is
112
+ /// compiled with the `atomics` target feature**. This version of the standard
113
+ /// library is not obtainable via `rustup`, but rather will require the standard
114
+ /// library to be compiled from source.
115
+ ///
95
116
/// [instr]: https://github.com/WebAssembly/threads/blob/master/proposals/threads/Overview.md#wake
96
117
#[ inline]
97
118
#[ cfg_attr( test, assert_instr( "atomic.wake" ) ) ]
0 commit comments