diff options
Diffstat (limited to 'include/asterisk')
-rw-r--r-- | include/asterisk/core_local.h | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/include/asterisk/core_local.h b/include/asterisk/core_local.h index 8557072c6..7d6698336 100644 --- a/include/asterisk/core_local.h +++ b/include/asterisk/core_local.h @@ -45,6 +45,8 @@ struct stasis_message_type; * \brief Lock the "chan" and "owner" channels (and return them) on the base * private structure as well as the base private structure itself. * + * \deprecated - *DO NOT USE* Please use ast_local_lock_all2 instead. + * * \note This also adds references to each of the above mentioned elements and * also the underlying private local structure. * \note None of these locks should be held prior to calling this function. @@ -60,9 +62,28 @@ void ast_local_lock_all(struct ast_channel *chan, struct ast_channel **outchan, struct ast_channel **outowner); /*! + * \brief Add a reference to the local channel's private tech, lock the local channel's + * private base, and add references and lock both sides of the local channel. + * + * \note None of these locks should be held prior to calling this function. + * \note To undo this process call ast_local_unlock_all2. + * + * \since 13.17.0, 14.6.0 + * + * \param chan Must be a local channel + * \param tech_pvt [out] channel's private tech (ref and lock added) + * \param base_chan [out] One side of the local channel (ref and lock added) + * \param base_owner [out] Other side of the local channel (ref and lock added) + */ +void ast_local_lock_all2(struct ast_channel *chan, void **tech_pvt, + struct ast_channel **base_chan, struct ast_channel **base_owner); + +/*! * \brief Unlock the "chan" and "owner" channels on the base private structure * as well as the base private structure itself. * + * \deprecated - *DO NOT USE* Please use ast_local_unlock_all2 instead. + * * \note This also removes references to each of the above mentioned elements and * also the underlying private local structure. * \note This function should be used in conjunction with ast_local_lock_all. @@ -74,6 +95,22 @@ void ast_local_lock_all(struct ast_channel *chan, struct ast_channel **outchan, void ast_local_unlock_all(struct ast_channel *chan); /*! + * \brief Remove a reference to the given local channel's private tech, unlock the given + * local channel's private base, and remove references and unlock both sides of + * given the local channel. + * + * \note This function should be used in conjunction with ast_local_lock_all2. + * + * \since 13.17.0, 14.6.0 + * + * \param tech_pvt channel's private tech (ref and lock removed) + * \param base_chan One side of the local channel (ref and lock removed) + * \param base_owner Other side of the local channel (ref and lock removed) + */ +void ast_local_unlock_all2(void *tech_pvt, struct ast_channel *base_chan, + struct ast_channel *base_owner); + +/*! * \brief Get the other local channel in the pair. * \since 12.0.0 * |