66//!
77//! [spec]: https://github.com/WebAssembly/threads
88
9- #![ cfg( target_feature = "atomics" ) ]
9+ #![ cfg( any ( target_feature = "atomics" , dox ) ) ]
1010
1111#[ cfg( test) ]
1212use stdsimd_test:: assert_instr;
@@ -43,6 +43,13 @@ extern "C" {
4343/// didn't block
4444/// * 2 - the thread blocked, but the timeout expired.
4545///
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+ ///
4653/// [instr]: https://github.com/WebAssembly/threads/blob/master/proposals/threads/Overview.md#wait
4754#[ inline]
4855#[ 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 {
7178/// didn't block
7279/// * 2 - the thread blocked, but the timeout expired.
7380///
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+ ///
7488/// [instr]: https://github.com/WebAssembly/threads/blob/master/proposals/threads/Overview.md#wait
7589#[ inline]
7690#[ 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 {
92106///
93107/// Returns the number of waiters which were actually woken up.
94108///
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+ ///
95116/// [instr]: https://github.com/WebAssembly/threads/blob/master/proposals/threads/Overview.md#wake
96117#[ inline]
97118#[ cfg_attr( test, assert_instr( "atomic.wake" ) ) ]
0 commit comments