aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2008-07-11 14:18:43 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2008-07-11 14:18:43 +0000
commitc8b288e42f31767e33b46dbfa7c0de10b8a7ce86 (patch)
treeb65c23ee5f48c18a16fded037d920a03004f5844 /include
parent83c09d3dc68b071ee5df2216360fe8856c2f74b6 (diff)
add a simple ASTOBJ_TRYWRLOCK macro ...
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@129970 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'include')
-rw-r--r--include/asterisk/astobj.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/asterisk/astobj.h b/include/asterisk/astobj.h
index dd6207ff8..4f29514b1 100644
--- a/include/asterisk/astobj.h
+++ b/include/asterisk/astobj.h
@@ -106,6 +106,8 @@ extern "C" {
*/
#define ASTOBJ_WRLOCK(object) ast_mutex_lock(&(object)->_lock)
+#define ASTOBJ_TRYWRLOCK(object) ast_mutex_trylock(&(object)->_lock)
+
/*! \brief Unlock a locked object. */
#define ASTOBJ_UNLOCK(object) ast_mutex_unlock(&(object)->_lock)