ZXFoundation™ 26h2
Loading...
Searching...
No Matches
zxfoundation::dgp::signal::signal_queue Struct Referenceexport

Fixed-capacity signal queue embedded in the domain struct. More...

Collaboration diagram for zxfoundation::dgp::signal::signal_queue:
[legend]

Public Member Functions

auto dequeue () noexcept -> signal_entry
 Dequeue the next signal.
auto enqueue (signal_kind kind, u64 data) noexcept -> void
 Enqueue a signal (non-blocking, overwrites oldest if full).
auto has_pending () const noexcept -> bool
 Check if any signal is pending.
auto has_pending (signal_kind k) const noexcept -> bool
 Check if a specific signal kind is pending.

Data Fields

u32 blocked_mask {0}
 Bitmask of currently-blocked kinds.
u32 count {0}
 Pending signals.
signal_entry entries [SIGNAL_QUEUE_DEPTH] {}
 Ring buffer.
signal_handler_info handlers [8] {}
 Registered handlers by kind.
u32 head {0}
 Dequeue index.
u32 pending_mask {0}
 Bitmask of signal_kind values present.
u32 tail {0}
 Enqueue index.

Detailed Description

Fixed-capacity signal queue embedded in the domain struct.

Member Function Documentation

◆ dequeue()

auto zxfoundation::dgp::signal::signal_queue::dequeue ( ) ->signal_entry
inlinenodiscardexportnoexcept

Dequeue the next signal.

Returns
The entry, or a null entry (kind == none) if empty.

The documentation for this struct was generated from the following file: