⚠️ VeridianOS Kernel Documentation - This is low-level kernel code. All functions are unsafe unless explicitly marked otherwise. no_std

safe_index

Function safe_index 

Source
pub fn safe_index(index: usize, size: usize) -> usize
Expand description

Safe array index that clamps to zero under mis-speculation.

Returns index unchanged if index < size, or 0 otherwise. Uses bounds_mask internally for branchless operation.