ZXFoundation™ 26h2
Loading...
Searching...
No Matches
zxfoundation.sched.cbs.core Module Reference

Data Structures

struct  zxfoundation::sched::cbs::cbs_replen
 Per-strand CBS state record (one per admitted deadline strand). More...

Functions

auto zxfoundation::sched::cbs::cancel_timer (cbs_replen &cbs) noexcept -> void
 Remove CBS timer from the timer heap (called on dequeue/destroy).
auto zxfoundation::sched::cbs::charge (cbs_replen &cbs, u64 delta_ns) noexcept -> bool
 Charge one tick against the CBS runtime.
auto zxfoundation::sched::cbs::init (cbs_replen &cbs) noexcept -> void
 Build a CBS block for a strand that is about to be admitted.
auto zxfoundation::sched::cbs::install_timer (cbs_replen &cbs, u16 cpu, zxfoundation::sys::timer::timer_fn cb, void *data) noexcept -> void
 Install the CBS timer expiry handler on a strand's CBS block.
auto zxfoundation::sched::cbs::replenish (cbs_replen &cbs) noexcept -> void
 Replenish a CBS record with the remainder of the current period.

Variables

u8 _pad [4] {}
constexpr u64 zxfoundation::sched::cbs::CBS_PERIOD_DEFAULT_NS = 100'000'000ULL
 Default CBS server period in nanoseconds (100 ms).
constexpr u64 zxfoundation::sched::cbs::CBS_RUNTIME_DEFAULT_NS = 10'000'000ULL
 Default CBS runtime per period (10 ms = 10% of 100 ms).
u64 period_deadline {0ULL}
 absolute time of next period end
u64 period_ns {CBS_PERIOD_DEFAULT_NS}
u64 runtime_ns {CBS_RUNTIME_DEFAULT_NS}
zxfoundation::sys::timer::kernel_timer timer {}
u64 used_runtime_ns {0ULL}

Files

file  zxfoundation/sched/cbs.zcomponent/core.cxxm
file  zxfoundation/sched/cbs.zcomponent/core.cxx