![]() |
Realm
A distributed, event-based tasking library
|
#include <event.h>
Public Types | |
| typedef ::realm_id_t | id_t |
Public Member Functions | |
| Event ()=default | |
| constexpr | Event (id_t id) |
| constexpr | operator id_t () const |
| bool | operator< (const Event &rhs) const |
| bool | operator== (const Event &rhs) const |
| bool | operator!= (const Event &rhs) const |
| bool | exists (void) const |
| bool | has_triggered (void) const |
| void | wait (void) const |
| void | external_wait (void) const |
| bool | external_timedwait (long long max_ns) const |
| bool | has_triggered_faultaware (bool &poisoned) const |
| void | wait_faultaware (bool &poisoned) const |
| void | external_wait_faultaware (bool &poisoned) const |
| bool | external_timedwait_faultaware (bool &poisoned, long long max_ns) const |
| void | subscribe (void) const |
| void | cancel_operation (const void *reason_data, size_t reason_size) const |
| void | set_operation_priority (int new_priority) const |
Static Public Member Functions | |
| static Event | merge_events_ignorefaults (const Event *wait_for, size_t num_events) |
| static Event | merge_events_ignorefaults (const span< const Event > &wait_for) |
| static Event | merge_events_ignorefaults (const std::set< Event > &wait_for) |
| static Event | ignorefaults (Event wait_for) |
| static void | advise_event_ordering (Event happens_before, Event happens_after) |
| static void | advise_event_ordering (const Event *happens_before, size_t num_events, Event happens_after, bool all_must_trigger=true) |
| static void | advise_event_ordering (const span< Event > &happens_before, Event happens_after, bool all_must_trigger=true) |
| static Event | merge_events (const Event *wait_for, size_t num_events) |
| static Event | merge_events (Event ev1, Event ev2, Event ev3=NO_EVENT, Event ev4=NO_EVENT, Event ev5=NO_EVENT, Event ev6=NO_EVENT) |
| static Event | merge_events (const std::set< Event > &wait_for) |
| static Event | merge_events (const span< const Event > &wait_for) |
Public Attributes | |
| id_t | id {REALM_NO_EVENT} |
Static Public Attributes | |
| static const Event | NO_EVENT |
| The value should be usued to initialize an event handle. NO_EVENT is always in has triggered state . | |
Event is created by the runtime and is used to synchronize operations. An event is triggered when the operation it represents is complete and can be used as pre and post conditions for other operations. This class represents a handle to the event itself and can be passed-by-value as well as serialized/deserialized anywhere in the program. Note that events do not need to be explicitly garbage collected.
| typedef ::realm_id_t Realm::Event::id_t |
|
default |
|
inlineexplicitconstexpr |
|
static |
|
static |
|
static |
| void Realm::Event::cancel_operation | ( | const void * | reason_data, |
| size_t | reason_size | ||
| ) | const |
Attempt to cancel the operation associated with this event.
| reason_data | will be provided to any profilers of the operation |
| reason_size | the size of the reason data |
| bool Realm::Event::exists | ( | void | ) | const |
| bool Realm::Event::external_timedwait | ( | long long | max_ns | ) | const |
External wait with a timeout - returns true if event triggers, false if the maximum delay occurs first
| max_ns | the maximum number of nanoseconds to wait |
| bool Realm::Event::external_timedwait_faultaware | ( | bool & | poisoned, |
| long long | max_ns | ||
| ) | const |
Fault-aware versions of the external timed wait function.
| poisoned | set to true if the event is poisoned |
| max_ns | the maximum number of nanoseconds to wait |
| void Realm::Event::external_wait | ( | void | ) | const |
Used by non-legion threads to wait on an event - always blocking
| void Realm::Event::external_wait_faultaware | ( | bool & | poisoned | ) | const |
Fault-aware versions of the external wait function.
| poisoned | set to true if the event is poisoned |
| bool Realm::Event::has_triggered | ( | void | ) | const |
Test whether an event has triggered without waiting.
| bool Realm::Event::has_triggered_faultaware | ( | bool & | poisoned | ) | const |
Fault-aware versions of the above (the above versions will cause the caller to fault as well if a poisoned event is queried).
| poisoned | set to true if the event is poisoned |
Create an event that won't trigger until all input events have.
| wait_for | the events to wait for |
|
static |
|
static |
Create an event that won't trigger until all input events have, ignoring any poison on the input events.
| wait_for | the events to wait for |
|
inlineconstexpr |
| bool Realm::Event::operator!= | ( | const Event & | rhs | ) | const |
| bool Realm::Event::operator< | ( | const Event & | rhs | ) | const |
| bool Realm::Event::operator== | ( | const Event & | rhs | ) | const |
| void Realm::Event::set_operation_priority | ( | int | new_priority | ) | const |
Attempt to change the priority of the operation associated with this event.
| new_priority | the new priority. |
| void Realm::Event::subscribe | ( | void | ) | const |
Subscribe to an event, ensuring that the triggeredness of the event will be available as soon as possible (and without having to call wait).
| void Realm::Event::wait | ( | void | ) | const |
Wait for an event to trigger.
| void Realm::Event::wait_faultaware | ( | bool & | poisoned | ) | const |
Fault-aware versions of the wait function.
| poisoned | set to true if the event is poisoned |
| id_t Realm::Event::id {REALM_NO_EVENT} |
|
static |
The value should be usued to initialize an event handle. NO_EVENT is always in has triggered state .