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
commit 3651d9701e
Notes: sideshowbarker 2024-07-17 10:10:18 +09:00
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();
}