66 HASSERT(
count_ &&
"barrier notifyable received too many notifys");
static CrashNotifiable default_crash_notifiable
Default instance of a crashing notifiable.
static EmptyNotifiable default_empty_notifiable
Default instance of an empty notifiable.
See OSMutexLock in os/OS.hxx.
A BarrierNotifiable allows to create a number of child Notifiable and wait for all of them to finish.
void notify() override
Implementation of the barrier semantics.
unsigned count_
How many outstanding notifications we are still waiting for.
Notifiable * done_
Notifiable to call when the barrier reaches zero.
BarrierNotifiable * reset(Notifiable *done)
Resets the barrier. Returns &*this. Asserts that is_done().
BarrierNotifiable * new_child()
Call this for each child task.
A Notifiable that will crash whenever called.
void notify() override
Crashes.
static Notifiable * DefaultInstance()
A Notifiable that doesn't do anything when notified.
static Notifiable * DefaultInstance()
An object that can schedule itself on an executor to run.
virtual void notify()=0
Generic callback.
#define HASSERT(x)
Checks that the value of expression x is true, else terminates the current process.
#define DIE(MSG)
Unconditionally terminates the current process with a message.