The Pedigree Project
0.1
|
Utilities. More...
Typedefs | |
typedef RangeList< uintptr_t > | MemoryAllocator |
typedef StaticString< 32 > | TinyStaticString |
typedef StaticString< 64 > | NormalStaticString |
typedef StaticString< 128 > | LargeStaticString |
typedef StaticString< 1024 > | HugeStaticString |
Functions | |
template<typename originalT , class Struct , Struct *(Struct::*)() FunctionPrev, Struct *(Struct::*)() FunctionNext, typename T1 , typename T2 > | |
bool | operator== (const Iterator< originalT, Struct, FunctionPrev, FunctionNext, T1 > &x1, const Iterator< originalT, Struct, FunctionPrev, FunctionNext, T2 > &x2) |
template<typename originalT , class Struct , Struct *(Struct::*)() FunctionPrev, Struct *(Struct::*)() FunctionNext, typename K1 , typename T1 , typename K2 , typename T2 > | |
bool | operator== (const TreeIterator< originalT, Struct, FunctionPrev, FunctionNext, K1, T1 > &x1, const TreeIterator< originalT, Struct, FunctionPrev, FunctionNext, K2, T2 > &x2) |
template<class T1 , class T2 > | |
bool | operator== (const Pair< T1, T2 > &left, const Pair< T1, T2 > &right) |
template<class T1 , class T2 > | |
bool | operator!= (const Pair< T1, T2 > &left, const Pair< T1, T2 > &right) |
template<class T1 , class T2 > | |
bool | operator< (const Pair< T1, T2 > &left, const Pair< T1, T2 > &right) |
template<class T1 , class T2 > | |
bool | operator<= (const Pair< T1, T2 > &left, const Pair< T1, T2 > &right) |
template<class T1 , class T2 > | |
bool | operator> (const Pair< T1, T2 > &left, const Pair< T1, T2 > &right) |
template<class T1 , class T2 > | |
bool | operator>= (const Pair< T1, T2 > &left, const Pair< T1, T2 > &right) |
template<typename T1 , typename T2 > | |
Pair< T1, T2 > | makePair (T1 a, T2 b) |
template<class T1 , class T2 > | |
bool | operator!= (const T1 &x1, const T2 &x2) |
Global != operator for types with overloaded == operator. More... | |
template<class T > | |
T | operator++ (T &x, int) |
Global postincrement operator for types with overloaded preincrement operator. More... | |
template<class T > | |
T | operator-- (T &x, int) |
Global postdecrement operator for types with overloaded predecrement operator. More... | |
EXPORTED_PUBLIC void * | page_align (void *p) PURE |
List< T, nodePoolSize >::List () | |
List< T, nodePoolSize >::List (const List &x) | |
List< T, nodePoolSize >::~List () | |
List & | List< T, nodePoolSize >::operator= (const List &x) |
size_t | List< T, nodePoolSize >::size () const |
size_t | List< T, nodePoolSize >::count () const |
void | List< T, nodePoolSize >::pushBack (const T &value) |
void | List< T, nodePoolSize >::pushBack (T &&value) |
T | List< T, nodePoolSize >::popBack () |
void | List< T, nodePoolSize >::pushFront (const T &value) |
void | List< T, nodePoolSize >::pushFront (T &&value) |
T | List< T, nodePoolSize >::popFront () |
Iterator | List< T, nodePoolSize >::erase (Iterator &Iter) |
ReverseIterator | List< T, nodePoolSize >::erase (ReverseIterator &Iter) |
void | List< T, nodePoolSize >::clear () |
void | List< T, nodePoolSize >::assign (const List &x) |
RadixTree< T >::RadixTree () | |
RadixTree< T >::RadixTree (bool bCaseSensitive) | |
RadixTree< T >::~RadixTree () | |
RadixTree< T >::RadixTree (const RadixTree< T > &x) | |
RadixTree & | RadixTree< T >::operator= (const RadixTree &x) |
size_t | RadixTree< T >::count () const |
void | RadixTree< T >::insert (const String &key, const T &value) |
Result< T, bool > | RadixTree< T >::lookup (const String &key) const |
void | RadixTree< T >::remove (const String &key) |
Node * | RadixTree< T >::cloneNode (Node *node, Node *parent) |
void | RadixTree< T >::clear () |
void | RadixTree< T >::dump (void(*emit_line)(const char *s)) const |
void | RadixTree< T >::Node::returnAllChildren () |
Node * | RadixTree< T >::Node::findChild (const char *cpKey) const |
void | RadixTree< T >::Node::addChild (Node *pNode) |
void | RadixTree< T >::Node::replaceChild (Node *pNodeOld, Node *pNodeNew) |
void | RadixTree< T >::Node::removeChild (Node *pChild) |
MatchType | RadixTree< T >::Node::matchKey (const char *cpKey, size_t &offset) const |
void | RadixTree< T >::Node::setKey (const char *cpKey) |
void | RadixTree< T >::Node::setKey (const char *cpKey, size_t lengthHint) |
Node * | RadixTree< T >::Node::getFirstChild () const |
void | RadixTree< T >::Node::prependKey (const char *cpKey) |
Node * | RadixTree< T >::Node::doNext () const |
Node * | RadixTree< T >::Node::getNextSibling () const |
void | RadixTree< T >::Node::dump (void(*emit_line)(const char *s)) const |
Vector< T >::Vector () | |
Vector< T >::Vector (size_t size) | |
Vector< T >::Vector (const Vector &x) | |
Vector< T >::~Vector () | |
Vector & | Vector< T >::operator= (const Vector &x) |
T & | Vector< T >::operator[] (size_t index) const |
size_t | Vector< T >::size () const |
size_t | Vector< T >::count () const |
void | Vector< T >::pushBack (const T &value) |
T | Vector< T >::popBack () |
void | Vector< T >::pushFront (const T &value) |
T | Vector< T >::popFront () |
void | Vector< T >::setAt (size_t idx, const T &value) |
void | Vector< T >::clear (bool freeMem=false) |
void | Vector< T >::erase (size_t index) |
Iterator | Vector< T >::erase (Iterator iter) |
ReverseIterator | Vector< T >::erase (ReverseIterator iter) |
void | Vector< T >::assign (const Vector &x) |
void | Vector< T >::reserve (size_t size, bool copy) |
void | Vector< T >::reserve (size_t size, bool copy, bool free) |
void | Vector< T >::swap (Iterator a, Iterator b) |
void | Vector< T >::insert (size_t index, const T &value) |
Variables | |
template class EXPORTED_PUBLIC | StaticCord< 8 > |
template class EXPORTED_PUBLIC | StaticString< 32 > |
template class EXPORTED_PUBLIC | StaticString< 64 > |
template class EXPORTED_PUBLIC | StaticString< 128 > |
template class EXPORTED_PUBLIC | StaticString< 1024 > |
Utilities.
Classes, functions, defines that are utilised in the whole kernel
#define BS32 | ( | x | ) |
Adds a new child.
Definition at line 716 of file RadixTree.h.
Referenced by RadixTree< T >::cloneNode(), RadixTree< T >::insert(), and RadixTree< T >::remove().
void List< T, nodePoolSize >::assign | ( | const List< T, nodePoolSize > & | x | ) |
Copy the content of a List into this List
[in] | x | the reference List |
Definition at line 401 of file List.h.
References List< T, nodePoolSize >::begin(), List< T, nodePoolSize >::clear(), List< T, nodePoolSize >::end(), List< T, nodePoolSize >::m_Count, and List< T, nodePoolSize >::pushBack().
Referenced by List< T, nodePoolSize >::List(), and List< T, nodePoolSize >::operator=().
Copy the content of a Vector into this Vector
[in] | x | the reference Vector |
Definition at line 381 of file Vector.h.
References Vector< T >::count(), Vector< T >::m_Count, Vector< T >::m_Data, Vector< T >::m_Start, Vector< T >::reserve(), and Vector< T >::size().
Referenced by Vector< T >::operator=(), and Vector< T >::Vector().
void Vector< T >::clear | ( | bool | freeMem = false | ) |
Clear the Vector. Pass freeMem = true to also free the memory consumed by the Vector. Pass freeMem = false to retain the memory for future Vector usage.
Definition at line 337 of file Vector.h.
References Vector< T >::m_Count, Vector< T >::m_Data, Vector< T >::m_Size, and Vector< T >::m_Start.
Referenced by AllocationCommand::execute(), LockManager::LockManager(), PciAtaController::PciAtaController(), PosixProcess::PosixProcess(), X86CommonPhysicalMemoryManager::shutdown(), String::tokenise(), Ext2Node::wipe(), HostedPhysicalMemoryManager::~HostedPhysicalMemoryManager(), and RangeList< T, Reversed >::~RangeList().
void List< T, nodePoolSize >::clear | ( | ) |
Remove all elements from the List
Definition at line 386 of file List.h.
References List< T, nodePoolSize >::m_Count, List< T, nodePoolSize >::m_First, List< T, nodePoolSize >::m_Last, and _ListNode_t< T >::m_Next.
Referenced by List< T, nodePoolSize >::assign(), Event::getEventType(), HostedIrqManager::HostedIrqManager(), Pic::Pic(), Thread::reportWakeup(), Thread::setStatus(), WaitCleanup::terminated(), List< T, nodePoolSize >::~List(), and Semaphore::~Semaphore().
void RadixTree< T >::clear | ( | ) |
Clear the tree.
Definition at line 659 of file RadixTree.h.
References RadixTree< T >::getNewNode(), RadixTree< T >::m_nItems, RadixTree< T >::m_pRoot, and RadixTree< T >::returnNode().
Referenced by RadixTree< T >::operator=(), RadixTree< T >::RadixTree(), and RadixTree< T >::~RadixTree().
|
private |
Internal function to create a copy of a subtree.
Definition at line 637 of file RadixTree.h.
References RadixTree< T >::Node::addChild(), Vector< T >::begin(), Vector< T >::end(), RadixTree< T >::getNewNode(), RadixTree< T >::Node::m_Children, RadixTree< T >::Node::m_Key, and RadixTree< T >::Node::value.
Referenced by RadixTree< T >::operator=(), and RadixTree< T >::RadixTree().
size_t List< T, nodePoolSize >::count | ( | ) | const |
Get the number of elements in the List
Definition at line 227 of file List.h.
References List< T, nodePoolSize >::m_Count.
Referenced by Event::Event(), Thread::getNextEvent(), Process::getUserId(), NetworkFilter::installCallback(), Uhci::irq(), Ohci::irq(), Event::pendingCount(), PerProcessorScheduler::processorAddThread(), Semaphore::release(), Ohci::removeED(), Thread::shutdown(), and WaitCleanup::terminated().
size_t Vector< T >::count | ( | ) | const |
Get the number of elements in the Vector
Definition at line 264 of file Vector.h.
References Vector< T >::m_Count.
Referenced by Ext2Directory::addEntry(), IoPortManager::allocateIoPortList(), PhysicalMemoryManager::allocateMemoryRegionList(), ArmV7VirtualAddressSpace::allocateStack(), Vector< T >::assign(), Ext2Directory::cacheDirectoryContents(), Device::Device(), UsbHub::deviceConnected(), UsbHub::deviceDisconnected(), RadixTree< T >::Node::doNext(), RangeList< T, Reversed >::dump(), Ext2Node::ensureLargeEnough(), KernelElf::executeModules(), Ext2Node::fileAttributeChanged(), IoPortManager::freeIoPortList(), PhysicalMemoryManager::freeMemoryRegionList(), Device::getNumChildren(), NetworkStack::getNumDevices(), Process::getNumThreads(), Process::getThread(), HidReport::LocalState::getUsageByIndex(), PosixSubsystem::invoke(), KernelElf::loadModule(), ConsoleManager::newConsole(), PosixSubsystem::parseShebang(), RadixTree< T >::remove(), Ext2Directory::removeEntry(), RangeList< T, Reversed >::sweep(), WaitCleanup::terminated(), Ext2Node::updateMetadata(), KernelElf::waitForModulesToLoad(), Ext2Node::wipe(), X86VirtualAddressSpace::X86VirtualAddressSpace(), Ext2Node::~Ext2Node(), and RangeList< T, Reversed >::~RangeList().
size_t RadixTree< T >::count | ( | ) | const |
Get the number of elements in the Tree
Definition at line 341 of file RadixTree.h.
References RadixTree< T >::m_nItems.
Returns the next Node to look at during an in-order iteration.
Definition at line 820 of file RadixTree.h.
References Vector< T >::count(), RadixTree< T >::Node::getFirstChild(), RadixTree< T >::Node::getNextSibling(), RadixTree< T >::Node::m_Children, RadixTree< T >::Node::m_pParent, and RadixTree< T >::Node::value.
void RadixTree< T >::dump | ( | void(*)(const char *s) | emit_line | ) | const |
Dump the RadixTree in dot format.
Definition at line 668 of file RadixTree.h.
References RadixTree< T >::m_pRoot, and RadixTree< T >::returnNode().
Referenced by RadixTree< T >::Node::getNextSibling().
List< T, nodePoolSize >::Iterator List< T, nodePoolSize >::erase | ( | Iterator & | Iter | ) |
Erase an element
[in] | iterator | the iterator that points to the element |
Definition at line 343 of file List.h.
References Iterator< originalT, Struct, FunctionPrev, FunctionNext, T >::__getNode(), List< T, nodePoolSize >::m_Count, List< T, nodePoolSize >::m_First, List< T, nodePoolSize >::m_Last, _ListNode_t< T >::m_Next, and _ListNode_t< T >::m_Previous.
Referenced by Thread::cullEvent(), Event::deregisterThread(), PosixSubsystem::exit(), Process::getUserId(), Uhci::irq(), Ohci::irq(), Group::leave(), User::leave(), PosixProcess::PosixProcess(), MemoryMapManager::remove(), MemoryPressureManager::removeHandler(), Thread::removeRequest(), RoundRobin::removeThread(), Semaphore::removeThread(), Thread::removeWakeupWatcher(), Thread::shutdown(), MemoryMapManager::unmap(), MemoryMapManager::unmapAllUnlocked(), and Pic::unregisterHandler().
List< T, nodePoolSize >::ReverseIterator List< T, nodePoolSize >::erase | ( | ReverseIterator & | Iter | ) |
Erase an element with a reverse iterator
[in] | reverse | iterator the iterator that points to the element |
Definition at line 365 of file List.h.
References Iterator< originalT, Struct, FunctionPrev, FunctionNext, T >::__getNode(), List< T, nodePoolSize >::m_Count, List< T, nodePoolSize >::m_First, List< T, nodePoolSize >::m_Last, _ListNode_t< T >::m_Next, and _ListNode_t< T >::m_Previous.
void Vector< T >::erase | ( | size_t | index | ) |
Erase the element at the given index.
Definition at line 350 of file Vector.h.
References Vector< T >::m_Count, Vector< T >::m_Data, and Vector< T >::m_Start.
Referenced by RangeList< T, Reversed >::allocate(), RangeList< T, Reversed >::allocateSpecific(), NetworkStack::deRegisterDevice(), Vector< T >::erase(), AllocationCommand::execute(), IoPortManager::free(), Device::removeChild(), Process::removeThread(), RangeList< T, Reversed >::sweep(), PpcCommonPhysicalMemoryManager::unmapRegion(), HostedPhysicalMemoryManager::unmapRegion(), and X86CommonPhysicalMemoryManager::unmapRegion().
Erase one Element
Definition at line 367 of file Vector.h.
References Vector< T >::begin(), and Vector< T >::erase().
Vector< T >::ReverseIterator Vector< T >::erase | ( | ReverseIterator | iter | ) |
Erase one Element
Definition at line 374 of file Vector.h.
References Vector< T >::erase(), Vector< T >::m_Data, and Vector< T >::m_Start.
RadixTree< T >::Node * RadixTree< T >::Node::findChild | ( | const char * | cpKey | ) | const |
Locates a child of this node, given the key portion of key (lookahead on the first token)
Definition at line 702 of file RadixTree.h.
Referenced by RadixTree< T >::insert(), RadixTree< T >::lookup(), and RadixTree< T >::remove().
Returns the first found child of the node.
Definition at line 806 of file RadixTree.h.
Referenced by RadixTree< T >::Node::doNext(), and RadixTree< T >::remove().
Returns the node's next sibling, by looking at its parent's children.
Definition at line 847 of file RadixTree.h.
References RadixTree< T >::dump().
Referenced by RadixTree< T >::Node::doNext().
void Vector< T >::insert | ( | size_t | index, |
const T & | value | ||
) |
Insert into the vector, moving all items after the given position along.
Definition at line 442 of file Vector.h.
References Vector< T >::m_Count, Vector< T >::m_Data, Vector< T >::m_Start, Vector< T >::pushBack(), Vector< T >::pushFront(), and Vector< T >::reserve().
Add an element to the Tree.
[in] | key | the key |
[in] | value | the element |
Definition at line 347 of file RadixTree.h.
References RadixTree< T >::Node::addChild(), RadixTree< T >::Node::ExactMatch, FATAL, RadixTree< T >::Node::findChild(), RadixTree< T >::getNewNode(), RadixTree< T >::Node::m_Key, RadixTree< T >::m_nItems, RadixTree< T >::m_pRoot, RadixTree< T >::Node::matchKey(), RadixTree< T >::Node::NoMatch, RadixTree< T >::Node::OverMatch, RadixTree< T >::Node::PartialMatch, and RadixTree< T >::Node::replaceChild().
Referenced by ConfigurationManager::insert(), DynamicLinker::loadObject(), and DynamicLinker::loadProgram().
List< T, nodePoolSize >::List | ( | const List< T, nodePoolSize > & | x | ) |
Copy-constructor
[in] | x | reference object |
Definition at line 202 of file List.h.
References List< T, nodePoolSize >::assign().
Attempts to find an element with the given key.
Definition at line 462 of file RadixTree.h.
References RadixTree< T >::Node::ExactMatch, RadixTree< T >::Node::findChild(), RadixTree< T >::Node::m_Key, RadixTree< T >::m_pRoot, RadixTree< T >::Node::matchKey(), RadixTree< T >::Node::NoMatch, RadixTree< T >::Node::OverMatch, and RadixTree< T >::Node::PartialMatch.
Referenced by FileDescriptor::FileDescriptor(), ConfigurationManager::insert(), DynamicLinker::loadObject(), DynamicLinker::loadProgram(), FileDescriptor::operator=(), ConfigurationManager::select(), ConfigurationManager::unwatch(), and ConfigurationManager::watch().
RadixTree< T >::Node::MatchType RadixTree< T >::Node::matchKey | ( | const char * | cpKey, |
size_t & | offset | ||
) | const |
Compares cpKey and this node's key, returning the type of match found. The offset out parameter provides the position where a partial match ceases.
Definition at line 753 of file RadixTree.h.
References RadixTree< T >::m_bCaseSensitive.
Referenced by RadixTree< T >::insert(), RadixTree< T >::lookup(), and RadixTree< T >::remove().
bool operator!= | ( | const T1 & | x1, |
const T2 & | x2 | ||
) |
Global != operator for types with overloaded == operator.
Global != operator is provided for every type that provides a == operator
[in] | x1 | first operand |
[in] | x2 | second operand |
Definition at line 32 of file template.h.
Referenced by IpAddress::operator+().
T operator++ | ( | T & | x, |
int | |||
) |
Global postincrement operator for types with overloaded preincrement operator.
Global postincrement operator is provided for every type that provides a preincrement operator.
[in] | x | object |
Definition at line 41 of file template.h.
T operator-- | ( | T & | x, |
int | |||
) |
Global postdecrement operator for types with overloaded predecrement operator.
Global postdecrement operator is provided for every type that provides a predecrement operator.
[in] | x | object |
Definition at line 52 of file template.h.
List< T, nodePoolSize > & List< T, nodePoolSize >::operator= | ( | const List< T, nodePoolSize > & | x | ) |
Assignment operator
[in] | x | the object that should be copied |
Definition at line 215 of file List.h.
References List< T, nodePoolSize >::assign().
The assignment operator
[in] | x | the object that should be copied |
Definition at line 242 of file Vector.h.
References Vector< T >::assign().
The assignment operator
[in] | x | the object that should be copied |
Definition at line 330 of file RadixTree.h.
References RadixTree< T >::clear(), RadixTree< T >::cloneNode(), RadixTree< T >::m_nItems, RadixTree< T >::m_pRoot, and RadixTree< T >::returnNode().
bool operator== | ( | const Iterator< originalT, Struct, FunctionPrev, FunctionNext, T1 > & | x1, |
const Iterator< originalT, Struct, FunctionPrev, FunctionNext, T2 > & | x2 | ||
) |
Comparison operator for the Iterator class
[in] | x1 | the first operand |
[in] | x2 | the second operand |
Definition at line 326 of file Iterator.h.
References Iterator< originalT, Struct, FunctionPrev, FunctionNext, T >::m_Node.
Referenced by StaticString< LOG_LENGTH >::assign(), String::operator StringView(), IpAddress::operator+(), and Pedigree::IpAddress::operator=().
bool operator== | ( | const TreeIterator< originalT, Struct, FunctionPrev, FunctionNext, K1, T1 > & | x1, |
const TreeIterator< originalT, Struct, FunctionPrev, FunctionNext, K2, T2 > & | x2 | ||
) |
Comparison operator for the TreeIterator class
[in] | x1 | the first operand |
[in] | x2 | the second operand |
Definition at line 343 of file Iterator.h.
References TreeIterator< originalT, Struct, FunctionPrev, FunctionNext, K, T >::m_Node.
T & Vector< T >::operator[] | ( | size_t | index | ) | const |
The [] operator
[in] | index | the index of the element that should be returned |
Definition at line 249 of file Vector.h.
References Vector< T >::m_Count, Vector< T >::m_Data, and Vector< T >::m_Start.
EXPORTED_PUBLIC void* page_align | ( | void * | p | ) |
Page-align the given pointer.
Definition at line 28 of file utility.cc.
References DEBUG_LOG, ERROR, FATAL, PhysicalMemoryManager::getPageSize(), NOTICE, and WARNING.
Referenced by HostedVirtualAddressSpace::getMapping(), HostedVirtualAddressSpace::isMapped(), HostedVirtualAddressSpace::map(), HostedVirtualAddressSpace::setFlags(), and HostedVirtualAddressSpace::unmap().
T List< T, nodePoolSize >::popBack | ( | ) |
Remove the last element from the List
Definition at line 264 of file List.h.
References List< T, nodePoolSize >::m_Count, List< T, nodePoolSize >::m_First, List< T, nodePoolSize >::m_Last, _ListNode_t< T >::m_Next, List< T, nodePoolSize >::m_NodePool, _ListNode_t< T >::m_Previous, and _ListNode_t< T >::value.
T Vector< T >::popBack | ( | ) |
Remove the element from the back and return it
Definition at line 286 of file Vector.h.
References Vector< T >::m_Count, Vector< T >::m_Data, and Vector< T >::m_Start.
Referenced by ArmV7VirtualAddressSpace::allocateStack(), IoPortManager::freeIoPortList(), PhysicalMemoryManager::freeMemoryRegionList(), PosixSubsystem::parseShebang(), LockManager::released(), and X86VirtualAddressSpace::X86VirtualAddressSpace().
T List< T, nodePoolSize >::popFront | ( | ) |
Remove the first element in the List
Definition at line 319 of file List.h.
References List< T, nodePoolSize >::m_Count, List< T, nodePoolSize >::m_First, List< T, nodePoolSize >::m_Last, _ListNode_t< T >::m_Next, List< T, nodePoolSize >::m_NodePool, _ListNode_t< T >::m_Previous, and _ListNode_t< T >::value.
Referenced by RoundRobin::getNext(), Thread::getNextEvent(), Uhci::irq(), Ohci::irq(), Nic3C90x::Nic3C90x(), PerProcessorScheduler::processorAddThread(), and Semaphore::release().
T Vector< T >::popFront | ( | ) |
Remove the element from the front and return it
Definition at line 321 of file Vector.h.
References Vector< T >::m_Count, Vector< T >::m_Data, and Vector< T >::m_Start.
void RadixTree< T >::Node::prependKey | ( | const char * | cpKey | ) |
Sets the node's key to the concatenation of cpKey
and the current key.
cpKey | Key to prepend to the current key. |
Definition at line 812 of file RadixTree.h.
Referenced by RadixTree< T >::remove().
void List< T, nodePoolSize >::pushBack | ( | const T & | value | ) |
Add a value to the end of the List
[in] | value | the value that should be added |
Definition at line 232 of file List.h.
References List< T, nodePoolSize >::m_Count, List< T, nodePoolSize >::m_First, List< T, nodePoolSize >::m_Last, _ListNode_t< T >::m_Next, List< T, nodePoolSize >::m_NodePool, _ListNode_t< T >::m_Previous, and _ListNode_t< T >::value.
Referenced by Semaphore::acquireWithResult(), VFS::addMountCallback(), VFS::addProbeCallback(), Thread::addRequest(), Uhci::addTransferToTransaction(), Ohci::addTransferToTransaction(), Thread::addWakeupWatcher(), List< T, nodePoolSize >::assign(), MemoryMapManager::clone(), Elf::create(), Elf::createNeededOnly(), PosixSubsystem::freeMultipleFds(), Thread::getNextEvent(), VmwareGraphics::getScreenModes(), Process::getUserId(), Scheduler::initialise(), NetworkFilter::installCallback(), Nic3C90x::irq(), Uhci::irq(), Ohci::irq(), Group::join(), User::join(), MemoryMapManager::mapAnon(), MemoryMapManager::mapFile(), PosixProcess::PosixProcess(), PerProcessorScheduler::processorAddThread(), MemoryPressureManager::registerHandler(), Pic::registerIsaIrqHandler(), Pic::registerPciIrqHandler(), Event::registerThread(), Semaphore::release(), MemoryMapManager::remove(), Thread::sendEvent(), MemoryMapManager::setPermissions(), AnonymousMemoryMap::split(), WaitCleanup::terminated(), and RoundRobin::threadStatusChanged().
void List< T, nodePoolSize >::pushBack | ( | T && | value | ) |
Add a value to the end of the List
[in] | value | the value that should be added |
Definition at line 248 of file List.h.
References List< T, nodePoolSize >::m_Count, List< T, nodePoolSize >::m_First, List< T, nodePoolSize >::m_Last, _ListNode_t< T >::m_Next, List< T, nodePoolSize >::m_NodePool, _ListNode_t< T >::m_Previous, and _ListNode_t< T >::value.
void Vector< T >::pushBack | ( | const T & | value | ) |
Add an element to the end of the Vector
[in] | value | the element |
Definition at line 270 of file Vector.h.
References Vector< T >::m_Count, Vector< T >::m_Data, Vector< T >::m_Size, Vector< T >::m_Start, and Vector< T >::reserve().
Referenced by LockManager::acquired(), Device::addChild(), Process::addThread(), IoPortManager::allocate(), IoPortManager::allocateIoPortList(), PhysicalMemoryManager::allocateMemoryRegionList(), ArmV7PhysicalMemoryManager::allocateRegion(), HostedPhysicalMemoryManager::allocateRegion(), PpcCommonPhysicalMemoryManager::allocateRegion(), X86CommonPhysicalMemoryManager::allocateRegion(), RangeList< T, Reversed >::allocateSpecific(), ArmV7VirtualAddressSpace::allocateStack(), HostedVirtualAddressSpace::clone(), X64VirtualAddressSpace::clone(), Thread::cullEvent(), Device::Device(), Directory::empty(), Ext2Node::ensureLargeEnough(), AllocationCommand::execute(), KernelElf::executeModules(), Ext2Node::Ext2Node(), Ext2Filesystem::findFreeBlocksInGroup(), RangeList< T, Reversed >::free(), X86VirtualAddressSpace::fromFlags(), PosixProcess::getUserId(), Vector< T >::insert(), KernelElf::loadModule(), ConsoleManager::newConsole(), HidReport::parseDescriptor(), RangeList< T, Reversed >::RangeList(), NetworkStack::registerDevice(), LockManager::released(), Ext2Filesystem::releaseInode(), WaitCleanup::terminated(), String::tokenise(), and Ext2Node::~Ext2Node().
void List< T, nodePoolSize >::pushFront | ( | const T & | value | ) |
Add a value to the front of the List
[in] | value | the value that should be added |
Definition at line 287 of file List.h.
References List< T, nodePoolSize >::m_Count, List< T, nodePoolSize >::m_First, List< T, nodePoolSize >::m_Last, _ListNode_t< T >::m_Next, List< T, nodePoolSize >::m_NodePool, _ListNode_t< T >::m_Previous, and _ListNode_t< T >::value.
Referenced by Uhci::irq(), and Ohci::irq().
void List< T, nodePoolSize >::pushFront | ( | T && | value | ) |
Add a value to the front of the List
[in] | value | the value that should be added |
Definition at line 303 of file List.h.
References List< T, nodePoolSize >::m_Count, List< T, nodePoolSize >::m_First, List< T, nodePoolSize >::m_Last, _ListNode_t< T >::m_Next, List< T, nodePoolSize >::m_NodePool, _ListNode_t< T >::m_Previous, and _ListNode_t< T >::value.
void Vector< T >::pushFront | ( | const T & | value | ) |
Add an element to the front of the Vector
[in] | value | the element |
Definition at line 293 of file Vector.h.
References Vector< T >::m_Count, Vector< T >::m_Data, Vector< T >::m_Start, and Vector< T >::reserve().
Referenced by RangeList< T, Reversed >::free(), Vector< T >::insert(), and PosixSubsystem::parseShebang().
The default constructor, does nothing
Definition at line 300 of file RadixTree.h.
The copy-constructor
[in] | x | the reference object to copy |
Definition at line 319 of file RadixTree.h.
References RadixTree< T >::clear(), RadixTree< T >::cloneNode(), RadixTree< T >::m_nItems, RadixTree< T >::m_pRoot, and RadixTree< T >::returnNode().
Constructor that offers case sensitivity adjustment.
Definition at line 306 of file RadixTree.h.
Attempts to remove an element with the given key.
Definition at line 511 of file RadixTree.h.
References RadixTree< T >::Node::addChild(), Vector< T >::count(), RadixTree< T >::Node::ExactMatch, RadixTree< T >::Node::findChild(), RadixTree< T >::Node::getFirstChild(), RadixTree< T >::getNewNode(), RadixTree< T >::Node::m_Children, RadixTree< T >::Node::m_Key, RadixTree< T >::m_nItems, RadixTree< T >::m_pRoot, RadixTree< T >::Node::matchKey(), RadixTree< T >::Node::NoMatch, RadixTree< T >::Node::OverMatch, RadixTree< T >::Node::PartialMatch, RadixTree< T >::Node::prependKey(), RadixTree< T >::Node::removeChild(), and RadixTree< T >::returnNode().
Referenced by FileDescriptor::~FileDescriptor().
Removes a child (doesn't delete it)
Definition at line 736 of file RadixTree.h.
Referenced by RadixTree< T >::remove().
Replaces a currently existing child.
Definition at line 723 of file RadixTree.h.
Referenced by RadixTree< T >::insert().
void Vector< T >::reserve | ( | size_t | size, |
bool | copy | ||
) |
Reserve space for size elements
[in] | size | the number of elements to reserve space for |
[in] | copy | Should we copy the old contents over? |
Definition at line 390 of file Vector.h.
Referenced by Vector< T >::assign(), Ext2Node::Ext2Node(), Vector< T >::insert(), Vector< T >::pushBack(), Vector< T >::pushFront(), and Vector< T >::Vector().
|
private |
Internal reserve() function.
[in] | size | the number of elements to reserve space for |
[in] | copy | Should we copy the old contents over? |
[in] | free | should we free the old buffer? |
Definition at line 396 of file Vector.h.
References Vector< T >::m_Data, Vector< T >::m_ReserveFactor, Vector< T >::m_Size, Vector< T >::m_Start, and Vector< T >::size().
void Vector< T >::setAt | ( | size_t | idx, |
const T & | value | ||
) |
Set an element at the given index, if it exists.
Definition at line 330 of file Vector.h.
References Vector< T >::m_Count, Vector< T >::m_Data, and Vector< T >::m_Start.
void RadixTree< T >::Node::setKey | ( | const char * | cpKey, |
size_t | lengthHint | ||
) |
If you know the length of cpKey, this can be a small boost.
Definition at line 800 of file RadixTree.h.
size_t List< T, nodePoolSize >::size | ( | ) | const |
Get the number of elements we reserved space for
Definition at line 222 of file List.h.
References List< T, nodePoolSize >::m_Count.
Referenced by PosixSubsystem::exit().
size_t Vector< T >::size | ( | ) | const |
Get the number of elements that we have reserved space for
Definition at line 258 of file Vector.h.
References Vector< T >::m_Size.
Referenced by Vector< T >::assign(), RangeList< T, Reversed >::getRange(), PosixProcess::getUserId(), Ext2Filesystem::releaseInode(), and Vector< T >::reserve().
Swap the two elements.
Definition at line 426 of file Vector.h.
References Vector< T >::begin(), and Vector< T >::end().
Reserves space for size elements
[in] | size | the number of elements |
Definition at line 222 of file Vector.h.
References Vector< T >::reserve().
The copy-constructor
[in] | x | the reference object to copy |
Definition at line 228 of file Vector.h.
References Vector< T >::assign().
Destructor, deallocates memory
Definition at line 208 of file List.h.
References assert, and List< T, nodePoolSize >::clear().
The destructor, deallocates memory
Definition at line 312 of file RadixTree.h.
References RadixTree< T >::clear(), RadixTree< T >::m_pRoot, and RadixTree< T >::returnNode().
The destructor, deallocates memory
Definition at line 235 of file Vector.h.
References Vector< T >::m_Data.