SimpleKernel 1.17.0
Loading...
Searching...
No Matches
per_cpu Namespace Reference

Classes

struct  PerCpu
 每个 CPU 核心的局部数据 More...
 

Typedefs

using PerCpuArraySingleton = etl::singleton< std::array< PerCpu, SIMPLEKERNEL_MAX_CORE_COUNT > >
 PerCpu 数组单例类型
 

Functions

struct per_cpu::PerCpu __attribute__ ((aligned(SIMPLEKERNEL_PER_CPU_ALIGN_SIZE)))
 
static __always_inline auto GetCurrentCore () -> PerCpu &
 获取当前核心的 PerCpu 数据
 

Typedef Documentation

◆ PerCpuArraySingleton

using per_cpu::PerCpuArraySingleton = typedef etl::singleton<std::array<PerCpu, SIMPLEKERNEL_MAX_CORE_COUNT> >

PerCpu 数组单例类型

Definition at line 51 of file per_cpu.hpp.

Function Documentation

◆ __attribute__()

struct per_cpu::PerCpu per_cpu::__attribute__ ( (aligned(SIMPLEKERNEL_PER_CPU_ALIGN_SIZE))  )

◆ GetCurrentCore()

static __always_inline auto per_cpu::GetCurrentCore ( ) -> PerCpu&
static

获取当前核心的 PerCpu 数据

Definition at line 55 of file per_cpu.hpp.

55 {
56 return PerCpuArraySingleton::instance()[cpu_io::GetCurrentCoreId()];
57}
auto GetCurrentCoreId() -> size_t
Definition cpu_io.h:26
Here is the call graph for this function:
Here is the caller graph for this function: