summaryrefslogtreecommitdiff
path: root/Kernel
diff options
context:
space:
mode:
authorLiav A <liavalb@gmail.com>2023-04-11 00:15:48 +0300
committerLinus Groh <mail@linusgroh.de>2023-04-14 19:17:49 +0200
commite8510b641558d347d7d75254b4a31753f1c611ec (patch)
treeed94b3bbdd739a0721f97761615b429ba4757249 /Kernel
parentafcbdad1e3cf07b811ae7aa74a682ced1dbd84a1 (diff)
downloadserenity-e8510b641558d347d7d75254b4a31753f1c611ec.zip
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.
Diffstat (limited to 'Kernel')
-rw-r--r--Kernel/Jail.h3
1 files changed, 2 insertions, 1 deletions
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 <AK/AtomicRefCounted.h>
#include <AK/DistinctNumeric.h>
#include <AK/Error.h>
#include <AK/IntrusiveList.h>
@@ -25,7 +26,7 @@ class ProcessList;
AK_TYPEDEF_DISTINCT_ORDERED_ID(u64, JailIndex);
-class Jail : public RefCounted<Jail> {
+class Jail : public AtomicRefCounted<Jail> {
public:
NonnullRefPtr<ProcessList> process_list();