summaryrefslogtreecommitdiff
path: root/include/asterisk/astobj2.h
diff options
context:
space:
mode:
authorRichard Mudgett <rmudgett@digium.com>2013-09-27 17:11:22 +0000
committerRichard Mudgett <rmudgett@digium.com>2013-09-27 17:11:22 +0000
commit7c796593d347210ec8da2ba80b4483d261ef8f05 (patch)
tree57fc7e155797e666439bbaab1244f9276d86fb5f /include/asterisk/astobj2.h
parent212b6f668bc4a140adc56eac6aeebd4f9207dc1e (diff)
astobj2: Remove OBJ_CONTINUE support.
OBJ_CONTINUE was a strange feature that came into the world under suspicious circumstances to support an abuse of the ao2_container by chan_iax2. Since chan_iax2 no longer uses OBJ_CONTINUE, it is safe to remove it. The simplified code should help performance slightly and make understanding the code easier. Review: https://reviewboard.asterisk.org/r/2887/ ........ Merged revisions 399937 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@399938 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'include/asterisk/astobj2.h')
-rw-r--r--include/asterisk/astobj2.h32
1 files changed, 4 insertions, 28 deletions
diff --git a/include/asterisk/astobj2.h b/include/asterisk/astobj2.h
index 073197d47..9129c4b67 100644
--- a/include/asterisk/astobj2.h
+++ b/include/asterisk/astobj2.h
@@ -896,34 +896,6 @@ enum search_flags {
*/
OBJ_MULTIPLE = (1 << 2),
/*!
- * \brief Continue if a match is not found.
- *
- * \details
- * This flag forces a whole container search. The
- * OBJ_SEARCH_OBJECT, OBJ_SEARCH_KEY, and OBJ_SEARCH_PARTIAL_KEY
- * flags just specify where to start the search in the
- * container. If the search is not stopped early then the
- * search _continues_ until the search wraps around to the
- * starting point.
- *
- * Normal searches start where the search key specifies to start
- * and end when the search key indicates that the object is not
- * in the container.
- *
- * For hash containers, this tells the ao2_callback() core to
- * keep searching through the rest of the buckets if a match is
- * not found in the starting bucket defined by the hash value on
- * the argument.
- *
- * For rbtree containers, if the search key is not in the
- * container, the search will start either at the first item
- * before the search key or the first item after the search key.
- *
- * \note The supplied ao2_callback_fn is called for every node
- * in the container from the starting point.
- */
- OBJ_CONTINUE = (1 << 3),
- /*!
* \brief Assume that the ao2_container is already locked.
*
* \note For ao2_containers that have mutexes, no locking will
@@ -1127,6 +1099,8 @@ typedef int (ao2_callback_data_fn)(void *obj, void *arg, void *data, int flags);
* OBJ_SEARCH_OBJECT - if set, 'obj', is an object.
* OBJ_SEARCH_KEY - if set, 'obj', is a search key item that is not an object.
*
+ * \note This function must be idempotent.
+ *
* \return Computed hash value.
*/
typedef int (ao2_hash_fn)(const void *obj, int flags);
@@ -1141,6 +1115,8 @@ typedef int (ao2_hash_fn)(const void *obj, int flags);
* OBJ_SEARCH_KEY - if set, 'obj_right', is a search key item that is not an object.
* OBJ_SEARCH_PARTIAL_KEY - if set, 'obj_right', is a partial search key item that is not an object.
*
+ * \note This function must be idempotent.
+ *
* \retval <0 if obj_left < obj_right
* \retval =0 if obj_left == obj_right
* \retval >0 if obj_left > obj_right