Merged revisions 129970 via svnmerge from
authorRussell Bryant <russell@russellbryant.com>
Fri, 11 Jul 2008 14:22:44 +0000 (14:22 +0000)
committerRussell Bryant <russell@russellbryant.com>
Fri, 11 Jul 2008 14:22:44 +0000 (14:22 +0000)
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r129970 | russell | 2008-07-11 09:18:43 -0500 (Fri, 11 Jul 2008) | 2 lines

add a simple ASTOBJ_TRYWRLOCK macro ...

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@129987 65c4cc65-6c06-0410-ace0-fbb531ad65f3

include/asterisk/astobj.h

index dfdb55b..d32a7d0 100644 (file)
@@ -103,6 +103,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)