[Freeswitch-svn] [commit] r1661 - freeswitch/trunk/src/include
Author: anthm Date: Thu Jun 22 19:38:44 2006 New Revision: 1661 Modified: freeswitch/trunk/src/include/switch_utils.h Log: add set/clear flag locked macros Modified: freeswitch/trunk/src/include/switch_utils.h ============================================================================== --- freeswitch/trunk/src/include/switch_utils.h (original) +++ freeswitch/trunk/src/include/switch_utils.h Thu Jun 22 19:38:44 2006 @@ -113,7 +113,21 @@ #define switch_set_flag(obj, flag) (obj)->flags |= (flag) /*! + \brief Set a flag on an arbitrary object while locked + \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); + +/*! \brief Clear a flag on an arbitrary object + \param obj the object to test + \param flag the or'd list of flags to clear +*/ +#define switch_clear_flag_locked(obj, flag) switch_mutex_lock(obj->flag_mutex); (obj)->flags &= ~(flag); switch_mutex_unlock(obj->flag_mutex); + +/*! + \brief Clear a flag on an arbitrary object while locked \param obj the object to test \param flag the or'd list of flags to clear */
participants (1)
-
anthmï¼ freeswitch.org