libkernel: wakerset: add contains_token

Add a way to check whether the wakerset contains a token.
This commit is contained in:
Matthew Leach
2025-12-23 05:05:41 +00:00
parent 3a13c9dee6
commit facee29869

View File

@@ -48,6 +48,10 @@ impl WakerSet {
id
}
pub fn contains_token(&self, token: u64) -> bool {
self.waiters.contains_key(&token)
}
/// Removes a waker using its token.
pub fn remove(&mut self, token: u64) {
self.waiters.remove(&token);