Files | |
| file | wait.hpp |
| waiting strategies | |
Concepts | |
| concept | ein::waiter |
| some way to wait for a value to change | |
Classes | |
| struct | ein::mwaitx |
| waiter using MONITORX/MWAITX for AMD More... | |
| struct | ein::umwait |
| waiter using UMONITOR/UMWAIT for Intel More... | |
| struct | ein::spin |
| spin waiter using PAUSE More... | |
Functions | |
| template<waiter W> | |
| ein_flatten void | ein::wait_until (volatile auto *p, auto f) noexcept ein_blocking |
| Wait until a predicate holds about a given memory location. | |
| auto | ein::with_waiter (auto k) noexcept |
| finds an appropriate waiter for the current CPU | |
| struct ein::mwaitx |
Public Types | |
| using | timer_t = uint64_t |
Static Public Member Functions | |
| static void | monitor (volatile void *p) noexcept |
| static void | mwait (uint32_t timer=0) noexcept ein_blocking |
Static Public Attributes | |
| static const bool | supported |
| using ein::mwaitx::timer_t = uint64_t |
|
inlinestaticnoexcept[[always_inline]][[artificial]] |
|
inlinestaticnoexcept[[always_inline]][[artificial]] |
|
static |
Definition at line 55 of file wait.hpp.
Referenced by ein::with_waiter().
| struct ein::umwait |
Public Types | |
| using | timer_t = uint64_t |
Static Public Member Functions | |
| static void | monitor (volatile void *p) noexcept |
| static uint8_t | mwait (uint32_t timer=0) noexcept ein_blocking |
Static Public Attributes | |
| static const bool | supported |
| using ein::umwait::timer_t = uint64_t |
|
inlinestaticnoexcept[[always_inline]][[artificial]] |
|
inlinestaticnoexcept[[always_inline]][[artificial]] |
|
static |
Definition at line 65 of file wait.hpp.
Referenced by ein::with_waiter().
| struct ein::spin |
Public Types | |
| using | timer_t = uint64_t |
Static Public Member Functions | |
| static void | monitor (volatile void *) noexcept |
| static void | mwait (uint32_t=0) noexcept ein_blocking |
Static Public Attributes | |
| static constinit bool | supported = true |
| using ein::spin::timer_t = uint64_t |
|
inlinestaticnoexcept[[always_inline]][[artificial]] |
|
inlinestaticnoexcept[[always_inline]][[artificial]] |
|
noexcept |
Wait until a predicate holds about a given memory location.
| p | pointer to data. activity on its cache line will wake us up |
| f | predicate to check about the pointer |
Definition at line 40 of file wait.hpp.
|
noexcept |
finds an appropriate waiter for the current CPU
Chooses between variations of user-mode MONITOR / MWAIT. Usage:
invokes k with a waiter as a template parameter.
Definition at line 84 of file wait.hpp.
References ein::mwaitx::supported, and ein::umwait::supported.