mirror of
https://github.com/hexagonal-sun/moss-kernel.git
synced 2025-12-23 14:37:57 -05:00
libkernel: wakerset: add contains_token
Add a way to check whether the wakerset contains a token.
This commit is contained in:
committed by
Ashwin Naren
parent
957b28e8a7
commit
f7a02c6ccb
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user