aboutsummaryrefslogtreecommitdiffstats
path: root/include/asterisk/lock.h
diff options
context:
space:
mode:
authorfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2006-11-02 16:51:27 +0000
committerfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2006-11-02 16:51:27 +0000
commit03ce049c5b69f227a42732c6d0996c89cf8458e1 (patch)
tree108667f516e7726d0cd89d4d14a1f6d67ecd29bd /include/asterisk/lock.h
parentc720dc8f9e7f155ef0a082cd7e4ea03057c209da (diff)
Set the AST_RWLOCK_INIT_VALUE to the PTHREAD_RWLOCK_INIT_VALUE if it is available, that way outside stuff can determine whether to use a constructor or deconstructor for initialization instead of using the init value.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@46940 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'include/asterisk/lock.h')
-rw-r--r--include/asterisk/lock.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/asterisk/lock.h b/include/asterisk/lock.h
index b329fc103..d2ce09834 100644
--- a/include/asterisk/lock.h
+++ b/include/asterisk/lock.h
@@ -672,6 +672,7 @@ static void __attribute__ ((destructor)) fini_##rwlock(void) \
ast_mutex_destroy(&rwlock); \
}
#else
+#define AST_RWLOCK_INIT_VALUE PTHREAD_RWLOCK_INITIALIZER
#define __AST_RWLOCK_DEFINE(scope, rwlock) \
scope ast_rwlock_t rwlock = AST_RWLOCK_INIT_VALUE
#endif