mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 09:24:57 +00:00
Implement /proc/PID/vm.
Refactored SyntheticFileSystem to maintain an arbitrary directory structure. ProcFileSystem creates a directory entry in /proc for each new process.
This commit is contained in:
parent
10347b9ae8
commit
a32b3a3ddf
15 changed files with 217 additions and 39 deletions
|
@ -56,7 +56,7 @@ public:
|
|||
|
||||
class Iterator {
|
||||
public:
|
||||
bool operator!=(const Iterator& other)
|
||||
bool operator!=(const Iterator& other) const
|
||||
{
|
||||
if (m_isEnd && other.m_isEnd)
|
||||
return false;
|
||||
|
@ -65,6 +65,7 @@ public:
|
|||
|| m_bucketIndex != other.m_bucketIndex
|
||||
|| m_bucketIterator != other.m_bucketIterator;
|
||||
}
|
||||
bool operator==(const Iterator& other) const { return !(*this != other); }
|
||||
T& operator*()
|
||||
{
|
||||
#ifdef HASHTABLE_DEBUG
|
||||
|
@ -126,12 +127,12 @@ public:
|
|||
typename DoublyLinkedList<T>::Iterator m_bucketIterator;
|
||||
};
|
||||
|
||||
Iterator begin() { return Iterator(*this, false); }
|
||||
Iterator begin() { return Iterator(*this, isEmpty()); }
|
||||
Iterator end() { return Iterator(*this, true); }
|
||||
|
||||
class ConstIterator {
|
||||
public:
|
||||
bool operator!=(const ConstIterator& other)
|
||||
bool operator!=(const ConstIterator& other) const
|
||||
{
|
||||
if (m_isEnd && other.m_isEnd)
|
||||
return false;
|
||||
|
@ -140,6 +141,7 @@ public:
|
|||
|| m_bucketIndex != other.m_bucketIndex
|
||||
|| m_bucketIterator != other.m_bucketIterator;
|
||||
}
|
||||
bool operator==(const ConstIterator& other) const { return !(*this != other); }
|
||||
const T& operator*() const
|
||||
{
|
||||
#ifdef HASHTABLE_DEBUG
|
||||
|
@ -203,7 +205,7 @@ public:
|
|||
typename DoublyLinkedList<T>::ConstIterator m_bucketIterator;
|
||||
};
|
||||
|
||||
ConstIterator begin() const { return ConstIterator(*this, false); }
|
||||
ConstIterator begin() const { return ConstIterator(*this, isEmpty()); }
|
||||
ConstIterator end() const { return ConstIterator(*this, true); }
|
||||
|
||||
Iterator find(const T&);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue