diff options
Diffstat (limited to 'include/asterisk/lock.h')
-rw-r--r-- | include/asterisk/lock.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/include/asterisk/lock.h b/include/asterisk/lock.h index cc68a13aa..2570ee7bb 100644 --- a/include/asterisk/lock.h +++ b/include/asterisk/lock.h @@ -1196,18 +1196,21 @@ AST_INLINE_API(int ast_atomic_dec_and_test(volatile int *p), struct ast_channel; +#define ast_channel_lock(a) __ast_channel_lock(a, __FILE__, __LINE__, __PRETTY_FUNCTION__) /*! \brief Lock AST channel (and print debugging output) \note You need to enable DEBUG_CHANNEL_LOCKS for this function */ -int ast_channel_lock(struct ast_channel *chan); +int __ast_channel_lock(struct ast_channel *chan, const char *file, int lineno, const char *func); +#define ast_channel_unlock(a) __ast_channel_unlock(a, __FILE__, __LINE__, __PRETTY_FUNCTION__) /*! \brief Unlock AST channel (and print debugging output) \note You need to enable DEBUG_CHANNEL_LOCKS for this function */ -int ast_channel_unlock(struct ast_channel *chan); +int __ast_channel_unlock(struct ast_channel *chan, const char *file, int lineno, const char *func); +#define ast_channel_trylock(a) __ast_channel_trylock(a, __FILE__, __LINE__, __PRETTY_FUNCTION__) /*! \brief Lock AST channel (and print debugging output) \note You need to enable DEBUG_CHANNEL_LOCKS for this function */ -int ast_channel_trylock(struct ast_channel *chan); +int __ast_channel_trylock(struct ast_channel *chan, const char *file, int lineno, const char *func); #endif #endif /* _ASTERISK_LOCK_H */ |