diff options
author | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-08-21 02:11:39 +0000 |
---|---|---|
committer | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-08-21 02:11:39 +0000 |
commit | 8b0c007ad990aa27d9868da49215fd1076ac77cc (patch) | |
tree | 270b9c46c1e644483d6d2a35b509f43218ba3252 /include/asterisk/linkedlists.h | |
parent | a42edc84034f91932a3e12d503e07f76a6eb498a (diff) |
merge new_loader_completion branch, including (at least):
- restructured build tree and makefiles to eliminate recursion problems
- support for embedded modules
- support for static builds
- simpler cross-compilation support
- simpler module/loader interface (no exported symbols)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@40722 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'include/asterisk/linkedlists.h')
-rw-r--r-- | include/asterisk/linkedlists.h | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/include/asterisk/linkedlists.h b/include/asterisk/linkedlists.h index bef63e0c0..fe09610ff 100644 --- a/include/asterisk/linkedlists.h +++ b/include/asterisk/linkedlists.h @@ -28,7 +28,7 @@ */ /*! - \brief Attempts to lock a list. + \brief Locks a list. \param head This is a pointer to the list head structure This macro attempts to place an exclusive lock in the @@ -39,6 +39,17 @@ ast_mutex_lock(&(head)->lock) /*! + \brief Locks a list, without blocking if the list is locked. + \param head This is a pointer to the list head structure + + This macro attempts to place an exclusive lock in the + list head structure pointed to by head. + Returns non-zero on success, 0 on failure +*/ +#define AST_LIST_TRYLOCK(head) \ + ast_mutex_trylock(&(head)->lock) + +/*! \brief Attempts to unlock a list. \param head This is a pointer to the list head structure @@ -209,7 +220,7 @@ struct { \ /*! \brief Returns the last entry contained in a list. - \param head This is a pointer to the list tail structure + \param head This is a pointer to the list head structure */ #define AST_LIST_LAST(head) ((head)->last) |