Linked Lists


Data Structures

struct  os_list_node
struct  os_list

Functions

void os_list_init (struct os_list *list)
int os_list_empty (struct os_list *list)
void os_list_add_tail (struct os_list *list, struct os_list_node *node)
void os_list_del (struct os_list_node *node)
struct os_list_nodeos_list_head (struct os_list *list)
struct os_list_nodeos_list_end (struct os_list *list)

Detailed Description

Generic linked list implementations suitable for all platforms.


Function Documentation

void os_list_add_tail ( struct os_list list,
struct os_list_node node 
)

Add a node to the tail of the list.

Parameters:
list the list.
node the list node to add.

References os_list::head, and os_list_node::prev.

void os_list_del ( struct os_list_node node  ) 

Remove a node from a list.

Parameters:
node the node to remove.

References os_list_node::next, and os_list_node::prev.

int os_list_empty ( struct os_list list  ) 

Is the list empty?

Returns:
true iff the list contains no nodes.

References os_list::head, and os_list_node::next.

struct os_list_node* os_list_end ( struct os_list list  )  [read]

The node marking the end of a list.

Parameters:
list the list.
Returns:
the node that marks the end of the list.

References os_list::head.

struct os_list_node* os_list_head ( struct os_list list  )  [read]

The node at the head of the list.

Parameters:
list the list.
Returns:
the node at the head of the list; or os_list_end() if the list is empty.

References os_list::head, and os_list_node::next.

void os_list_init ( struct os_list list  ) 

Initialize an empty list.

References os_list::head, os_list_node::next, and os_list_node::prev.


Generated on Wed Oct 27 15:14:03 2010 for oska by  doxygen 1.5.5