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/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@399937 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Richard Mudgett
2013-09-27 17:03:25 +00:00
parent b2545b9ff9
commit d865190a7e
3 changed files with 6 additions and 366 deletions

View File

@@ -895,34 +895,6 @@ enum search_flags {
* result of of the callback function has the CMP_STOP bit set.
*/
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.
*
@@ -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