Main Page | Alphabetical List | Data Structures | File List | Data Fields | Globals

linkedlists.h File Reference

#include <pthread.h>
#include <asterisk/lock.h>

Include dependency graph for linkedlists.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Defines

#define AST_LIST_LOCK(head)   ast_mutex_lock(&head->lock)
#define AST_LIST_UNLOCK(head)   ast_mutex_unlock(&head->lock)
#define AST_LIST_HEAD(name, type)
#define AST_LIST_HEAD_SET(head, entry)
#define AST_LIST_ENTRY(type)
#define AST_LIST_FIRST(head)   ((head)->first)
#define AST_LIST_NEXT(elm, field)   ((elm)->field.next)
#define AST_LIST_EMPTY(head)   (AST_LIST_FIRST(head) == NULL)
#define AST_LIST_TRAVERSE(head, var, field)   for((var) = (head)->first; (var); (var) = (var)->field.next)
#define AST_LIST_HEAD_INIT(head)
#define AST_LIST_INSERT_AFTER(listelm, elm, field)
#define AST_LIST_INSERT_HEAD(head, elm, field)
#define AST_LIST_INSERT_TAIL(head, elm, type, field)
#define AST_LIST_REMOVE_HEAD(head, field)
#define AST_LIST_REMOVE(head, elm, type, field)


Define Documentation

#define AST_LIST_EMPTY head   )     (AST_LIST_FIRST(head) == NULL)
 

Definition at line 33 of file linkedlists.h.

Referenced by ast_channel_free(), and pbx_builtin_clear_globals().

#define AST_LIST_ENTRY type   ) 
 

Value:

struct { \ struct type *next; \ }

Definition at line 24 of file linkedlists.h.

#define AST_LIST_FIRST head   )     ((head)->first)
 

Definition at line 29 of file linkedlists.h.

Referenced by ast_channel_free(), and pbx_builtin_clear_globals().

#define AST_LIST_HEAD name,
type   ) 
 

Value:

struct name { \ struct type *first; \ ast_mutex_t lock; \ }

Definition at line 13 of file linkedlists.h.

#define AST_LIST_HEAD_INIT head   ) 
 

Value:

{ \ (head)->first = NULL; \ ast_pthread_mutex_init(&(head)->lock,NULL); \ }

Definition at line 38 of file linkedlists.h.

Referenced by ast_channel_alloc(), and load_pbx().

#define AST_LIST_HEAD_SET head,
entry   ) 
 

Value:

do { \ (head)->first=(entry); \ ast_pthread_mutex_init(&(head)->lock,NULL); \ } while (0)

Definition at line 19 of file linkedlists.h.

#define AST_LIST_INSERT_AFTER listelm,
elm,
field   ) 
 

Value:

do { \ (elm)->field.next = (listelm)->field.next; \ (listelm)->field.next = (elm); \ } while (0)

Definition at line 43 of file linkedlists.h.

#define AST_LIST_INSERT_HEAD head,
elm,
field   ) 
 

Value:

do { \ (elm)->field.next = (head)->first; \ (head)->first = (elm); \ } while (0)

Definition at line 48 of file linkedlists.h.

Referenced by ast_channel_alloc(), and pbx_builtin_setvar_helper().

#define AST_LIST_INSERT_TAIL head,
elm,
type,
field   ) 
 

Definition at line 53 of file linkedlists.h.

#define AST_LIST_LOCK head   )     ast_mutex_lock(&head->lock)
 

Definition at line 7 of file linkedlists.h.

#define AST_LIST_NEXT elm,
field   )     ((elm)->field.next)
 

Definition at line 31 of file linkedlists.h.

#define AST_LIST_REMOVE head,
elm,
type,
field   ) 
 

Definition at line 70 of file linkedlists.h.

Referenced by pbx_builtin_setvar_helper().

#define AST_LIST_REMOVE_HEAD head,
field   ) 
 

Value:

do { \ (head)->first = (head)->first->field.next; \ } while (0)

Definition at line 66 of file linkedlists.h.

Referenced by ast_channel_free(), and pbx_builtin_clear_globals().

#define AST_LIST_TRAVERSE head,
var,
field   )     for((var) = (head)->first; (var); (var) = (var)->field.next)
 

Definition at line 35 of file linkedlists.h.

Referenced by pbx_builtin_getvar_helper(), and pbx_builtin_setvar_helper().

#define AST_LIST_UNLOCK head   )     ast_mutex_unlock(&head->lock)
 

Definition at line 10 of file linkedlists.h.


Generated on Sat Jun 12 16:41:37 2004 for Asterisk by doxygen 1.3.7