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

Function SysNanoSleep

Kernel/src/arch/x86_64/syscalls.cpp:950–957  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

948}
949
950long SysNanoSleep(regs64_t* r){
951 uint64_t nanoseconds = SC_ARG0(r);
952
953 uint64_t ticks = nanoseconds * Timer::GetFrequency() / 1000000000;
954 Timer::SleepCurrentThread(ticks);
955
956 return 0;
957}
958
959long SysPRead(regs64_t* r){
960 if(SC_ARG0(r) > Scheduler::GetCurrentProcess()->fileDescriptors.get_length()){

Callers

nothing calls this directly

Calls 2

GetFrequencyFunction · 0.85
SleepCurrentThreadFunction · 0.85

Tested by

no test coverage detected