pub struct FEntryContext { /* private fields */ }Implementations§
Source§impl FEntryContext
impl FEntryContext
pub fn new(ctx: *mut c_void) -> FEntryContext
Sourcepub unsafe fn arg<T: FromBtfArgument>(&self, n: usize) -> T
pub unsafe fn arg<T: FromBtfArgument>(&self, n: usize) -> T
Returns the nth argument to passed to the probe function, starting from 0.
§Examples
unsafe fn try_fentry_try_to_wake_up(ctx: FEntryContext) -> Result<u32, u32> {
let tp: *const task_struct = ctx.arg(0);
// Do something with tp
Ok(0)
}Trait Implementations§
Auto Trait Implementations§
impl Freeze for FEntryContext
impl RefUnwindSafe for FEntryContext
impl !Send for FEntryContext
impl !Sync for FEntryContext
impl Unpin for FEntryContext
impl UnwindSafe for FEntryContext
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more