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

phList Class Reference
[ListsThread Safe]

#include <phList.h>

Inheritance diagram for phList:

phMutex phObject phObjectList List of all members.

Detailed Description

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.

Todo:
Write a test/example to make sure that multiple threads can safely access a phList.

Definition at line 150 of file phList.h.

Public Member Functions

 phList ()
 ~phList ()
uint32_t length ()
uint32_t getTotal ()
int isEmpty ()
int empty ()
int insert (phListNode *pobj, uint32_t index=0)
int remove (phListNode *pobj)
int push (phListNode *pobj)
phListNodepop ()
int enqueue (phListNode *node)
phListNodedequeue ()
int unshift (phListNode *node)
phListNodeshift ()
phListNoderemoveTail ()
phListNoderemoveHead ()
const phListNodegetHead ()
const phListNodegetTail ()

Protected Attributes

uint32_t m_totalNodes
phListNodem_head
phListNodem_tail


The documentation for this class was generated from the following files:



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:58 2007 for phission by  doxygen 1.4.4