mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 07:27:45 +00:00
Kernel: Add a little explainer comment to ListedRefCounted
This commit is contained in:
parent
ea09294351
commit
45a5cf95f9
1 changed files with 5 additions and 0 deletions
|
@ -10,6 +10,11 @@
|
|||
|
||||
namespace Kernel {
|
||||
|
||||
// ListedRefCounted<T> is a slot-in replacement for RefCounted<T> to use in classes
|
||||
// that add themselves to a SpinLockProtectedValue<IntrusiveList> when constructed.
|
||||
// The custom unref() implementation here ensures that the the list is locked during
|
||||
// unref(), and that the T is removed from the list before ~T() is invoked.
|
||||
|
||||
template<typename T>
|
||||
class ListedRefCounted : public RefCountedBase {
|
||||
public:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue