From a8377340fd829e70a92fe6060da35f81c0c4a62d Mon Sep 17 00:00:00 2001 From: GabrielPavaloiu Date: Tue, 10 Dec 2024 15:40:57 +0200 Subject: [PATCH] grant: added remove_pending_upcalls function 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. --- kernel/src/grant.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/kernel/src/grant.rs b/kernel/src/grant.rs index d8522d9b5c..a101f19cab 100644 --- a/kernel/src/grant.rs +++ b/kernel/src/grant.rs @@ -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`]. ///