mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 23:17:45 +00:00
AK: Rename Retainable => RefCounted.
(And various related renames that go along with it.)
This commit is contained in:
parent
ef1bfcb9d8
commit
77b9fa89dd
45 changed files with 118 additions and 118 deletions
|
@ -10,7 +10,7 @@ class VFS;
|
|||
|
||||
// FIXME: Custody needs some locking.
|
||||
|
||||
class Custody : public Retainable<Custody> {
|
||||
class Custody : public RefCounted<Custody> {
|
||||
public:
|
||||
static Custody* get_if_cached(Custody* parent, const String& name);
|
||||
static Retained<Custody> get_or_create(Custody* parent, const String& name, Inode&);
|
||||
|
|
|
@ -1232,7 +1232,7 @@ InodeIdentifier Ext2FSInode::lookup(StringView name)
|
|||
return {};
|
||||
}
|
||||
|
||||
void Ext2FSInode::one_retain_left()
|
||||
void Ext2FSInode::one_ref_left()
|
||||
{
|
||||
// FIXME: I would like to not live forever, but uncached Ext2FS is fucking painful right now.
|
||||
}
|
||||
|
|
|
@ -21,7 +21,7 @@ public:
|
|||
bool is_symlink() const { return ::is_symlink(m_raw_inode.i_mode); }
|
||||
|
||||
// ^Inode (Retainable magic)
|
||||
virtual void one_retain_left() override;
|
||||
virtual void one_ref_left() override;
|
||||
|
||||
private:
|
||||
// ^Inode
|
||||
|
|
|
@ -19,7 +19,7 @@ class Region;
|
|||
class CharacterDevice;
|
||||
class SharedMemory;
|
||||
|
||||
class FileDescription : public Retainable<FileDescription> {
|
||||
class FileDescription : public RefCounted<FileDescription> {
|
||||
public:
|
||||
static Retained<FileDescription> create(RetainPtr<Custody>&&);
|
||||
static Retained<FileDescription> create(RetainPtr<File>&&, SocketRole = SocketRole::None);
|
||||
|
|
|
@ -23,7 +23,7 @@ class FileDescription;
|
|||
class LocalSocket;
|
||||
class VMObject;
|
||||
|
||||
class FS : public Retainable<FS> {
|
||||
class FS : public RefCounted<FS> {
|
||||
friend class Inode;
|
||||
|
||||
public:
|
||||
|
|
|
@ -14,14 +14,14 @@ class FileDescription;
|
|||
class LocalSocket;
|
||||
class VMObject;
|
||||
|
||||
class Inode : public Retainable<Inode> {
|
||||
class Inode : public RefCounted<Inode> {
|
||||
friend class VFS;
|
||||
friend class FS;
|
||||
|
||||
public:
|
||||
virtual ~Inode();
|
||||
|
||||
virtual void one_retain_left() {}
|
||||
virtual void one_ref_left() {}
|
||||
|
||||
FS& fs() { return m_fs; }
|
||||
const FS& fs() const { return m_fs; }
|
||||
|
|
|
@ -293,13 +293,13 @@ ByteBuffer procfs$pid_vmo(InodeIdentifier identifier)
|
|||
region->vmo().is_anonymous() ? "anonymous" : "file-backed",
|
||||
region->vmo().name().characters(),
|
||||
®ion->vmo(),
|
||||
region->vmo().retain_count());
|
||||
region->vmo().ref_count());
|
||||
for (size_t i = 0; i < region->vmo().page_count(); ++i) {
|
||||
auto& physical_page = region->vmo().physical_pages()[i];
|
||||
builder.appendf("P%x%s(%u) ",
|
||||
physical_page ? physical_page->paddr().get() : 0,
|
||||
region->should_cow(i) ? "!" : "",
|
||||
physical_page ? physical_page->retain_count() : 0);
|
||||
physical_page ? physical_page->ref_count() : 0);
|
||||
}
|
||||
builder.appendf("\n");
|
||||
}
|
||||
|
@ -406,7 +406,7 @@ ByteBuffer procfs$mm(InodeIdentifier)
|
|||
builder.appendf("VMO: %p %s(%u): p:%4u %s\n",
|
||||
vmo,
|
||||
vmo->is_anonymous() ? "anon" : "file",
|
||||
vmo->retain_count(),
|
||||
vmo->ref_count(),
|
||||
vmo->page_count(),
|
||||
vmo->name().characters());
|
||||
}
|
||||
|
@ -615,7 +615,7 @@ ByteBuffer procfs$inodes(InodeIdentifier)
|
|||
StringBuilder builder;
|
||||
for (auto it : all_inodes()) {
|
||||
RetainPtr<Inode> inode = *it;
|
||||
builder.appendf("Inode{K%x} %02u:%08u (%u)\n", inode.ptr(), inode->fsid(), inode->index(), inode->retain_count());
|
||||
builder.appendf("Inode{K%x} %02u:%08u (%u)\n", inode.ptr(), inode->fsid(), inode->index(), inode->ref_count());
|
||||
}
|
||||
return builder.to_byte_buffer();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue