#include <kernel/cpu/cpu.h>
#include <stddef.h>
#include <stdint.h>
Go to the source code of this file.
|
| #define | PERCPU_ALIGNMENT 64 |
| | The PERCPU_ALIGNMENT constant defines the alignment for per-CPU variables.
|
| |
| #define | PERCPU __seg_gs* |
| | Attribute specifying that the variable is an offset into the GS segment register.
|
| |
| #define | SELF ((cpu_t PERCPU)0) |
| | Macro to access data in the current cpu.
|
| |
| #define | SELF_PTR(ptr) ((void*)((uintptr_t)(SELF->self->percpu) + ((uintptr_t)(ptr) - offsetof(cpu_t, percpu)))) |
| | Macro to get a pointer to a percpu variable on the current CPU.
|
| |
| #define | CPU_PTR(id, ptr) ((void*)((uintptr_t)(cpu_get_by_id(id)->percpu) + ((uintptr_t)(ptr) - offsetof(cpu_t, percpu)))) |
| | Macro to get a pointer to a percpu variable on a specific CPU.
|
| |
| #define | PERCPU_DEFINE(type, name, ...) |
| | Macro to define a percpu variable.
|
| |
| #define | PERCPU_DEFINE_CTOR(type, name) |
| | Macro to define a percpu variable with a constructor.
|
| |
| #define | PERCPU_DEFINE_DTOR(type, name) |
| | Macro to define a percpu variable with a destructor.
|
| |
| #define | PERCPU_INIT() |
| | Initialize all percpu variables within the current modules .percpu section.
|
| |
| #define | PERCPU_DEINIT() |
| | Deinitialize all percpu variables within the current modules .percpu section.
|
| |
|
| typedef size_t | percpu_t |
| | The type that the compiler uses to store per-CPU variables.
|
| |