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

list.h File Reference

Routines implementing a closed doubly linked list. More...

#include <config.h>

Go to the source code of this file.

Namespaces

namespace  cps

Classes

struct  cps::list_head
 A list item. More...

Defines

#define _LINUX_LIST_H
 Prevent multiple inclusion.
#define LIST_HEAD(name)   struct list_head name = { &name, &name }
 Declare a minimal linked list.
#define INIT_LIST_HEAD(ptr)
 Make a list into a minimal linked list.
#define list_entry(ptr, type, member)   ((type *)((char *)(ptr)-(unsigned long)(&((type *)0)->member)))

Functions

void __list_add (struct list_head *new_item, struct list_head *prev, struct list_head *next)
 Insert a new entry between two known consecutive entries.
void list_add (struct list_head *new_item, struct list_head *head)
 Insert a new entry after the specified list item.
void __list_del (struct list_head *prev, struct list_head *next)
 Delete a list entry.
void list_del (struct list_head *entry)
 Delete a list entry after the specified list item.
int list_empty (struct list_head *head)
 Inquire whether a list is minimal (single link).
void list_splice (struct list_head *list, struct list_head *head)
 Insert one list into another.


Detailed Description

Routines implementing a closed doubly linked list.

$Id $

Definition in file list.h.


Define Documentation

#define _LINUX_LIST_H
 

Prevent multiple inclusion.

Definition at line 24 of file list.h.

#define INIT_LIST_HEAD ptr   ) 
 

Value:

do { \
        (ptr)->next = (ptr); (ptr)->prev = (ptr); \
} while (0)
Make a list into a minimal linked list.

Makes the list a single link, pointing to itself

Definition at line 49 of file list.h.

Referenced by cps::LinkBuffer::ClearAll(), cps::LinkBuffer::ClearBufferedLink(), and cps::LinkBuffer::LinkBuffer().

#define list_entry ptr,
type,
member   )     ((type *)((char *)(ptr)-(unsigned long)(&((type *)0)->member)))
 

Definition at line 134 of file list.h.

Referenced by cps::LinkBuffer::ClearBufferedLink(), and cps::LinkBuffer::GetBufferedLink().

#define LIST_HEAD name   )     struct list_head name = { &name, &name }
 

Declare a minimal linked list.

A single link, pointing to itself

Definition at line 44 of file list.h.


Function Documentation

void __list_add struct list_head *  new_item,
struct list_head *  prev,
struct list_head *  next
[inline]
 

Insert a new entry between two known consecutive entries.

This is only for internal list manipulation where we know the prev/next entries already!

Definition at line 59 of file list.h.

References cps::list_head::next, and cps::list_head::prev.

Referenced by cps::list_add().

void __list_del struct list_head *  prev,
struct list_head *  next
[inline]
 

Delete a list entry.

by making the prev/next entries point to each other. This is only for internal list manipulation where we know the prev/next entries already!

Definition at line 86 of file list.h.

References cps::list_head::next, and cps::list_head::prev.

Referenced by cps::list_del().

void list_add struct list_head *  new_item,
struct list_head *  head
[inline]
 

Insert a new entry after the specified list item.

Parameters:
new_item The list item to add
head The list item after which the new list item is to be placed

Definition at line 74 of file list.h.

References cps::__list_add(), and cps::list_head::next.

Referenced by cps::LinkBuffer::GetBufferedLink(), and cps::LinkBuffer::LinkBuffer().

void list_del struct list_head *  entry  )  [inline]
 

Delete a list entry after the specified list item.

Parameters:
entry The list item to be deleted.

Definition at line 97 of file list.h.

References cps::__list_del(), cps::list_head::next, and cps::list_head::prev.

Referenced by cps::LinkBuffer::ClearBufferedLink(), and cps::LinkBuffer::GetBufferedLink().

int list_empty struct list_head *  head  )  [inline]
 

Inquire whether a list is minimal (single link).

Parameters:
head The list item to test.
Returns:
True if head is the only link in the list, false otherwise.

Definition at line 107 of file list.h.

References cps::list_head::next.

Referenced by cps::LinkBuffer::GetBufferedLink().

void list_splice struct list_head *  list,
struct list_head *  head
[inline]
 

Insert one list into another.

Parameters:
list The list to be inserted
head The item after which list is to be inserted

Definition at line 118 of file list.h.

References cps::list_head::next, and cps::list_head::prev.

Referenced by cps::LinkBuffer::ClearAll(), and cps::LinkBuffer::ClearBufferedLink().


Generated on Sat Oct 10 14:11:41 2009 for Columbia Physics System by  doxygen 1.3.9.1