add more mutexed flag ops

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1664 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale
2006-06-23 16:59:47 +00:00
parent 4052fc3e2d
commit ce2a9d2636
6 changed files with 95 additions and 70 deletions
+4 -1
View File
@@ -117,7 +117,10 @@ SWITCH_DECLARE(unsigned char) switch_char_to_rfc2833(char key);
\param obj the object to set the flags on
\param flag the or'd list of flags to set
*/
#define switch_set_flag_locked(obj, flag) switch_mutex_lock(obj->flag_mutex); (obj)->flags |= (flag); switch_mutex_unlock(obj->flag_mutex);
#define switch_set_flag_locked(obj, flag) assert(obj->flag_mutex != NULL);\
switch_mutex_lock(obj->flag_mutex);\
(obj)->flags |= (flag);\
switch_mutex_unlock(obj->flag_mutex);
/*!
\brief Clear a flag on an arbitrary object