mirror of https://github.com/aya-rs/aya
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.
19 lines
325 B
Rust
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
|
|
}
|
|
}
|