mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 12:27:36 +00:00
Add an inode metadata cache to the ext2fs implementation.
This commit is contained in:
parent
4259ffb080
commit
8e640539ef
7 changed files with 57 additions and 5 deletions
|
@ -36,6 +36,7 @@ public:
|
|||
|
||||
void lock(const char* func = nullptr)
|
||||
{
|
||||
(void)func;
|
||||
#ifdef DEBUG_LOCKS
|
||||
{
|
||||
InterruptDisabler dis;
|
||||
|
@ -56,6 +57,7 @@ public:
|
|||
|
||||
void unlock(const char* func = nullptr)
|
||||
{
|
||||
(void)func;
|
||||
// barrier();
|
||||
ASSERT(m_lock);
|
||||
m_lock = 0;
|
||||
|
|
|
@ -29,6 +29,7 @@ public:
|
|||
RetainPtr(T* ptr) : m_ptr(ptr) { retainIfNotNull(m_ptr); }
|
||||
RetainPtr(T& object) : m_ptr(&object) { m_ptr->retain(); }
|
||||
RetainPtr(AdoptTag, T& object) : m_ptr(&object) { }
|
||||
RetainPtr(RetainPtr& other) : m_ptr(other.copyRef().leakRef()) { }
|
||||
RetainPtr(RetainPtr&& other) : m_ptr(other.leakRef()) { }
|
||||
template<typename U> RetainPtr(RetainPtr<U>&& other) : m_ptr(static_cast<T*>(other.leakRef())) { }
|
||||
~RetainPtr()
|
||||
|
|
|
@ -17,7 +17,7 @@ public:
|
|||
{
|
||||
ASSERT(m_retainCount);
|
||||
if (!--m_retainCount)
|
||||
delete static_cast<const T*>(this);
|
||||
delete static_cast<T*>(this);
|
||||
}
|
||||
|
||||
int retainCount() const
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue