From: Joshua Colp Date: Thu, 2 Nov 2006 16:51:27 +0000 (+0000) Subject: Set the AST_RWLOCK_INIT_VALUE to the PTHREAD_RWLOCK_INIT_VALUE if it is available... X-Git-Tag: 1.6.0-beta1~3^2~4164 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ae00c6d3faaf5796eb0057161dca1f099d520409;p=thirdparty%2Fasterisk.git 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: https://origsvn.digium.com/svn/asterisk/trunk@46940 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/include/asterisk/lock.h b/include/asterisk/lock.h index b329fc1038..d2ce098345 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