mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-24 10:12:25 -05:00
fdfc66db61
This patch adds a vDSO-like mechanism for exposing the current time as an array of per-clock-source timestamps. LibC's clock_gettime() calls sys$map_time_page() to map the kernel's "time page" into the process address space (at a random address, ofc.) This is only done on first call, and from then on the timestamps are fetched from the time page. This first patch only adds support for CLOCK_REALTIME, but eventually we should be able to support all clock sources this way and get rid of sys$clock_gettime() in the kernel entirely. :^) Accesses are synchronized using two atomic integers that are incremented at the start and finish of the kernel's time page update cycle. |
||
---|---|---|
.. | ||
APICTimer.cpp | ||
APICTimer.h | ||
HardwareTimer.h | ||
HPET.cpp | ||
HPET.h | ||
HPETComparator.cpp | ||
HPETComparator.h | ||
PIT.cpp | ||
PIT.h | ||
RTC.cpp | ||
RTC.h | ||
TimeManagement.cpp | ||
TimeManagement.h |