The platform policy of a Parker over WordT: std::atomic::wait and std::atomic::notify_one, and a hook at each step of Parker::parkUntil that compiles to nothing.
More...
#include "donner/base/tasks/Parker.h"
|
|
using | Word = WordT |
| | The parker word's type.
|
|
| static void | Wait (const std::atomic< Word > &word, Word token, std::memory_order order) |
| | Blocks while word holds token.
|
|
static void | NotifyOne (std::atomic< Word > &word) |
| | Wakes the thread blocked on word, if there is one. This is the call that may enter the kernel.
|
|
static void | BeforePrepareWait () |
| | Called by Parker::parkUntil after its condition was false, before it sets the waiting bit.
|
|
static void | AfterPrepareWait () |
| | Called by Parker::parkUntil after it set the waiting bit, before its re-check.
|
|
static void | BeforeWait () |
| | Called by Parker::parkUntil after its re-check found the condition false, before it waits.
|
|
static void | BetweenChangeAndNotify () |
| | Called by Parker::unpark after its change found the waiting bit set, before it notifies.
|
template<typename WordT>
struct donner::tasks::PlatformParkerHooks< WordT >
The platform policy of a Parker over WordT: std::atomic::wait and std::atomic::notify_one, and a hook at each step of Parker::parkUntil that compiles to nothing.
Production code uses NoParkerHooks; tests instantiate other word types, and pass policies that model the platform wait queue, count notifications, or hold the sleeper inside a hook.
- Template Parameters
-
| WordT | The parker word's type, a signed integer. |
◆ Wait()
Blocks while word holds token.
- Parameters
-
| word | The parker word. |
| token | The value to wait on. |
| order | Ordering of the loads that compare the word with token. |
The documentation for this struct was generated from the following file: