core::arch::wasm32::atomic::wake - Rust
Description: API documentation for the Rust `wake` fn in crate `core`.
Keywords: rust, rustlang, rust-lang, wake

# [−][src]Function core::arch::wasm32::atomic::wake

    pub unsafe fn wake(ptr: *mut i32, waiters: i32) -> i32

🔬 This is a nightly-only experimental API. (`stdsimd` #48556)
This is supported on MIPS only.

Corresponding intrinsic to wasm's `atomic.wake` instruction

This function will wake up a number of threads blocked on the address indicated by `ptr`. Threads previously blocked with the `wait_i32` and `wait_i64` functions above will be woken up.

The `waiters` argument indicates how many waiters should be woken up (a maximum). If the value is negative all waiters are woken up, and if the value is zero no waiters are woken up.

# Return value

Returns the number of waiters which were actually woken up.

# Availability

This intrinsic is only available when the standard library itself is compiled with the `atomics` target feature. This version of the standard library is not obtainable via `rustup`, but rather will require the standard library to be compiled from source.

# Help

## Keyboard Shortcuts

`?`
  Show this help dialog
`S`
  Focus the search field
`↑`
  Move up in search results
`↓`
  Move down in search results
`↹`
  Switch tab
`⏎`
  Go to active search result
`+`
  Expand all sections
`-`
  Collapse all sections

## Search Tricks

Prefix searches with a type followed by a colon (e.g. `fn:`) to restrict the search to a given type.

Accepted types are: `fn`, `mod`, `struct`, `enum`, `trait`, `type`, `macro`, and `const`.

Search functions by type signature (e.g. `vec -> usize` or `* -> vec`)

Search multiple things at once by splitting your query with comma (e.g. `str,u8` or `String,struct:Vec,test`)