diff --git a/Kernel/Library/ListedRefCounted.h b/Kernel/Library/ListedRefCounted.h index e0fdae1edc..6eaefee27b 100644 --- a/Kernel/Library/ListedRefCounted.h +++ b/Kernel/Library/ListedRefCounted.h @@ -10,6 +10,11 @@ namespace Kernel { +// ListedRefCounted is a slot-in replacement for RefCounted to use in classes +// that add themselves to a SpinLockProtectedValue 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 class ListedRefCounted : public RefCountedBase { public: