queue device state changes and handle them serially in a background thread

optimize device state related functions
add ast_get_channel_by_name_prefix to allow searching for matching channels in O(1) operation


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6062 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Kevin P. Fleming
2005-07-08 21:14:34 +00:00
parent 0111a38e4b
commit c13d601fb4
12 changed files with 125 additions and 279 deletions

View File

@@ -306,11 +306,13 @@ struct { \
used to link entries of this list together.
Removes the head entry from the list, and returns a pointer to it. The
forward-link pointer in the returned entry is \b not cleared.
forward-link pointer in the returned entry is \b not cleared. This macro
is safe to call on an empty list.
*/
#define AST_LIST_REMOVE_HEAD(head, field) ({ \
typeof((head)->first) cur = (head)->first; \
(head)->first = (head)->first->field.next; \
if (cur) \
(head)->first = cur->field.next; \
cur; \
})