You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
aya/bpf/aya-bpf/src/programs/perf_event.rs

19 lines
325 B
Rust

use crate::BpfContext;
use core::ffi::c_void;
pub struct PerfEventContext {
ctx: *mut c_void,
}
impl PerfEventContext {
pub fn new(ctx: *mut c_void) -> PerfEventContext {
PerfEventContext { ctx }
}
}
impl BpfContext for PerfEventContext {
fn as_ptr(&self) -> *mut c_void {
self.ctx
}
}