mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 23:50:19 +00:00
39ceefa5dd
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
309 B
C++
17 lines
309 B
C++
/*
|
|
* Copyright (c) 2021, the SerenityOS developers.
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <AK/NonnullRefPtr.h>
|
|
#include <Kernel/Locking/RefCountedContended.h>
|
|
|
|
namespace Kernel {
|
|
|
|
template<typename T>
|
|
using NonnullRefContendedPtr = NonnullRefPtr<RefCountedContended<T>>;
|
|
|
|
}
|