mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-25 07:01:09 +00:00
We should probably declare the lock... and not just the constructor/deconstructor.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48928 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -666,6 +666,7 @@ static inline int ast_rwlock_trywrlock(ast_rwlock_t *prwlock)
|
|||||||
|
|
||||||
#ifndef HAVE_PTHREAD_RWLOCK_INITIALIZER
|
#ifndef HAVE_PTHREAD_RWLOCK_INITIALIZER
|
||||||
#define __AST_RWLOCK_DEFINE(scope, rwlock) \
|
#define __AST_RWLOCK_DEFINE(scope, rwlock) \
|
||||||
|
scope ast_rwlock_t rwlock; \
|
||||||
static void __attribute__ ((constructor)) init_##rwlock(void) \
|
static void __attribute__ ((constructor)) init_##rwlock(void) \
|
||||||
{ \
|
{ \
|
||||||
ast_rwlock_init(&rwlock); \
|
ast_rwlock_init(&rwlock); \
|
||||||
|
Reference in New Issue
Block a user