Skip to content

Commit

Permalink
Optimalization
Browse files Browse the repository at this point in the history
- Better for speed, not for power usage
  • Loading branch information
Remco123 committed Nov 8, 2020
1 parent dc5d795 commit 73df144
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions kernel/src/kernel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,18 +49,18 @@ void IdleThread()
prevTicks = System::pit->Ticks();
}

//Handle power state requests from userspace
//Processes can not do this themself because the first mb of memory is not mapped for them
//And that should not be the case due to security issues :)
// Handle power state requests from userspace
// Processes can not do this themself because the first mb of memory is not mapped for them
// And that should not be the case due to security issues :)
if(powerRequestState == Reboot) {
Power::Reboot();
}
if(powerRequestState == Shutdown) {
Power::Poweroff();
}

//Wait for interrupt to perform next operation
asm volatile("hlt");
// Move onto other threads since there is nothing else to do here
System::scheduler->ForceSwitch();
}
}

Expand Down

0 comments on commit 73df144

Please sign in to comment.