Kernel/LibC: support RDTSCP based clock_gettime
RDTSCP seems to be faster than LSL and it removes the need for getting the current cpu twice to make sure TSC is read on the correct CPU
This commit is contained in:
@@ -8,6 +8,7 @@ namespace Kernel::API
|
||||
enum SharedPageFeature : uint32_t
|
||||
{
|
||||
SPF_GETTIME = 1 << 0,
|
||||
SPF_RDTSCP = 1 << 1,
|
||||
};
|
||||
|
||||
struct SharedPage
|
||||
|
||||
@@ -82,6 +82,7 @@ namespace CPUID
|
||||
bool has_pat();
|
||||
bool has_1gib_pages();
|
||||
bool has_invariant_tsc();
|
||||
bool has_rdtscp();
|
||||
uint64_t get_tsc_frequency();
|
||||
bool has_kvm_pvclock();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user