Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

listNode.c File Reference


Detailed Description

Implementation for the list node functions.

Definition in file listNode.c.

Include dependency graph for listNode.c:

Include dependency graph

Go to the source code of this file.

Functions

void lnRemove (struct lnMinNode *node)
 Remove a node from the list.
void lnNewList (struct lnMinList *list)
 Initialize a list.
void lnMoveList (struct lnMinList *dest, struct lnMinList *src)
 Transfer the nodes on src to dest, overwriting any nodes on dest.
void lnAppendList (struct lnMinList *dest, struct lnMinList *src)
 Append the nodes from src to dest.
void lnAddHead (struct lnMinList *list, struct lnMinNode *node)
 Add a node to the head of the list.
void lnAddTail (struct lnMinList *list, struct lnMinNode *node)
 Add a node to the tail of the list.
lnMinNodelnRemHead (struct lnMinList *list)
 Remove and return the node at the head of the list, or NULL if the list is empty.
lnMinNodelnRemTail (struct lnMinList *list)
 Remove and return the node at the tail of the list, or NULL if the list is empty.
void lnInsert (struct lnMinNode *pred, struct lnMinNode *node)
 Insert a node at a specific position in a list.
void lnEnqueue (struct lnList *list, struct lnNode *node)
 Insert a node into a prioritized list.
lnNodelnFindName (struct lnList *list, const char *name)
 Find a node with the given name.
unsigned int lnCountNodes (struct lnMinList *list)
 Count the number of nodes in a list.


Function Documentation

void lnAddHead struct lnMinList list,
struct lnMinNode node
 

Add a node to the head of the list.

Parameters:
list The list object the node is to be added to.
node The node to add.

Definition at line 92 of file listNode.c.

References lnMinList::lh_Head, lnMinNode::ln_Pred, lnMinNode::ln_Succ, and require.

Referenced by WeightedPolicyImpl::RedistributeCPU(), and StrictPolicyImpl::RedistributeCPU().

void lnAddTail struct lnMinList list,
struct lnMinNode node
 

Add a node to the tail of the list.

Parameters:
list The list object the node is to be added to.
node The node to add.

Definition at line 105 of file listNode.c.

References lnMinList::lh_Tail, lnMinList::lh_TailPred, lnMinNode::ln_Pred, lnMinNode::ln_Succ, and require.

Referenced by WeightedPolicyImpl::AddTask(), PartitionPolicyImpl::AddTask(), ManagerImpl::AddTask(), cpCreateChildProcess(), lnEnqueue(), WeightedPolicyImpl::RedistributeCPU(), StrictPolicyImpl::RedistributeCPU(), and rk_resource_set_create().

void lnAppendList struct lnMinList dest,
struct lnMinList src
 

Append the nodes from src to dest.

Parameters:
dest The destination list object.
src The source list object.

Definition at line 74 of file listNode.c.

References lnMinList::lh_Head, lnMinList::lh_Tail, lnMinList::lh_TailPred, lnMinNode::ln_Pred, lnMinNode::ln_Succ, lnEmptyList, lnNewList(), and require.

Here is the call graph for this function:

unsigned int lnCountNodes struct lnMinList list  ) 
 

Count the number of nodes in a list.

Parameters:
list The list to scan.
Returns:
The number of nodes in the list.

Definition at line 220 of file listNode.c.

References lnMinList::lh_Head, lnMinNode::ln_Succ, and require.

Referenced by WeightedPolicyImpl::GetTaskList(), StrictPolicyImpl::GetTaskList(), PartitionPolicyImpl::GetTaskList(), and ManagerImpl::GetTaskList().

void lnEnqueue struct lnList list,
struct lnNode node
 

Insert a node into a prioritized list.

Parameters:
list An ordered list.
node The node to insert.

Definition at line 174 of file listNode.c.

