aboutsummaryrefslogtreecommitdiffstats
path: root/include/asterisk/linkedlists.h
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2006-01-11 05:05:13 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2006-01-11 05:05:13 +0000
commit1d62e35521e1c96ce56214e6d84acc862e318445 (patch)
treeceb066c0872c3ecc99f78948f5f857ec0ceee4e8 /include/asterisk/linkedlists.h
parent6b12442db56a4e0afee6335e2453f123b0877a60 (diff)
- add AST_LIST_HEAD_NOLOCK_STATIC, similar to AST_LIST_HEAD_STATIC, but without the lock!
- store registered channel backends using linked list macros git-svn-id: http://svn.digium.com/svn/asterisk/trunk@7968 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'include/asterisk/linkedlists.h')
-rw-r--r--include/asterisk/linkedlists.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/asterisk/linkedlists.h b/include/asterisk/linkedlists.h
index ef54ed444..2d73f8258 100644
--- a/include/asterisk/linkedlists.h
+++ b/include/asterisk/linkedlists.h
@@ -129,6 +129,20 @@ struct name { \
};
/*!
+ \brief Defines a structure to be used to hold a list of specified type, statically initialized.
+
+ This is the same as AST_LIST_HEAD_STATIC, except without the lock included.
+*/
+#define AST_LIST_HEAD_NOLOCK_STATIC(name, type) \
+struct name { \
+ struct type *first; \
+ struct type *last; \
+} name = { \
+ .first = NULL, \
+ .last = NULL, \
+};
+
+/*!
\brief Initializes a list head structure with a specified first entry.
\param head This is a pointer to the list head structure
\param entry pointer to the list entry that will become the head of the list