mirror of
https://github.com/RGBCube/serenity
synced 2025-06-30 10:12:07 +00:00
Kernel: Remove the "kernel info page" used for fast gettimeofday()
We stopped using gettimeofday() in Core::EventLoop a while back, in favor of clock_gettime() for monotonic time. Maintaining an optimization for a syscall we're not using doesn't make a lot of sense, so let's go back to the old-style sys$gettimeofday().
This commit is contained in:
parent
4e27c58be7
commit
3a92d0828d
6 changed files with 7 additions and 46 deletions
|
@ -42,6 +42,7 @@
|
|||
namespace Kernel {
|
||||
|
||||
SchedulerData* g_scheduler_data;
|
||||
timeval g_timeofday;
|
||||
|
||||
void Scheduler::init_thread(Thread& thread)
|
||||
{
|
||||
|
@ -596,10 +597,8 @@ void Scheduler::timer_tick(const RegisterState& regs)
|
|||
|
||||
++g_uptime;
|
||||
|
||||
timeval tv;
|
||||
tv.tv_sec = TimeManagement::the().epoch_time();
|
||||
tv.tv_usec = TimeManagement::the().ticks_this_second() * 1000;
|
||||
Process::update_info_page_timestamp(tv);
|
||||
g_timeofday.tv_sec = TimeManagement::the().epoch_time();
|
||||
g_timeofday.tv_usec = TimeManagement::the().ticks_this_second() * 1000;
|
||||
|
||||
if (Process::current->is_profiling()) {
|
||||
SmapDisabler disabler;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue