Kernel: Add CLOCK_MONOTONIC_COARSE to the kernel time page

This allows clock_gettime(CLOCK_MONOTONIC_COARSE) without syscalls.
Core::EventLoop takes advantage of this automatically. :^)
This commit is contained in:
Andreas Kling 2021-08-10 21:31:31 +02:00
commit b7dae4f90e
Notes: sideshowbarker 2024-07-18 07:09:11 +09:00
2 changed files with 6 additions and 4 deletions

View file

@ -18,7 +18,7 @@ namespace Kernel {
inline bool time_page_supports(clockid_t clock_id)
{
return clock_id == CLOCK_REALTIME_COARSE;
return clock_id == CLOCK_REALTIME_COARSE || clock_id == CLOCK_MONOTONIC_COARSE;
}
struct TimePage {