Kernel: Make Custody slab-allocated

This commit is contained in:
Andreas Kling 2020-02-22 14:33:51 +01:00
parent ba83bf8a0d
commit 6428669a37
Notes: sideshowbarker 2024-07-19 09:10:14 +09:00

View file

@ -31,13 +31,18 @@
#include <AK/RefPtr.h>
#include <AK/String.h>
#include <Kernel/Forward.h>
#include <Kernel/Heap/SlabAllocator.h>
namespace Kernel {
// FIXME: Custody needs some locking.
class Custody : public RefCounted<Custody>
class Custody
: public RefCounted<Custody>
, public InlineLinkedListNode<Custody> {
MAKE_SLAB_ALLOCATED(Custody)
public:
static Custody* get_if_cached(Custody* parent, const StringView& name);
static NonnullRefPtr<Custody> get_or_create(Custody* parent, const StringView& name, Inode&, int mount_flags);