|
native 0.0.1
Vectors, masks and wide register packs for C++26
|
Concepts | |
| concept | native::waiter |
| some way to wait for a value to change | |
Classes | |
| struct | native::mwaitx |
| waiter using the MONITORX/MWAITX instruction feature More... | |
| struct | native::umwait |
| waiter using the WAITPKG instruction feature More... | |
| struct | native::spin |
| A universally supported x86 spin waiter using PAUSE; monitor is a no-op. More... | |
Functions | |
| template<waiter W> | |
| void | native::wait_until (volatile auto *p, auto f) noexcept(noexcept(!f(p)) &&noexcept(W::monitor(p)) &&noexcept(W::mwait(0))) native_blocking |
| Wait until a predicate holds about a given memory location. | |
| template<isa< x86 > Arch = NATIVE_BASELINE, unsigned Control = 1> requires (Arch.has(x86_feature::waitpkg) && Control < 2) | |
| std::uint8_t | native::tpause (std::uint64_t deadline) noexcept native_blocking |
| auto | native::with_waiter (auto k) noexcept(noexcept(k.template operator()<mwaitx >()) &&noexcept(k.template operator()<umwait >()) &&noexcept(k.template operator()<spin >())) |
| finds an appropriate waiter for the current CPU Prefer MWAITX, then WAITPKG, otherwise PAUSE. Invoke k once with that type. Runtime detection occurs here, not in a SIMD arithmetic operation. Usage: | |
|
inlineexportnoexcept |
Wait until an absolute 64-bit TSC deadline without arming a monitor. Control 0 permits C0.2; Control 1 requests C0.1. The OS may limit the wait. Returns the intrinsic carry status; no memory ordering is promised. Call only after admitting WAITPKG on the executing CPU.
Definition at line 91 of file native.x86.wait.ccm.
|
exportnoexcept |
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 47 of file native.x86.wait.ccm.
|
exportnoexcept |
finds an appropriate waiter for the current CPU Prefer MWAITX, then WAITPKG, otherwise PAUSE. Invoke k once with that type. Runtime detection occurs here, not in a SIMD arithmetic operation. Usage:
invokes k with a waiter as a template parameter.
Definition at line 115 of file native.x86.wait.ccm.