pub enum RingKernelIntrinsic {
Show 18 variants
IsActive,
ShouldTerminate,
MarkTerminated,
GetMessagesProcessed,
InputQueueSize,
OutputQueueSize,
InputQueueEmpty,
OutputQueueEmpty,
EnqueueResponse,
HlcTick,
HlcUpdate,
HlcNow,
K2kSend,
K2kTryRecv,
K2kHasMessage,
K2kPeek,
K2kPendingCount,
Nanosleep,
}Expand description
Ring kernel intrinsics for persistent actor kernels.
These intrinsics provide access to control block state, queue operations, and HLC (Hybrid Logical Clock) functionality within ring kernel handlers.
Variants§
IsActive
Check if kernel is active: is_active()
ShouldTerminate
Check if termination requested: should_terminate()
MarkTerminated
Mark kernel as terminated: mark_terminated()
GetMessagesProcessed
Get messages processed count: messages_processed()
InputQueueSize
Get input queue size: input_queue_size()
OutputQueueSize
Get output queue size: output_queue_size()
InputQueueEmpty
Check if input queue empty: input_queue_empty()
OutputQueueEmpty
Check if output queue empty: output_queue_empty()
EnqueueResponse
Enqueue a response: enqueue_response(&response)
HlcTick
Increment HLC logical counter: hlc_tick()
HlcUpdate
Update HLC with received timestamp: hlc_update(received_ts)
HlcNow
Get current HLC timestamp: hlc_now()
K2kSend
Send message to another kernel: k2k_send(target_id, &msg)
K2kTryRecv
Try to receive K2K message: k2k_try_recv()
K2kHasMessage
Check for K2K messages: k2k_has_message()
K2kPeek
Peek at next K2K message without consuming: k2k_peek()
K2kPendingCount
Get number of pending K2K messages: k2k_pending_count()
Nanosleep
Sleep for nanoseconds: nanosleep(ns)
Implementations§
Source§impl RingKernelIntrinsic
impl RingKernelIntrinsic
Sourcepub fn requires_control_block(&self) -> bool
pub fn requires_control_block(&self) -> bool
Check if this intrinsic requires the control block.
Sourcepub fn requires_hlc(&self) -> bool
pub fn requires_hlc(&self) -> bool
Check if this intrinsic requires HLC state.
Sourcepub fn requires_k2k(&self) -> bool
pub fn requires_k2k(&self) -> bool
Check if this intrinsic requires K2K support.
Trait Implementations§
Source§impl Clone for RingKernelIntrinsic
impl Clone for RingKernelIntrinsic
Source§fn clone(&self) -> RingKernelIntrinsic
fn clone(&self) -> RingKernelIntrinsic
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more