From 44e992429f2b6028a1b18b3898392d850afb6d14 Mon Sep 17 00:00:00 2001 From: Brian Gianforcaro Date: Sat, 31 Jul 2021 00:40:22 -0700 Subject: [PATCH] Kernel: Only include AK/SourceLocation.h if LOCK_DEBUG is enabled Don't pay the header inclusion cost if we aren't compiling with the LOCK_DEBUG option enabled. --- Kernel/Mutex.cpp | 4 +++- Kernel/Thread.h | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Kernel/Mutex.cpp b/Kernel/Mutex.cpp index 85aed7ea0b..6a84d826df 100644 --- a/Kernel/Mutex.cpp +++ b/Kernel/Mutex.cpp @@ -4,7 +4,9 @@ * SPDX-License-Identifier: BSD-2-Clause */ -#include +#ifdef LOCK_DEBUG +# include +#endif #include #include #include diff --git a/Kernel/Thread.h b/Kernel/Thread.h index 212effb3e6..21914e343e 100644 --- a/Kernel/Thread.h +++ b/Kernel/Thread.h @@ -12,7 +12,9 @@ #include #include #include -#include +#ifdef LOCK_DEBUG +# include +#endif #include #include #include