From a8bf7d7a2842d9a77a5139b4f1275edd86006fc2 Mon Sep 17 00:00:00 2001 From: Marvin Friedrich Date: Tue, 20 Oct 2026 02:23:32 +0200 Subject: [PATCH] Add cache line size bit --- arch/x86_64/include/bits/cpu.h | 2 ++ include/arch/cpu.h | 3 +++ 2 files changed, 5 insertions(+) diff --git a/arch/x86_64/include/bits/cpu.h b/arch/x86_64/include/bits/cpu.h index 88c040b..9d2101f 100644 --- a/arch/x86_64/include/bits/cpu.h +++ b/arch/x86_64/include/bits/cpu.h @@ -5,3 +5,5 @@ static inline void arch_cpu_pause() { asm volatile("pause"); } + +#define ARCH_CACHE_LINE_SIZE 64 diff --git a/include/arch/cpu.h b/include/arch/cpu.h index f12f428..2f81247 100644 --- a/include/arch/cpu.h +++ b/include/arch/cpu.h @@ -3,3 +3,6 @@ #pragma once #include +#include + +constexpr size_t CACHE_LINE_SIZE = ARCH_CACHE_LINE_SIZE;