Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

phList.h File Reference

#include <phStdint.h>
#include <phObject.h>
#include <phMutex.h>

Go to the source code of this file.

Classes

class  phListNode
 phListNode is used with the phList class and represents a simple node type that can be added or removed from the list. It doesn't hold any information and classes should be derived from it if a node type that holds information wishes to be implemented. The phObjectNode is one class that inherits from this class and implements new methods specific to the phObjectNode and phObjectList classes. The node inherits from phMutex so that it can be locked when list operations are being performed to make the implementation thread-safe. Whenever the node pointers are being adjusted using phListNode::setNext or phListNode::setPrevious the specific instance of phListNode will be locked so that no other thread can try adjusting the pointers at the same time. The object is also locked in phListNode::getNext and phListNode::getPrevious so no thread can change the pointers while another thread is trying to get access to them. More...
class  phList
 The phList is a thread-safe linked list implementation. The list is locked whenever an operation is being performed on the list. List nodes are only locked if they are being looked at or having the next/previous pointers adjusted. Otherwise, it is possible for multiple threads to access multiple nodes at a time when the list doesn't have a node locked. More...




Copyright (C) 2002 - 2007 Philip D.S. Thoren ( pthoren@users.sourceforge.net )
University Of Massachusetts at Lowell
Robotics Lab
SourceForge.net Logo


Generated on Sat Jun 16 02:44:12 2007 for phission by  doxygen 1.4.4