ZXFoundation™ 26h2
Loading...
Searching...
No Matches
lib.softirq.core Module Reference

Data Structures

struct  lib::softirq_entry
 One entry in the global softirq vector table. More...
struct  lib::softirq_state
 Per-CPU softirq execution state. More...

Enumerations

enum class  softirq_vec : u8 {
  hi = 0 , timer = 1 , net_tx = 2 , net_rx = 3 ,
  block = 4 , irq_poll = 5 , tasklet = 6 , sched = 7 ,
  hrtimer = 8 , rcu = 9 , mutex_release = 10 , nohz_idle = 11 ,
  numa = 12 , _count
}
 Softirq vector identifier.

Typedefs

using lib::softirq_fn = auto (*)(void* data) noexcept -> void
 Function pointer type invoked by the softirq dispatcher.

Functions

auto lib::do_softirq () noexcept -> void
 Drain all pending softirq vectors on the current CPU.
auto lib::open_softirq (softirq_vec v, softirq_fn action, void *data) noexcept -> std::expected< void, lib::kernel_error >
 Register a handler for a softirq vector.
auto lib::raise_softirq (softirq_vec v) noexcept -> void
 Mark a softirq vector as pending on the current CPU.
auto lib::raise_softirq_on (u16 cpu, softirq_vec v) noexcept -> void
 Mark a softirq vector as pending on a remote CPU.
constexpr auto lib::softirq_bit (softirq_vec v) noexcept -> u32
 Convert a softirq vector to its bit position in the pending bitmap.
auto lib::softirq_clear (softirq_vec v) noexcept -> bool
 Clear a pending softirq vector without dispatching it.
auto lib::softirq_entry_for (softirq_vec v) noexcept -> const softirq_entry &
 Return the global vector-table entry for a softirq vector.
constexpr auto lib::softirq_index (softirq_vec v) noexcept -> u32
 Convert a softirq vector to its dense index in the vector table.
auto lib::softirq_pending () noexcept -> bool
 Test whether any softirq is pending on the current CPU.
auto lib::softirq_stats () noexcept -> std::pair< u64, u64 >
 Read this CPU's softirq dispatch statistics (for diagnostics).
auto lib::softirq_test (softirq_vec v) noexcept -> bool
 Test whether a particular softirq vector is pending on this CPU.

Variables

softirq_fn action {nullptr}
void * data {nullptr}
u64 dispatch_count {0U}
 Monotonic counter bumped every time do_softirq is entered.
std::atomic< u32 > generation {0U}
 Generation counter bumped on open_softirq, allowing callers to detect re-registration of a vector slot (e.g. for diagnostics).
u32 nest {0U}
 Recursive re-entry guard (a softirq may raise another softirq).
constexpr u32 lib::NR_SOFTIRQS = static_cast<u32>(softirq_vec::_count)
 Maximum number of softirq vectors supported by the framework.
std::atomic< u32 > pending {0U}
 Bitmap of pending softirq vectors (one bit per softirq_vec).
u32 processing {0U}
 Snapshot of pending bits being processed right now in do_softirq.
u64 raise_count {0U}
 Monotonic counter bumped every time raise_softirq actually sets a bit.
constexpr softirq_vec lib::SOFTIRQ_VEC_NONE = static_cast<softirq_vec>(0xFFU)
 Reserved value for "no softirq vector" returns.

Files

file  lib/softirq.zcomponent/core.cxxm
file  lib/softirq.zcomponent/core.cxx