mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-05 10:42:51 +00:00
This is some syntaxic sugar to use a ContendedResource object with reference counting. This effectively dissociates merely holding a reference to an object and actually using the object in a way that requires locking it against concurrent use.
17 lines
288 B
C++
17 lines
288 B
C++
/*
|
|
* Copyright (c) 2021, the SerenityOS developers.
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <AK/RefPtr.h>
|
|
#include <Kernel/Locking/RefCountedContended.h>
|
|
|
|
namespace Kernel {
|
|
|
|
template<typename T>
|
|
using RefContendedPtr = RefPtr<RefCountedContended<T>>;
|
|
|
|
}
|