Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions scheds/rust/scx_chaos/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ use std::thread;
use std::time::Duration;
use std::time::Instant;

const SCHEDULER_NAME: &str = "scx_chaos";
struct ArenaAllocator(Pin<Rc<SkelWithObject>>);

unsafe impl Allocator for ArenaAllocator {
Expand Down Expand Up @@ -246,6 +247,12 @@ impl Scheduler {
}
}

impl Drop for Scheduler {
fn drop(&mut self) {
info!("Unregister {SCHEDULER_NAME} scheduler");
}
}

impl Builder<'_> {
fn setup_arenas(&self, skel: &mut BpfSkel) -> Result<()> {
// Allocate the arena memory from the BPF side so userspace initializes it before starting
Expand Down