MCPcopy Create free account
hub / github.com/LemonOSProject/LemonOS / wait

Function wait

Kernel/src/arch/x86_64/smp.cpp:15–20  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13#include "smpdefines.inc"
14
15static inline void wait(uint64_t ms){
16 uint64_t ticksPerMs = (Timer::GetFrequency() / 1000);
17 uint64_t timeMs = Timer::GetSystemUptime() * 1000 + (Timer::GetTicks() * ticksPerMs);
18
19 while((Timer::GetSystemUptime() * 1000 + (Timer::GetTicks() * ticksPerMs)) - timeMs <= ms);
20}
21
22extern void* _binary_smptrampoline_bin_start;
23extern void* _binary_smptrampoline_bin_size;

Callers 1

InitializeCPUFunction · 0.85

Calls 3

GetFrequencyFunction · 0.85
GetSystemUptimeFunction · 0.85
GetTicksFunction · 0.85

Tested by

no test coverage detected