feat(kernel): add SpawnThread, CreateProcess, and Kill syscalls
This commit is contained in:
@@ -29,6 +29,17 @@ impl WaitQueue {
|
||||
thread
|
||||
}
|
||||
|
||||
pub fn remove_thread(&mut self, thread: ThreadId) -> bool {
|
||||
for slot in &mut self.entries {
|
||||
if *slot == Some(thread) {
|
||||
*slot = None;
|
||||
self.count -= 1;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
false
|
||||
}
|
||||
|
||||
pub fn is_empty(&self) -> bool {
|
||||
self.count == 0
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user