Commit cc89b9e1 authored by benkma's avatar benkma

Lab 15 completed

parent 6ac63998
......@@ -384,6 +384,9 @@ int proc::syscall_sleep(uint64_t msec){
unsigned long now = ticks;
unsigned long end = round_up(now,10) + msec;
while (now < end) {
if (!ptable[ppid_]->exited_.empty() || !this->exited_.empty()) {
return E_INTR;
}
yield();
now = ticks;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment