From 8f3c343b88dcafabd0f548a0e434dbb22d7a119a Mon Sep 17 00:00:00 2001 From: Liav A Date: Fri, 24 Feb 2023 17:14:24 +0200 Subject: [PATCH] Kernel+Userland: Unify declarations for KCOV in Kernel/API/kcov.h --- {Userland/Libraries/LibC/sys => Kernel/API}/kcov.h | 1 - Kernel/Devices/KCOVInstance.h | 4 +--- Userland/Utilities/kcov-example.cpp | 2 +- 3 files changed, 2 insertions(+), 5 deletions(-) rename {Userland/Libraries/LibC/sys => Kernel/API}/kcov.h (75%) diff --git a/Userland/Libraries/LibC/sys/kcov.h b/Kernel/API/kcov.h similarity index 75% rename from Userland/Libraries/LibC/sys/kcov.h rename to Kernel/API/kcov.h index f6568a47d74..30a4982bc05 100644 --- a/Userland/Libraries/LibC/sys/kcov.h +++ b/Kernel/API/kcov.h @@ -8,6 +8,5 @@ #include -// Note: These need to be kept in sync with Kernel/Devices/KCOVInstance.h typedef volatile u64 kcov_pc_t; #define KCOV_ENTRY_SIZE sizeof(kcov_pc_t) diff --git a/Kernel/Devices/KCOVInstance.h b/Kernel/Devices/KCOVInstance.h index a5c97cca08d..810204f2e76 100644 --- a/Kernel/Devices/KCOVInstance.h +++ b/Kernel/Devices/KCOVInstance.h @@ -6,14 +6,12 @@ #pragma once +#include #include #include namespace Kernel { -// Note: These need to be kept in sync with Userland/Libraries/LibC/sys/kcov.h -typedef volatile u64 kcov_pc_t; -#define KCOV_ENTRY_SIZE sizeof(kcov_pc_t) #define KCOV_MAX_ENTRIES (10 * 1024 * 1024) /* diff --git a/Userland/Utilities/kcov-example.cpp b/Userland/Utilities/kcov-example.cpp index 6f865386679..990a82d83e4 100644 --- a/Userland/Utilities/kcov-example.cpp +++ b/Userland/Utilities/kcov-example.cpp @@ -4,12 +4,12 @@ * SPDX-License-Identifier: BSD-2-Clause */ +#include #include #include #include #include #include -#include #include #include