|
Serene Runtime 1.0.0-dev
C runtime for the Serene programming language
|
#include <internal.h>
Data Fields | |
| srn_context_t * | ctx |
| const srn_reactor_backend_t * | backend |
| The chosen kernel mechanism and its private state, set at activation. | |
| void * | backend_state |
| srn_reactor_notify_fn | notify |
| Wakes the worker that owns a channel a completion landed on. | |
| srn_reactor_io_channel_t * | channels |
| One channel per worker, there is a 1to1 mapping between worker ids and channel ids. | |
| size_t | nchannels |
| size_t | ring_capacity |
| Capacity of every ring (1 << ring_magnitude), fixed at activation. | |
| srn_thread_t | thread |
| The reactor thread and its run flag. | |
| _Atomic bool | running |
| _Atomic size_t | inflight |
| Operations submitted but not yet consumed, across all channels. | |
| pqmh_t | timers |
| Pending timers (like SLEEP, and IO deadlines) as a min-heap keyed by absolute monotonic deadline. | |
Definition at line 43 of file internal.h.
| const srn_reactor_backend_t* srn_reactor_t::backend |
The chosen kernel mechanism and its private state, set at activation.
Definition at line 47 of file internal.h.
| void* srn_reactor_t::backend_state |
Definition at line 48 of file internal.h.
| srn_reactor_io_channel_t* srn_reactor_t::channels |
One channel per worker, there is a 1to1 mapping between worker ids and channel ids.
Basically their index in their respective array should match
Definition at line 56 of file internal.h.
| srn_context_t* srn_reactor_t::ctx |
Definition at line 44 of file internal.h.
| _Atomic size_t srn_reactor_t::inflight |
Operations submitted but not yet consumed, across all channels.
Quiescence needs this to reach zero. Bumped on submit, dropped by the consumer through srn_reactor_op_done once the waiting fiber is readied.
Definition at line 71 of file internal.h.
| size_t srn_reactor_t::nchannels |
Definition at line 57 of file internal.h.
| srn_reactor_notify_fn srn_reactor_t::notify |
Wakes the worker that owns a channel a completion landed on.
Set at activation.
Definition at line 52 of file internal.h.
| size_t srn_reactor_t::ring_capacity |
Capacity of every ring (1 << ring_magnitude), fixed at activation.
Also each channel's in-flight cap; see srn_reactor_submit.
Definition at line 61 of file internal.h.
| _Atomic bool srn_reactor_t::running |
Definition at line 66 of file internal.h.
| srn_thread_t srn_reactor_t::thread |
The reactor thread and its run flag.
The thread loops until running is cleared and it is roused.
Definition at line 65 of file internal.h.
| pqmh_t srn_reactor_t::timers |
Pending timers (like SLEEP, and IO deadlines) as a min-heap keyed by absolute monotonic deadline.
Created at activation, owned and touched only by the reactor thread (THIS IS NOT THREAD SAFE, so only the reactor should manage it). See the timer helpers in reactor.c.
Definition at line 77 of file internal.h.