mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-19 16:20:37 +00:00
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
This commit is contained in:
@@ -672,6 +672,7 @@ static void __attribute__ ((destructor)) fini_##rwlock(void) \
|
|||||||
ast_mutex_destroy(&rwlock); \
|
ast_mutex_destroy(&rwlock); \
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
#define AST_RWLOCK_INIT_VALUE PTHREAD_RWLOCK_INITIALIZER
|
||||||
#define __AST_RWLOCK_DEFINE(scope, rwlock) \
|
#define __AST_RWLOCK_DEFINE(scope, rwlock) \
|
||||||
scope ast_rwlock_t rwlock = AST_RWLOCK_INIT_VALUE
|
scope ast_rwlock_t rwlock = AST_RWLOCK_INIT_VALUE
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user