1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 07:27:45 +00:00

Kernel: Abstract platform-specific current time methods from Scheduler

This change ensures that the scheduler doesn't depend on a platform
specific or arch-specific code when it initializes itself, but rather we
ensure that in compile-time we will generate the appropriate code to
find the correct arch-specific current time methods.
This commit is contained in:
Liav A 2022-10-08 04:27:48 +03:00 committed by Linus Groh
parent c439a34ff7
commit 3651d9701e
5 changed files with 71 additions and 11 deletions

17
Kernel/Arch/CurrentTime.h Normal file
View file

@ -0,0 +1,17 @@
/*
* Copyright (c) 2022, Liav A. <liavalb@hotmail.co.il>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <AK/Types.h>
namespace Kernel {
typedef u64 (*fptr)();
fptr optional_current_time();
}