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

Function GetCPULocal

Kernel/include/arch/x86_64/cpu.h:104–108  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

102}
103
104__attribute__((always_inline)) static inline CPU* GetCPULocal(){
105 CPU* ret;
106 asm volatile("swapgs; movq %%gs:0, %0; swapgs;" : "=r"(ret)); // CPU info is 16-byte aligned as per liballoc alignment
107 return ret;
108}
109
110static inline int CheckInterrupts()
111{

Callers 15

KernelProcessFunction · 0.85
WaitMethod · 0.85
WaitTimeoutMethod · 0.85
LoadELFSegmentsFunction · 0.85
InsertThreadIntoQueueFunction · 0.85
RemoveThreadFromQueueFunction · 0.85
InitializeFunction · 0.85
YieldFunction · 0.85
EndProcessFunction · 0.85
BlockCurrentThreadFunction · 0.85
ScheduleFunction · 0.85
SysSetFsBaseFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected