Skip to content

Commit

Permalink
grant: added remove_pending_upcalls function
Browse files Browse the repository at this point in the history
Added a method to GrantKernelData that removes all pending upcalls of
the current driver with the given subscriber_num from the process's
upcall queue.
  • Loading branch information
GabrielPavaloiu committed Dec 12, 2024
1 parent 8e64975 commit a837734
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions kernel/src/grant.rs
Original file line number Diff line number Diff line change
Expand Up @@ -619,6 +619,15 @@ impl<'a> GrantKernelData<'a> {
)
}

/// Remove all scheduled upcalls with the given `subscribe_num` from the
/// task queue.
pub fn remove_pending_upcalls(&self, subscribe_num: usize) {
self.process.remove_pending_upcalls(UpcallId {
subscribe_num,
driver_num: self.driver_num,
});
}

/// Returns a lifetime limited reference to the requested
/// [`ReadOnlyProcessBuffer`].
///
Expand Down

0 comments on commit a837734

Please sign in to comment.