1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 07:37:35 +00:00

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.
This commit is contained in:
Liav A 2023-04-11 00:15:48 +03:00 committed by Linus Groh
parent afcbdad1e3
commit e8510b6415

View file

@ -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();