Implement sched_yield, enable interrupts in userspace

This commit is contained in:
Jeremy Soller
2016-09-10 19:18:59 -06:00
parent 486bfea62c
commit c30f4208d4
3 changed files with 15 additions and 5 deletions
+5
View File
@@ -28,3 +28,8 @@ pub fn getpid() -> Result<usize> {
let context = context_lock.read();
Ok(context.id)
}
pub fn sched_yield() -> Result<usize> {
unsafe { context::switch(); }
Ok(0)
}