mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-12 15:45:18 +00:00
Add ao2_trylock() to go along with ao2_lock() and ao2_unlock()
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@159158 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -192,6 +192,13 @@ int ao2_lock(void *a);
|
||||
int _ao2_lock(void *a, const char *file, const char *func, int line, const char *var);
|
||||
#endif
|
||||
|
||||
#ifndef DEBUG_THREADS
|
||||
int ao2_trylock(void *a);
|
||||
#else
|
||||
#define ao2_trylock(a) _ao2_trylock(a, __FILE__, __PRETTY_FUNCTION__, __LINE__, #a)
|
||||
int _ao2_trylock(void *a, const char *file, const char *func, int line, const char *var);
|
||||
#endif
|
||||
|
||||
/*!
|
||||
* Unlock an object.
|
||||
*
|
||||
|
Reference in New Issue
Block a user