From e8510b641558d347d7d75254b4a31753f1c611ec Mon Sep 17 00:00:00 2001 From: Liav A Date: Tue, 11 Apr 2023 00:15:48 +0300 Subject: [PATCH] Kernel: Make Jail class to be AtomicRefCounted instead of RefCounted This will help ensuring that taking and dropping a reference, hence changing the ref-count, will be done in a safe manner in terms of concurrency. --- Kernel/Jail.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Kernel/Jail.h b/Kernel/Jail.h index cc4313e85e..5258dc27f3 100644 --- a/Kernel/Jail.h +++ b/Kernel/Jail.h @@ -6,6 +6,7 @@ #pragma once +#include #include #include #include @@ -25,7 +26,7 @@ class ProcessList; AK_TYPEDEF_DISTINCT_ORDERED_ID(u64, JailIndex); -class Jail : public RefCounted { +class Jail : public AtomicRefCounted { public: NonnullRefPtr process_list();