References lnList::lh_Head, lnNode::ln_Pred, lnNode::ln_Pri, lnNode::ln_Succ, lnAddTail(), lnInsert(), and require.

Referenced by StrictPolicyImpl::AddTask(), and StrictPolicyImpl::SetTaskPriority().

Here is the call graph for this function:

struct lnNode* lnFindName struct lnList list,
const char *  name
 

Find a node with the given name.

Parameters:
list The list to search.
name The name to search for.
Returns:
The first node in the list that matches the given name or NULL if no match could be found.

Definition at line 199 of file listNode.c.

References lnList::lh_Head, lnNode::ln_Name, lnNode::ln_Succ, and require.

void lnInsert struct lnMinNode pred,
struct lnMinNode node
 

Insert a node at a specific position in a list.

Parameters:
pred The node in the list that the new node should be inserted after.
node The node to insert.

Definition at line 161 of file listNode.c.

References lnMinNode::ln_Pred, lnMinNode::ln_Succ, and require.

Referenced by lnEnqueue().

void lnMoveList struct lnMinList dest,
struct lnMinList src
 

Transfer the nodes on src to dest, overwriting any nodes on dest.

Parameters:
dest The destination list object.
src The source list object.

Definition at line 60 of file listNode.c.

References lnMinList::lh_Head, lnMinList::lh_Tail, lnMinList::lh_TailPred, lnMinNode::ln_Pred, lnMinNode::ln_Succ, lnNewList(), and require.

Here is the call graph for this function:

void lnNewList struct lnMinList list  ) 
 

Initialize a list.

Parameters:
list The list object to initialize.

Definition at line 49 of file listNode.c.

References lnMinList::lh_Head, lnMinList::lh_Tail, lnMinList::lh_TailPred, and require.

Referenced by cpInitChildProcessData(), lnAppendList(), lnMoveList(), ManagerImpl::ManagerImpl(), PartitionPolicyImpl::PartitionPolicyImpl(), WeightedPolicyImpl::RedistributeCPU(), StrictPolicyImpl::RedistributeCPU(), rk_stub_set_mode(), StrictPolicyImpl::StrictPolicyImpl(), and WeightedPolicyImpl::WeightedPolicyImpl().

struct lnMinNode* lnRemHead struct lnMinList list  ) 
 

Remove and return the node at the head of the list, or NULL if the list is empty.

Parameters:
list A valid list object.
Returns:
The node at the head of 'list', or NULL if the list is empty.

Definition at line 118 of file listNode.c.

References lnMinList::lh_Head, lnMinNode::ln_Pred, lnMinNode::ln_Succ, and require.

Referenced by cpKillChildProcessData().

void lnRemove struct lnMinNode node  ) 
 

Remove a node from the list.

Parameters:
node The node to remove.

Definition at line 32 of file listNode.c.

References lnMinNode::ln_Pred, lnMinNode::ln_Succ, and require.

Referenced by cpDeleteChildProcess(), WeightedPolicyImpl::RemoveTask(), StrictPolicyImpl::RemoveTask(), PartitionPolicyImpl::RemoveTask(), ManagerImpl::RemoveTask(), WeightedPolicyImpl::RepairTaskList(), StrictPolicyImpl::RepairTaskList(), PartitionPolicyImpl::RepairTaskList(), ManagerImpl::RepairTaskList(), rk_resource_set_destroy(), and StrictPolicyImpl::SetTaskPriority().

struct lnMinNode* lnRemTail struct lnMinList list  ) 
 

Remove and return the node at the tail of the list, or NULL if the list is empty.

Parameters:
list A valid list object.
Returns:
The node at the tail of 'list', or NULL if the list is empty.

Definition at line 139 of file listNode.c.

References lnMinList::lh_Tail, lnMinList::lh_TailPred, lnMinNode::ln_Pred, lnMinNode::ln_Succ, and require.


Generated on Fri Oct 22 07:50:35 2004 for CPU Broker by  doxygen 1.3.9.1