A set of macros to manage forward-linked lists. More...
#include "asterisk/lock.h"
Go to the source code of this file.
Defines | |
| #define | AST_LIST_APPEND_LIST(head, list, field) |
| Appends a whole list to the tail of a list. | |
| #define | AST_LIST_EMPTY(head) (AST_LIST_FIRST(head) == NULL) |
| Checks whether the specified list contains any entries. | |
| #define | AST_LIST_ENTRY(type) |
| Declare a forward link structure inside a list entry. | |
| #define | AST_LIST_FIRST(head) ((head)->first) |
| Returns the first entry contained in a list. | |
| #define | AST_LIST_HEAD(name, type) |
| Defines a structure to be used to hold a list of specified type. | |
| #define | AST_LIST_HEAD_DESTROY(head) |
| Destroys a list head structure. | |
| #define | AST_LIST_HEAD_INIT(head) |
| Initializes a list head structure. | |
| #define | AST_LIST_HEAD_INIT_NOLOCK(head) |
| Initializes a list head structure. | |
| #define | AST_LIST_HEAD_INIT_VALUE |
| Defines initial values for a declaration of AST_LIST_HEAD. | |
| #define | AST_LIST_HEAD_NOLOCK(name, type) |
| Defines a structure to be used to hold a list of specified type (with no lock). | |
| #define | AST_LIST_HEAD_NOLOCK_INIT_VALUE |
| Defines initial values for a declaration of AST_LIST_HEAD_NOLOCK. | |
| #define | AST_LIST_HEAD_NOLOCK_STATIC(name, type) |
| Defines a structure to be used to hold a list of specified type, statically initialized. | |
| #define | AST_LIST_HEAD_SET(head, entry) |
| Initializes a list head structure with a specified first entry. | |
| #define | AST_LIST_HEAD_SET_NOLOCK(head, entry) |
| Initializes a list head structure with a specified first entry. | |
| #define | AST_LIST_HEAD_STATIC(name, type) |
| Defines a structure to be used to hold a list of specified type, statically initialized. | |
| #define | AST_LIST_INSERT_AFTER(head, listelm, elm, field) |
| Inserts a list entry after a given entry. | |
| #define | AST_LIST_INSERT_BEFORE_CURRENT(elm, field) |
| Inserts a list entry before the current entry during a traversal. | |
| #define | AST_LIST_INSERT_HEAD(head, elm, field) |
| Inserts a list entry at the head of a list. | |
| #define | AST_LIST_INSERT_LIST_AFTER(head, list, elm, field) |
| Inserts a whole list after a specific entry in a list. | |
| #define | AST_LIST_INSERT_SORTALPHA(head, elm, field, sortfield) |
| Inserts a list entry into a alphabetically sorted list. | |
| #define | AST_LIST_INSERT_TAIL(head, elm, field) |
| Appends a list entry to the tail of a list. | |
| #define | AST_LIST_LAST(head) ((head)->last) |
| Returns the last entry contained in a list. | |
| #define | AST_LIST_LOCK(head) ast_mutex_lock(&(head)->lock) |
| Locks a list. | |
| #define | AST_LIST_MOVE_CURRENT(newhead, field) |
| #define | AST_LIST_NEXT(elm, field) ((elm)->field.next) |
| Returns the next entry in the list after the given entry. | |
| #define | AST_LIST_REMOVE(head, elm, field) |
| Removes a specific entry from a list. | |
| #define | AST_LIST_REMOVE_CURRENT(field) |
| Removes the current entry from a list during a traversal. | |
| #define | AST_LIST_REMOVE_HEAD(head, field) |
| Removes and returns the head entry from a list. | |
| #define | AST_LIST_TRAVERSE(head, var, field) for((var) = (head)->first; (var); (var) = (var)->field.next) |
| Loops over (traverses) the entries in a list. | |
| #define | AST_LIST_TRAVERSE_SAFE_BEGIN(head, var, field) |
| Loops safely over (traverses) the entries in a list. | |
| #define | AST_LIST_TRAVERSE_SAFE_END } |
| Closes a safe loop traversal block. | |
| #define | AST_LIST_TRYLOCK(head) ast_mutex_trylock(&(head)->lock) |
| Locks a list, without blocking if the list is locked. | |
| #define | AST_LIST_UNLOCK(head) ast_mutex_unlock(&(head)->lock) |
| Attempts to unlock a list. | |
| #define | AST_RWLIST_APPEND_LIST AST_LIST_APPEND_LIST |
| #define | AST_RWLIST_EMPTY AST_LIST_EMPTY |
| #define | AST_RWLIST_ENTRY AST_LIST_ENTRY |
| #define | AST_RWLIST_FIRST AST_LIST_FIRST |
| #define | AST_RWLIST_HEAD(name, type) |
| Defines a structure to be used to hold a read/write list of specified type. | |
| #define | AST_RWLIST_HEAD_DESTROY(head) |
| Destroys an rwlist head structure. | |
| #define | AST_RWLIST_HEAD_INIT(head) |
| Initializes an rwlist head structure. | |
| #define | AST_RWLIST_HEAD_INIT_VALUE |
| Defines initial values for a declaration of AST_RWLIST_HEAD. | |
| #define | AST_RWLIST_HEAD_SET(head, entry) |
| Initializes an rwlist head structure with a specified first entry. | |
| #define | AST_RWLIST_HEAD_STATIC(name, type) |
| Defines a structure to be used to hold a read/write list of specified type, statically initialized. | |
| #define | AST_RWLIST_INSERT_AFTER AST_LIST_INSERT_AFTER |
| #define | AST_RWLIST_INSERT_BEFORE_CURRENT AST_LIST_INSERT_BEFORE_CURRENT |
| #define | AST_RWLIST_INSERT_HEAD AST_LIST_INSERT_HEAD |
| #define | AST_RWLIST_INSERT_LIST_AFTER AST_LIST_INSERT_LIST_AFTER |
| #define | AST_RWLIST_INSERT_SORTALPHA AST_LIST_INSERT_SORTALPHA |
| #define | AST_RWLIST_INSERT_TAIL AST_LIST_INSERT_TAIL |
| #define | AST_RWLIST_LAST AST_LIST_LAST |
| #define | AST_RWLIST_MOVE_CURRENT AST_LIST_MOVE_CURRENT |
| #define | AST_RWLIST_NEXT AST_LIST_NEXT |
| #define | AST_RWLIST_RDLOCK(head) ast_rwlock_rdlock(&(head)->lock) |
| Read locks a list. | |
| #define | AST_RWLIST_REMOVE AST_LIST_REMOVE |
| #define | AST_RWLIST_REMOVE_CURRENT AST_LIST_REMOVE_CURRENT |
| #define | AST_RWLIST_REMOVE_HEAD AST_LIST_REMOVE_HEAD |
| #define | AST_RWLIST_TIMEDRDLOCK(head, ts) ast_rwlock_timedrdlock(&(head)->lock, ts) |
| Read locks a list, with timeout. | |
| #define | AST_RWLIST_TIMEDWRLOCK(head, ts) ast_rwlock_timedwrlock(&(head)->lock, ts) |
| Write locks a list, with timeout. | |
| #define | AST_RWLIST_TRAVERSE AST_LIST_TRAVERSE |
| #define | AST_RWLIST_TRAVERSE_SAFE_BEGIN AST_LIST_TRAVERSE_SAFE_BEGIN |
| #define | AST_RWLIST_TRAVERSE_SAFE_END AST_LIST_TRAVERSE_SAFE_END |
| #define | AST_RWLIST_TRYRDLOCK(head) ast_rwlock_tryrdlock(&(head)->lock) |
| Read locks a list, without blocking if the list is locked. | |
| #define | AST_RWLIST_TRYWRLOCK(head) ast_rwlock_trywrlock(&(head)->lock) |
| Write locks a list, without blocking if the list is locked. | |
| #define | AST_RWLIST_UNLOCK(head) ast_rwlock_unlock(&(head)->lock) |
| Attempts to unlock a read/write based list. | |
| #define | AST_RWLIST_WRLOCK(head) ast_rwlock_wrlock(&(head)->lock) |
| Write locks a list. | |
A set of macros to manage forward-linked lists.
Definition in file linkedlists.h.
| #define AST_LIST_APPEND_LIST | ( | head, | |
| list, | |||
| field | |||
| ) |
Appends a whole list to the tail of a list.
| head | This is a pointer to the list head structure |
| list | This is a pointer to the list to be appended. |
| field | This is the name of the field (declared using AST_LIST_ENTRY()) used to link entries of this list together. |
Note: The source list (the list parameter) will be empty after calling this macro (the list entries are moved to the target list).
Definition at line 768 of file linkedlists.h.
Referenced by announce_thread(), ast_autochan_new_channel(), __ast_queue_frame(), clone_variables(), ast_do_masquerade(), and process_weights().
| #define AST_LIST_EMPTY | ( | head | ) | (AST_LIST_FIRST(head) == NULL) |
Checks whether the specified list contains any entries.
| head | This is a pointer to the list head structure |
Definition at line 449 of file linkedlists.h.
Referenced by shaun_of_the_dead(), eivr_comm(), wait_for_winner(), findmeexec(), meetme_show_cmd(), announce_thread(), action_meetmelist(), sla_check_reload(), sla_thread(), sla_load_config(), handle_minivm_list_templates(), handle_minivm_show_users(), handle_minivm_show_zones(), rpt(), forward_message(), handle_voicemail_show_users(), handle_voicemail_show_zones(), manager_list_voicemail_users(), audio_audiohook_write_list(), ast_audiohook_write_list_empty(), autoservice_run(), ast_autoservice_start(), cc_generic_monitor_destructor(), check_bridge(), get_realm(), register_verify(), get_destination(), sip_show_domains(), sip_show_settings(), handle_request_refer(), handle_request_subscribe(), build_peer(), reload_config(), skinny_hangup(), config_device(), __ast_read(), ast_config_text_file_save(), data_filter_find(), do_devstate_changes(), ast_dial_run(), ast_dial_option_enable(), ast_dial_option_disable(), parkinglot_destroy(), build_parkinglot(), parkinglot_is_marked_cb(), ast_framehook_list_is_empty(), is_valid_tone_zone(), ast_tone_zone_data_add_structure(), logger_thread(), __ast_context_destroy(), handle_command_response(), ack_trans(), dundi_show_peer(), destroy_trans(), dundi_lookup_internal(), dundi_precache_internal(), dundi_query_eid_internal(), queue_file(), scan_thread(), find_table(), generate_filenames_string(), acf_faxopt_read(), delete_old_messages(), monmp3thread(), moh_class_inuse(), add_user_extension(), ast_rtp_read(), and smdi_load().
| #define AST_LIST_ENTRY | ( | type | ) |
struct { \ struct type *next; \ }
Declare a forward link structure inside a list entry.
| type | This is the type of each list entry. |
This macro declares a structure to be used to link list entries together. It must be used inside the definition of the structure named in type, as follows:
struct list_entry { ... AST_LIST_ENTRY(list_entry) list; }
The field name list here is arbitrary, and can be anything you wish.
Definition at line 409 of file linkedlists.h.
| #define AST_LIST_FIRST | ( | head | ) | ((head)->first) |
Returns the first entry contained in a list.
| head | This is a pointer to the list head structure |
Definition at line 420 of file linkedlists.h.
Referenced by shaun_of_the_dead(), post_join_unmarked(), leave_conference_bridge(), gen_nextfile(), gen_readframe(), queue_exec(), gosub_exec(), local_read(), local_write(), handle_gosub(), attended_abort_transfer(), multiplexed_bridge_join(), multiplexed_bridge_write(), simple_bridge_join(), simple_bridge_write(), ast_cc_agent_set_interfaces_chanvar(), print_stats_cb(), load_config(), find_subchannel_by_instance_reference(), skinny_hangup(), config_parse_variables(), config_device(), __ast_queue_frame(), __ast_read(), clone_variables(), ast_do_masquerade(), cli_next(), data_filter_find(), do_devstate_changes(), ast_dial_answered(), ast_dial_answered_steal(), ast_dial_join(), remove_dead_ramp_usage(), remove_dead_spaces_usage(), remove_dead_dialplan_useage(), iax_frame_new(), iax_frame_free(), logger_thread(), ast_walk_context_switches(), handle_command_response(), process_precache(), abort_request(), reschedule_precache(), scan_thread(), calendar_join_attendees(), get_ewscal_ids_for(), generate_filenames_string(), acf_faxopt_read(), set_file(), phoneprov_callback(), build_user_routes(), pp_each_user_helper(), ast_rtp_read(), process_weights(), and ast_srv_lookup().
| #define AST_LIST_HEAD | ( | name, | |
| type | |||
| ) |
Defines a structure to be used to hold a list of specified type.
| name | This will be the name of the defined structure. |
| type | This is the type of each list entry. |
This macro creates a structure definition that can be used to hold a list of the entries of type type. It does not actually declare (allocate) a structure; to do that, either follow this macro with the desired name of the instance you wish to declare, or use the specified name to declare instances elsewhere.
Example usage:
static AST_LIST_HEAD(entry_list, entry) entries;
This would define struct entry_list, and declare an instance of it named entries, all intended to hold a list of type struct entry.
Definition at line 172 of file linkedlists.h.
Referenced by dial_exec_full(), try_calling(), gosub_free(), pop_exec(), return_exec(), gosub_exec(), local_read(), local_write(), handle_gosub(), iax2_dup_variable_datastore(), iax2_free_variable_datastore(), iax2_call(), ast_iax2_new(), authenticate_reply(), acf_iaxvar_read(), acf_iaxvar_write(), socket_process(), cleanup_thread_list(), curlds_free(), acf_curl_helper(), lock_free(), lock_fixup(), get_lock(), unlock_read(), dialed_interface_destroy(), dialed_interface_duplicate(), agi_destroy_commands_cb(), get_agi_cmd(), add_agi_cmd(), add_to_agi(), find_transaction(), release_transaction(), odbc_txn_free(), mark_transaction_active(), and ast_odbc_retrieve_transaction_obj().
| #define AST_LIST_HEAD_DESTROY | ( | head | ) |
Destroys a list head structure.
| head | This is a pointer to the list head structure |
This macro destroys a list head structure by setting the head entry to NULL (empty list) and destroying the embedded lock. It does not free the structure from memory.
Definition at line 638 of file linkedlists.h.
Referenced by gosub_free(), cc_interface_tree_destroy(), iax2_free_variable_datastore(), parkinglot_destroy(), curlds_free(), lock_free(), odbc_datastore_free(), dialed_interface_destroy(), ast_module_unregister(), ast_module_shutdown(), agi_destroy_commands_cb(), aji_client_destroy(), and odbc_txn_free().
| #define AST_LIST_HEAD_INIT | ( | head | ) |
Initializes a list head structure.
| head | This is a pointer to the list head structure |
This macro initializes a list head structure by setting the head entry to NULL (empty list) and recreating the embedded lock.
Definition at line 611 of file linkedlists.h.
Referenced by dial_exec_full(), try_calling(), gosub_exec(), cc_interfaces_datastore_init(), iax2_dup_variable_datastore(), ast_iax2_new(), authenticate_reply(), acf_iaxvar_write(), socket_process(), ast_dial_create(), create_parkinglot(), acf_curlopt_write(), get_lock(), acf_odbc_read(), dialed_interface_duplicate(), ast_module_register(), add_to_agi(), spandsp_fax_new(), aji_create_client(), and find_transaction().
| #define AST_LIST_HEAD_INIT_NOLOCK | ( | head | ) |
Initializes a list head structure.
| head | This is a pointer to the list head structure |
This macro initializes a list head structure by setting the head entry to NULL (empty list). There is no embedded lock handling with this macro.
Definition at line 666 of file linkedlists.h.
Referenced by free_numbers(), alloc_profile(), findmeexec(), app_exec(), announce_thread(), conf_run(), gosub_allocate_frame(), ast_audiohook_attach(), ast_bridge_features_init(), extension_monitor_pvt_init(), new_iax(), sip_alloc(), __ast_channel_alloc_ap(), ast_dummy_channel_alloc(), __ast_queue_frame(), ast_safe_sleep_conditional(), __ast_answer(), do_devstate_changes(), feature_request_and_dial(), load_modules(), logger_thread(), session_do(), generic_http_callback(), auth_http_callback(), dundi_lookup_local(), loopback_subst(), ast_calendar_event_alloc(), get_ewscal_ids_for(), find_table(), session_details_new(), build_profile(), load_module(), ast_rtp_read(), and ast_srv_lookup().
| #define AST_LIST_HEAD_INIT_VALUE |
{ \
.first = NULL, \
.last = NULL, \
.lock = AST_MUTEX_INIT_VALUE, \
}
Defines initial values for a declaration of AST_LIST_HEAD.
Definition at line 233 of file linkedlists.h.
Referenced by app_exec(), and ast_merge_contexts_and_delete().
| #define AST_LIST_HEAD_NOLOCK | ( | name, | |
| type | |||
| ) |
Defines a structure to be used to hold a list of specified type (with no lock).
| name | This will be the name of the defined structure. |
| type | This is the type of each list entry. |
This macro creates a structure definition that can be used to hold a list of the entries of type type. It does not actually declare (allocate) a structure; to do that, either follow this macro with the desired name of the instance you wish to declare, or use the specified name to declare instances elsewhere.
Example usage:
static AST_LIST_HEAD_NOLOCK(entry_list, entry) entries;
This would define struct entry_list, and declare an instance of it named entries, all intended to hold a list of type struct entry.
Definition at line 224 of file linkedlists.h.
Referenced by announce_thread(), __ast_queue_frame(), ast_safe_sleep_conditional(), __ast_answer(), ast_do_masquerade(), and feature_request_and_dial().
| #define AST_LIST_HEAD_NOLOCK_INIT_VALUE |
{ \
.first = NULL, \
.last = NULL, \
}
Defines initial values for a declaration of AST_LIST_HEAD_NOLOCK.
Definition at line 251 of file linkedlists.h.
Referenced by do_directory(), ast_event_check_subscriber(), load_config(), process_weights(), and ast_get_srv().
| #define AST_LIST_HEAD_NOLOCK_STATIC | ( | name, | |
| type | |||
| ) |
Defines a structure to be used to hold a list of specified type, statically initialized.
This is the same as AST_LIST_HEAD_STATIC, except without the lock included.
Definition at line 345 of file linkedlists.h.
Referenced by forward_message(), and ast_event_new().
| #define AST_LIST_HEAD_SET | ( | head, | |
| entry | |||
| ) |
do { \ (head)->first = (entry); \ (head)->last = (entry); \ ast_mutex_init(&(head)->lock); \ } while (0)
Initializes a list head structure with a specified first entry.
| head | This is a pointer to the list head structure |
| entry | pointer to the list entry that will become the head of the list |
This macro initializes a list head structure by setting the head entry to the supplied value and recreating the embedded lock.
Definition at line 359 of file linkedlists.h.
| #define AST_LIST_HEAD_SET_NOLOCK | ( | head, | |
| entry | |||
| ) |
Initializes a list head structure with a specified first entry.
| head | This is a pointer to the list head structure |
| entry | pointer to the list entry that will become the head of the list |
This macro initializes a list head structure by setting the head entry to the supplied value.
Definition at line 387 of file linkedlists.h.
Referenced by ast_do_masquerade().
| #define AST_LIST_HEAD_STATIC | ( | name, | |
| type | |||
| ) |
struct name { \ struct type *first; \ struct type *last; \ ast_mutex_t lock; \ } name = AST_LIST_HEAD_INIT_VALUE
Defines a structure to be used to hold a list of specified type, statically initialized.
| name | This will be the name of the defined structure. |
| type | This is the type of each list entry. |
This macro creates a structure definition that can be used to hold a list of the entries of type type, and allocates an instance of it, initialized to be empty.
Example usage:
static AST_LIST_HEAD_STATIC(entry_list, entry);
This would define struct entry_list, intended to hold a list of type struct entry.
Definition at line 290 of file linkedlists.h.
| #define AST_LIST_INSERT_AFTER | ( | head, | |
| listelm, | |||
| elm, | |||
| field | |||
| ) |
Inserts a list entry after a given entry.
| head | This is a pointer to the list head structure |
| listelm | This is a pointer to the entry after which the new entry should be inserted. |
| elm | This is a pointer to the entry to be inserted. |
| field | This is the name of the field (declared using AST_LIST_ENTRY()) used to link entries of this list together. |
Definition at line 680 of file linkedlists.h.
Referenced by reschedule_precache().
| #define AST_LIST_INSERT_BEFORE_CURRENT | ( | elm, | |
| field | |||
| ) |
Inserts a list entry before the current entry during a traversal.
| elm | This is a pointer to the entry to be inserted. |
| field | This is the name of the field (declared using AST_LIST_ENTRY()) used to link entries of this list together. |
Definition at line 584 of file linkedlists.h.
Referenced by insert_penaltychange(), defer_full_frame(), usage_context_add_ramp(), usage_context_add_spaces(), dialplan_usage_add_parkinglot(), queue_file(), add_event_to_list(), add_user_extension(), and srv_callback().
| #define AST_LIST_INSERT_HEAD | ( | head, | |
| elm, | |||
| field | |||
| ) |
Inserts a list entry at the head of a list.
| head | This is a pointer to the list head structure |
| elm | This is a pointer to the entry to be inserted. |
| field | This is the name of the field (declared using AST_LIST_ENTRY()) used to link entries of this list together. |
Definition at line 696 of file linkedlists.h.
Referenced by build_conf(), sla_ring_station(), queue_ringing_trunk(), do_say(), frame_set_var(), gosub_exec(), forward_message(), load_config(), autoservice_run(), ast_autoservice_start(), ast_cdr_setvar(), ast_cdr_copy_vars(), ast_cel_fabricate_channel_from_event(), iax2_append_register(), socket_read(), skinny_new(), accept_thread(), config_parse_variables(), ast_safe_sleep_conditional(), ast_channel_datastore_add(), __ast_answer(), register_translator(), handle_frame(), handle_frame_ownerless(), register_group(), register_group_feature(), feature_request_and_dial(), __frame_free(), shared_write(), unload_module(), iax_frame_free(), iax_process_template(), __ast_module_user_add(), ast_loader_register(), astman_datastore_add(), ast_merge_contexts_and_delete(), pbx_builtin_pushvar_helper(), pbx_builtin_setvar_helper(), dundi_lookup_local(), deep_copy_peer(), handle_command_response(), ack_trans(), create_transaction(), dundi_send(), append_transaction(), register_request(), reschedule_precache(), build_mapping(), build_peer(), loopback_subst(), queue_file(), ast_calendar_register(), parse_config(), aji_handle_message(), mohalloc(), add_user_extension(), cops_gate_cmd(), load_pktccops_config(), pktccops_add_ippool(), and sched_release().
| #define AST_LIST_INSERT_LIST_AFTER | ( | head, | |
| list, | |||
| elm, | |||
| field | |||
| ) |
Inserts a whole list after a specific entry in a list.
| head | This is a pointer to the list head structure |
| list | This is a pointer to the list to be inserted. |
| elm | This is a pointer to the entry after which the new list should be inserted. |
| field | This is the name of the field (declared using AST_LIST_ENTRY()) used to link entries of the lists together. |
Note: The source list (the list parameter) will be empty after calling this macro (the list entries are moved to the target list).
Definition at line 797 of file linkedlists.h.
Referenced by __ast_queue_frame().
| #define AST_LIST_INSERT_SORTALPHA | ( | head, | |
| elm, | |||
| field, | |||
| sortfield | |||
| ) |
Inserts a list entry into a alphabetically sorted list.
| head | Pointer to the list head structure |
| elm | Pointer to the entry to be inserted |
| field | Name of the list entry field (declared using AST_LIST_ENTRY()) |
| sortfield | Name of the field on which the list is sorted |
Definition at line 736 of file linkedlists.h.
Referenced by config_cache_attribute(), and config_text_file_load().
| #define AST_LIST_INSERT_TAIL | ( | head, | |
| elm, | |||
| field | |||
| ) |
Appends a list entry to the tail of a list.
| head | This is a pointer to the list head structure |
| elm | This is a pointer to the entry to be appended. |
| field | This is the name of the field (declared using AST_LIST_ENTRY()) used to link entries of this list together. |
Note: The link field in the appended entry is not modified, so if it is actually the head of a list itself, the entire list will be appended temporarily (until the next AST_LIST_INSERT_TAIL is performed).
Definition at line 716 of file linkedlists.h.
Referenced by ast_lock_path_flock(), ast_safe_fork(), join_conference_bridge(), dial_exec_full(), search_directory_sub(), gen_readframe(), eivr_comm(), reload_followme(), findmeexec(), find_realtime(), app_exec(), sla_queue_event_full(), conf_run(), sla_stop_ringing_station(), sla_add_trunk_to_station(), message_template_build(), create_vmaccount(), timezone_add(), insert_penaltychange(), try_calling(), copy_rules(), reload_queue_rules(), rpt(), find_or_create(), internal_ao2_link(), ast_audiohook_attach(), ast_autochan_setup(), bridge_channel_join(), ast_bridge_merge(), ast_bridge_features_hook(), cc_generic_monitor_request_cc(), ast_cc_extension_monitor_add_dialstring(), cc_interfaces_datastore_init(), ast_handle_cc_control_frame(), ast_cc_call_init(), load_config(), load_values_config(), add_agent(), iax2_dup_variable_datastore(), insert_idle_thread(), queue_signalling(), try_firmware(), transmit_frame(), ast_iax2_new(), find_tpeer(), authenticate_reply(), defer_full_frame(), acf_iaxvar_write(), socket_process(), start_network_thread(), find_cache(), local_call(), sip_epa_register(), sip_tcptls_write(), append_history_va(), add_sip_domain(), add_realm_authentication(), add_peer_mailboxes(), config_line(), config_device(), __ast_queue_frame(), ast_channel_datastore_inherit(), ast_channel_inherit_variables(), clone_variables(), ast_do_masquerade(), ast_cli_perms_init(), inherit_category(), config_cache_attribute(), data_filter_alloc(), ast_devstate_changed_literal(), devstate_change_collector_cb(), ast_dial_append(), ast_event_check_subscriber(), ast_event_sub_append_ie_uint(), ast_event_sub_append_ie_bitflags(), ast_event_sub_append_ie_exists(), ast_event_sub_append_ie_str(), ast_event_sub_append_ie_raw(), ast_event_new(), add_publish_event(), add_subscribe_event(), park_space_reserve(), usage_context_add_ramp(), usage_context_add_spaces(), dialplan_usage_add_parkinglot(), ast_framehook_attach(), setup_inheritable_audiohook(), acf_curlopt_write(), get_lock(), acf_odbc_read(), dialed_interface_duplicate(), iax_frame_new(), iax_frame_free(), ast_register_indication(), ast_module_register(), queue_reload_request(), add_to_load_order(), ast_tzset(), gmtsub(), store_by_locale(), ast_setlocale(), ast_log(), __init_manager(), ast_merge_contexts_and_delete(), ast_context_add_switch2(), append_permission(), queue_file(), queue_file_create(), queue_file_open(), add_agi_cmd(), ast_agi_register(), copy_event_data(), add_event_to_list(), caldav_add_event(), startelm(), endelm(), icalendar_add_event(), find_table(), find_table_cb(), receivefax_exec(), sendfax_exec(), t38_tx_packet_handler(), find_transaction(), ast_odbc_find_table(), set_timezone_variables(), phoneprov_callback(), build_profile(), build_extension(), add_user_extension(), set_config(), process_dtmf_rfc2833(), ast_rtp_read(), append_mailbox_mapping(), ast_slinfactory_feed(), srv_callback(), ast_taskprocessor_push(), and dummy_start().
| #define AST_LIST_LAST | ( | head | ) | ((head)->last) |
Returns the last entry contained in a list.
| head | This is a pointer to the list head structure |
Definition at line 428 of file linkedlists.h.
Referenced by menu_callback(), attended_abort_transfer(), multiplexed_bridge_join(), multiplexed_bridge_write(), simple_bridge_join(), simple_bridge_write(), socket_process(), __ast_queue_frame(), ast_channel_clear_softhangup(), __ast_read(), ast_config_text_file_save(), data_filter_find(), find_dial_channel(), and load_dynamic_module().
| #define AST_LIST_LOCK | ( | head | ) | ast_mutex_lock(&(head)->lock) |
Locks a list.
| head | This is a pointer to the list head structure |
This macro attempts to place an exclusive lock in the list head structure pointed to by head.
| 0 | on success |
| non-zero | on failure |
Definition at line 39 of file linkedlists.h.
Referenced by shaun_of_the_dead(), ast_lock_path_flock(), ast_unlock_path_flock(), ast_safe_fork(), dial_exec_full(), gen_nextfile(), gen_readframe(), eivr_comm(), conf_play(), build_conf(), complete_meetmecmd(), meetme_show_cmd(), conf_free(), dispose_conf(), conf_run(), find_conf_realtime(), find_conf(), conf_exec(), admin_exec(), channel_admin_exec(), meetmemute(), action_meetmelist(), recordthread(), meetmestate(), acf_meetme_info(), meetme_data_provider_get(), message_template_build(), message_template_find(), message_destroy_list(), vmaccounts_destroy_list(), find_account(), sendmail(), create_vmaccount(), timezone_destroy_list(), timezone_add(), handle_minivm_list_templates(), handle_minivm_show_users(), handle_minivm_show_zones(), try_calling(), copy_rules(), reload_queue_rules(), manager_queue_rule_show(), complete_queue_rule_show(), handle_queue_rule_show(), gosub_free(), pop_exec(), return_exec(), gosub_exec(), local_read(), local_write(), find_user(), reset_user_pw(), vmu_tm(), play_message_datetime(), handle_voicemail_show_users(), handle_voicemail_show_zones(), vm_users_data_provider_get_helper(), vm_users_data_provider_get(), manager_list_voicemail_users(), free_vm_users(), free_vm_zones(), load_config(), autoservice_run(), ast_autoservice_start(), ast_autoservice_stop(), ast_autoservice_ignore(), ast_cc_extension_monitor_add_dialstring(), ast_handle_cc_control_frame(), ast_cc_call_init(), request_cc(), unsuspend(), suspend(), cancel_available_timer(), ast_cc_is_recall(), ast_cc_get_monitor_by_recall_core_id(), ast_cc_agent_set_interfaces_chanvar(), ast_set_cc_interfaces_chanvar(), cc_monitor_failed(), cc_status_response(), count_monitors_cb(), print_stats_cb(), agent_hangup(), read_agent_config(), check_availability(), check_beep(), agent_request(), action_agents(), agent_logoff(), complete_agent_logoff_cmd(), agents_show(), agents_show_online(), login_exec(), agentmonitoroutgoing_exec(), agent_devicestate(), function_agent(), agents_data_provider_get(), unload_module(), network_change_event_sched_cb(), iax2_dup_variable_datastore(), iax2_free_variable_datastore(), insert_idle_thread(), find_idle_thread(), iax_check_version(), iax_firmware_append(), reload_firmware(), handle_cli_iax2_show_cache(), iax2_call(), find_tpeer(), handle_cli_iax2_show_threads(), handle_cli_iax2_show_firmware(), handle_cli_iax2_show_registry(), manager_iax2_show_registry(), complete_dpreply(), iax2_append_register(), timing_read(), socket_read(), acf_iaxvar_read(), acf_iaxvar_write(), socket_process(), iax2_process_thread(), start_network_thread(), delete_users(), set_config(), reload_config(), find_cache(), iax2_exists(), iax2_canmatch(), iax2_matchmore(), iax2_exec(), cleanup_thread_list(), load_module(), misdn_call(), misdn_request(), misdn_facility_ie_handler(), cb_events(), sip_epa_register(), find_static_data(), sip_show_domains(), add_sip_domain(), check_sip_domain(), clear_sip_domains(), get_button_template(), find_line_by_name(), skinny_register(), handle_skinny_reset(), _skinny_show_devices(), _skinny_show_device(), _skinny_show_lines(), _skinny_show_line(), destroy_session(), accept_thread(), config_line(), config_device(), delete_devices(), skinny_reload(), register_translator(), drop_translator(), unregister_translators(), config_cache_attribute(), config_text_file_load(), handle_cli_config_reload(), handle_cli_config_list(), ast_devstate_changed_literal(), do_devstate_changes(), begin_dial(), find_relative_dial_channel(), handle_frame(), handle_frame_ownerless(), monitor_dial(), ast_dial_join(), ast_dial_hangup(), ast_dial_destroy(), find_dial_channel(), park_space_reserve(), manage_parkinglot(), parked_call_exec(), handle_parkedcalls(), manager_parking_status(), acf_curlopt_write(), acf_curlopt_helper(), acf_curl_helper(), lock_free(), lock_fixup(), lock_broker(), get_lock(), unlock_read(), odbc_datastore_free(), acf_fetch(), dialed_interface_destroy(), dialed_interface_duplicate(), ast_module_register(), ast_module_unregister(), __ast_module_user_add(), __ast_module_user_remove(), __ast_module_user_hangup_all(), find_resource(), ast_module_shutdown(), ast_unload_resource(), ast_module_helper(), ast_process_pending_reloads(), queue_reload_request(), ast_module_reload(), ast_load_resource(), load_modules(), ast_update_use_count(), ast_loader_register(), ast_loader_unregister(), inotify_daemon(), ast_localtime_wakeup_monitor(), ast_tzset(), gmtsub(), store_by_locale(), ast_setlocale(), logger_thread(), close_logger(), ast_log(), dundi_lookup_thread(), dundi_precache_thread(), dundi_query_thread(), handle_command_response(), network_thread(), process_precache(), dundi_flush(), complete_peer_helper(), dundi_show_peer(), dundi_show_peers(), dundi_show_trans(), dundi_show_entityid(), dundi_show_requests(), dundi_show_mappings(), dundi_show_precache(), dundi_rexmit(), dundi_ie_append_eid_appropriately(), discover_transactions(), precache_transactions(), query_transactions(), optimize_transactions(), cancel_request(), abort_request(), build_transactions(), register_request(), unregister_request(), check_request(), reschedule_precache(), dundi_precache_internal(), mark_peers(), mark_mappings(), prune_peers(), prune_mappings(), build_peer(), queue_file(), scan_thread(), agi_destroy_commands_cb(), get_agi_cmd(), add_agi_cmd(), ast_calendar_register(), ast_calendar_unregister(), reload(), find_table(), unload_pgsql(), handle_cli_realtime_pgsql_cache(), aji_client_destroy(), acf_jabberreceive_read(), delete_old_messages(), aji_handle_message(), find_transaction(), release_transaction(), odbc_txn_free(), mark_transaction_active(), ast_odbc_retrieve_transaction_obj(), cops_gate_cmd(), do_pktccops(), pktccops_show_cmtses(), pktccops_show_gates(), pktccops_show_pools(), pktccops_gatedel(), pktccops_gateset(), pktccops_add_ippool(), pktccops_unregister_cmtses(), and pktccops_unregister_ippools().
| #define AST_LIST_MOVE_CURRENT | ( | newhead, | |
| field | |||
| ) |
do { \ typeof ((newhead)->first) __list_cur = __new_prev; \ AST_LIST_REMOVE_CURRENT(field); \ AST_LIST_INSERT_TAIL((newhead), __list_cur, field); \ } while (0)
Definition at line 567 of file linkedlists.h.
Referenced by cdr_merge_vars(), and process_weights().
| #define AST_LIST_NEXT | ( | elm, | |
| field | |||
| ) | ((elm)->field.next) |
Returns the next entry in the list after the given entry.
| elm | This is a pointer to the current entry. |
| field | This is the name of the field (declared using AST_LIST_ENTRY()) used to link entries of this list together. |
Definition at line 438 of file linkedlists.h.
Referenced by spy_generate(), conf_run(), mixmonitor_thread(), update_qe_rule(), find_result(), speech_read(), find_user(), internal_ao2_iterator_next(), build_cc_interfaces_chanvar(), cc_cli_print_monitor_stats(), peer_mailboxes_to_str(), skinny_call(), skinny_hangup(), handle_keypad_button_message(), handle_onhook_message(), handle_soft_key_event_message(), __ast_queue_frame(), __ast_read(), ast_write(), cli_next(), group_show_channels(), do_devstate_changes(), remove_dead_ramp_usage(), remove_dead_spaces_usage(), remove_dead_dialplan_useage(), ast_writestream(), ast_frame_free(), ast_frame_clear(), group_count_function_read(), group_function_read(), group_list_function_read(), logger_thread(), ast_walk_context_switches(), reschedule_precache(), handle_speechrecognize(), update_ewscal(), add_user_extension(), create_dtmf_frame(), ast_speech_results_free(), ast_slinfactory_feed(), ast_srv_lookup(), udptl_rx_packet(), and create_video_frame().
| #define AST_LIST_REMOVE | ( | head, | |
| elm, | |||
| field | |||
| ) |
Removes a specific entry from a list.
| head | This is a pointer to the list head structure |
| elm | This is a pointer to the entry to be removed. |
| field | This is the name of the field (declared using AST_LIST_ENTRY()) used to link entries of this list together. |
Definition at line 839 of file linkedlists.h.
Referenced by leave_conference_bridge(), conf_free(), internal_ao2_iterator_next(), ast_audiohook_remove(), ast_autoservice_start(), bridge_channel_join(), agent_hangup(), __attempt_transmit(), resend_with_token(), iax2_process_thread(), skinny_hangup(), handle_onhook_message(), handle_soft_key_event_message(), delete_devices(), __ast_queue_frame(), ast_channel_datastore_remove(), ast_channel_clear_softhangup(), handle_frame(), handle_frame_ownerless(), shared_write(), iax_frame_new(), __ast_module_user_remove(), astman_datastore_remove(), destroy_packet(), destroy_trans(), unregister_request(), moh_release(), and release_transaction().
| #define AST_LIST_REMOVE_CURRENT | ( | field | ) |
Removes the current entry from a list during a traversal.
| field | This is the name of the field (declared using AST_LIST_ENTRY()) used to link entries of this list together. |
Definition at line 554 of file linkedlists.h.
Referenced by shaun_of_the_dead(), ast_unlock_path_flock(), sla_choose_ringing_trunk(), sla_handle_dial_state_event(), sla_check_failed_station(), sla_hangup_stations(), sla_calc_trunk_timeouts(), sla_calc_station_timeouts(), sla_station_exec(), sla_trunk_exec(), forward_message(), handle_unsubscribe(), internal_ao2_callback(), dtmf_audiohook_write_list(), audio_audiohook_write_list(), ast_autochan_destroy(), ast_autoservice_stop(), cc_generic_monitor_destructor(), request_cc(), unsuspend(), suspend(), cancel_available_timer(), cc_monitor_failed(), ast_cdr_setvar(), read_agent_config(), reload_firmware(), complete_dpreply(), timing_read(), acf_iaxvar_write(), find_cache(), build_peer(), sip_removeheader(), destroy_session(), skinny_reload(), ast_channel_unregister(), __ast_queue_frame(), __ast_read(), drop_translator(), ast_dial_destroy(), manage_parkinglot(), parked_call_exec(), usage_context_add_spaces(), ast_frdup(), framehook_list_push_event(), ast_framehook_list_destroy(), func_inheritance_write(), acf_curlopt_write(), clearvar_prefix(), iax_frame_new(), iax_provision_free_templates(), ast_register_indication(), ast_unregister_indication(), prune_tone_zone(), ast_module_unregister(), ast_module_shutdown(), load_resource_list(), load_modules(), ast_loader_unregister(), inotify_daemon(), ast_context_remove_switch2(), __ast_context_destroy(), pbx_builtin_setvar_helper(), reschedule_precache(), prune_peers(), prune_mappings(), queue_file_open(), queue_created_files(), queue_file_write(), ast_calendar_unregister(), unload_pgsql(), acf_jabberreceive_read(), delete_old_messages(), ast_odbc_clear_cache(), and do_pktccops().
| #define AST_LIST_REMOVE_HEAD | ( | head, | |
| field | |||
| ) |
Removes and returns the head entry from a list.
| head | This is a pointer to the list head structure |
| field | This is the name of the field (declared using AST_LIST_ENTRY()) used to link entries of this list together. |
Removes the head entry from the list, and returns a pointer to it. This macro is safe to call on an empty list.
Definition at line 818 of file linkedlists.h.
Referenced by do_directory(), gen_nextfile(), gen_readframe(), app_exec(), eivr_comm(), free_numbers(), findmeexec(), conf_free(), announce_thread(), sla_stop_ringing_trunk(), sla_thread(), destroy_trunk(), destroy_station(), message_destroy_list(), vmaccounts_destroy_list(), timezone_destroy_list(), init_queue(), leave_queue(), reload_queue_rules(), rpt(), gosub_release_frame(), gosub_free(), pop_exec(), return_exec(), forward_message(), free_vm_users(), free_vm_zones(), container_destruct(), container_destruct_debug(), ast_audiohook_detach_list(), ast_autoservice_stop(), ast_bridge_merge(), ast_bridge_features_cleanup(), generic_monitor_instance_list_destructor(), cc_extension_monitor_destructor(), cc_interface_tree_destroy(), ast_cdr_free_vars(), free_config(), unload_module(), iax2_free_variable_datastore(), find_idle_thread(), send_signaling(), pvt_destructor(), handle_deferred_full_frames(), delete_users(), cleanup_thread_list(), sip_threadinfo_destructor(), _sip_tcp_helper_thread(), append_history_va(), clear_peer_mailboxes(), __sip_destroy(), clear_sip_domains(), destroy_realm_authentication(), delete_devices(), skinny_reload(), ast_safe_sleep_conditional(), ast_channel_destructor(), ast_dummy_channel_destructor(), __ast_answer(), ast_do_masquerade(), destroy_user_perms(), unregister_translators(), ast_destroy_template_list(), run_devstate_collector(), ast_event_sub_destroy(), event_channel_destroy(), ast_unregister_groups(), feature_request_and_dial(), destroy_dialplan_usage_context(), destroy_dialplan_usage_map(), ast_frame_header_new(), frame_cache_cleanup(), audiohook_inheritance_destroy(), curlds_free(), shared_variable_free(), lock_free(), odbc_datastore_free(), acf_fetch(), dialed_interface_destroy(), ast_tone_zone_destructor(), __ast_module_user_hangup_all(), ast_process_pending_reloads(), queue_reload_request(), load_modules(), session_destructor(), ast_merge_contexts_and_delete(), __ast_internal_context_destroy(), pbx_builtin_clear_globals(), dundi_lookup_local(), destroy_packets(), process_precache(), cancel_request(), destroy_permissions(), loopback_subst(), scan_thread(), agi_destroy_commands_cb(), get_agi_cmd(), eventlist_destructor(), calendar_event_destructor(), copy_event_data(), table_configs_free(), destroy_table(), destroy_session_details(), session_destroy(), spandsp_fax_read(), aji_client_destroy(), moh_class_destructor(), odbc_txn_free(), profile_destructor(), delete_extension(), user_destructor(), reload(), pktccops_unregister_cmtses(), pktccops_unregister_ippools(), destroy_all_mailbox_mappings(), sched_context_destroy(), sched_alloc(), ast_slinfactory_destroy(), ast_slinfactory_read(), ast_slinfactory_flush(), ast_srv_lookup(), ast_get_srv(), and tps_taskprocessor_pop().
| #define AST_LIST_TRAVERSE | ( | head, | |
| var, | |||
| field | |||
| ) | for((var) = (head)->first; (var); (var) = (var)->field.next) |
Loops over (traverses) the entries in a list.
| head | This is a pointer to the list head structure |
| var | This is the name of the variable that will hold a pointer to the current list entry on each iteration. It must be declared before calling this macro. |
| field | This is the name of the field (declared using AST_LIST_ENTRY()) used to link entries of this list together. |
This macro is use to loop over (traverse) the entries in a list. It uses a for loop, and supplies the enclosed code with a pointer to each list entry as it loops. It is typically used as follows:
static AST_LIST_HEAD(entry_list, list_entry) entries; ... struct list_entry { ... AST_LIST_ENTRY(list_entry) list; } ... struct list_entry *current; ... AST_LIST_TRAVERSE(&entries, current, list) { (do something with current here) }
Definition at line 490 of file linkedlists.h.
Referenced by post_join_marked(), leave_conference_bridge(), dial_exec_full(), do_directory(), reload_followme(), clear_calling_tree(), wait_for_winner(), findmeexec(), app_exec(), build_conf(), complete_meetmecmd(), meetme_show_cmd(), sla_show_trunks(), sla_show_stations(), sla_queue_event_conf(), find_conf_realtime(), find_conf(), conf_exec(), admin_exec(), channel_admin_exec(), meetmemute(), action_meetmelist(), meetmestate(), sla_check_station_hold_access(), sla_find_trunk_ref_byname(), sla_change_trunk_state(), sla_stop_ringing_station(), sla_check_timed_out_station(), sla_choose_ringing_trunk(), sla_check_ringing_station(), sla_check_inuse_station(), sla_find_trunk_ref(), sla_ring_stations(), sla_hangup_stations(), sla_calc_station_timeouts(), sla_calc_station_delays(), sla_choose_idle_trunk(), sla_state(), destroy_station(), sla_build_station(), acf_meetme_info(), meetme_data_provider_get(), message_template_find(), find_account(), sendmail(), handle_minivm_list_templates(), complete_minivm_show_users(), handle_minivm_show_users(), handle_minivm_show_zones(), ospauth_exec(), osplookup_exec(), ospnext_exec(), ospfinished_exec(), insert_penaltychange(), try_calling(), copy_rules(), manager_queue_rule_show(), complete_queue_rule_show(), handle_queue_rule_show(), rpt(), frame_set_var(), local_read(), peek_read(), find_user(), reset_user_pw(), vmu_tm(), play_message_datetime(), find_or_create(), complete_voicemail_show_users(), handle_voicemail_show_users(), handle_voicemail_show_zones(), vm_users_data_provider_get_helper(), vm_users_data_provider_get(), manager_list_voicemail_users(), internal_ao2_iterator_next(), find_audiohook_by_source(), ast_channel_audiohook_count_by_source(), ast_channel_audiohook_count_by_source_running(), ast_autochan_new_channel(), autoservice_run(), ast_autoservice_start(), ast_autoservice_ignore(), softmix_bridge_thread(), find_bridge_channel(), bridge_check_dissolve(), bridge_handle_dtmf(), ast_bridge_destroy(), smart_bridge_operation(), bridge_channel_feature(), ast_bridge_dtmf_stream(), generic_monitor_devstate_tp_cb(), cc_generic_monitor_suspend(), cc_generic_monitor_unsuspend(), cc_generic_monitor_destructor(), ast_cc_extension_monitor_add_dialstring(), cc_extension_monitor_change_is_valid(), ast_handle_cc_control_frame(), has_device_monitors(), ast_cc_is_recall(), ast_cc_get_monitor_by_recall_core_id(), build_cc_interfaces_chanvar(), ast_set_cc_interfaces_chanvar(), cc_status_response(), count_monitors_cb(), ast_cdr_getvar_internal(), ast_cdr_copy_vars(), ast_cdr_serialize_variables(), cdr_merge_vars(), ast_cdr_data_add_structure(), odbc_log(), custom_log(), write_cdr(), syslog_log(), add_agent(), read_agent_config(), check_availability(), check_beep(), agent_request(), action_agents(), agent_logoff(), complete_agent_logoff_cmd(), agents_show(), agents_show_online(), login_exec(), agentmonitoroutgoing_exec(), agent_devicestate(), find_agent(), agents_data_provider_get(), network_change_event_sched_cb(), iax2_dup_variable_datastore(), pvt_destructor(), try_firmware(), iax_check_version(), iax_firmware_append(), reload_firmware(), handle_cli_iax2_show_stats(), handle_cli_iax2_show_cache(), iax2_call(), find_tpeer(), handle_cli_iax2_show_threads(), handle_cli_iax2_show_firmware(), handle_cli_iax2_show_registry(), manager_iax2_show_registry(), complete_transfer(), vnak_retransmit(), socket_read(), acf_iaxvar_read(), socket_process(), reload_config(), load_module(), local_call(), mgcp_call(), find_static_data(), sip_call(), transmit_invite(), sip_show_domains(), peer_mailboxes_to_str(), _sip_show_peer(), sip_show_settings(), sip_show_history(), sip_dump_history(), add_peer_mwi_subs(), get_cached_mwi(), check_sip_domain(), find_realm_authentication(), add_peer_mailboxes(), build_peer(), peers_data_provider_get(), get_button_template(), find_line_by_instance(), find_line_by_name(), find_subchannel_by_instance_reference(), find_subchannel_by_reference(), find_speeddial_by_instance(), skinny_register(), skinny_unregister(), mwi_event_cb(), complete_skinny_devices(), complete_skinny_show_line(), handle_skinny_reset(), _skinny_show_devices(), _skinny_show_device(), _skinny_show_lines(), _skinny_show_line(), get_devicestate(), handle_offhook_message(), handle_capabilities_res_message(), handle_button_template_req_message(), config_parse_variables(), config_line(), config_device(), skinny_reload(), unload_module(), __ast_queue_frame(), ast_channel_datastore_inherit(), ast_channel_datastore_find(), ast_channel_inherit_variables(), clone_variables(), ast_debug_get_by_module(), ast_verbose_get_by_module(), cli_has_permissions(), find_module_level(), handle_cli_show_permissions(), ast_cli_perms_init(), config_cache_attribute(), config_text_file_load(), ast_config_text_file_save(), handle_cli_config_reload(), handle_cli_config_list(), data_filter_destructor(), data_filter_find(), begin_dial(), find_relative_dial_channel(), handle_timeout_trip(), monitor_dial(), ast_dial_hangup(), find_dial_channel(), match_sub_ie_val_to_event(), ast_event_check_subscriber(), dump_cache_cb(), gen_sub_event(), ast_event_report_subs(), ast_event_new(), handle_event(), ais_evt_show_event_channels(), park_space_reserve(), find_group(), feature_interpret_helper(), set_config_flags(), handle_feature_show(), handle_parkedcalls(), manager_parking_status(), audiohook_inheritance_fixup(), acf_curlopt_helper(), acf_curl_helper(), shared_read(), shared_write(), lock_fixup(), lock_broker(), get_lock(), unlock_read(), hashkeys_read(), hashkeys_read2(), dialed_interface_duplicate(), iax_template_find(), iax_prov_complete_template(), iax_show_provisioning(), iax_provision_reload(), ast_get_indication_tone(), complete_indications(), handle_cli_indication_show(), tone_zone_mark(), ast_tone_zone_data_add_structure(), find_resource(), ast_module_helper(), queue_reload_request(), ast_module_reload(), add_to_load_order(), load_modules(), ast_update_use_count(), ast_update_module_list(), ast_tzset(), gmtsub(), find_by_locale(), find_by_name(), append_channel_vars(), pbx_find_extension(), ast_str_retrieve_variable(), handle_show_globals(), ast_context_add_switch2(), pbx_builtin_serialize_variables(), pbx_builtin_getvar_helper(), has_permission(), find_transaction(), get_trans_id(), find_peer(), dundi_prop_precache(), dundi_answer_query(), deep_copy_peer(), ack_trans(), dundi_flush(), complete_peer_helper(), dundi_show_peer(), dundi_show_peers(), dundi_show_trans(), dundi_show_requests(), dundi_show_mappings(), dundi_show_precache(), destroy_trans(), dundi_ie_append_eid_appropriately(), discover_transactions(), precache_transactions(), query_transactions(), optimize_transactions(), build_transactions(), register_request(), check_request(), dundi_precache_full(), dundi_precache_internal(), mark_peers(), mark_mappings(), build_mapping(), queue_file(), queue_file_create(), ast_calendar_register(), calendar_join_attendees(), calendar_query_result_exec(), reload(), table_config_for_table_name(), find_table(), find_column(), update_pgsql(), require_pgsql(), handle_cli_realtime_pgsql_cache(), generate_filenames_string(), sendfax_exec(), monmp3thread(), mark_transaction_active(), ast_odbc_retrieve_transaction_obj(), phoneprov_callback(), build_profile(), add_user_extension(), build_user_routes(), pp_each_extension_helper(), cops_gate_cmd(), do_pktccops(), load_pktccops_config(), pktccops_show_cmtses(), pktccops_show_gates(), pktccops_show_pools(), pktccops_gatedel(), pktccops_gateset(), mwi_monitor_handler(), ast_slinfactory_feed(), process_weights(), ast_srv_lookup(), ast_srv_get_nth_record(), and xmldoc_get_node().
| #define AST_LIST_TRAVERSE_SAFE_BEGIN | ( | head, | |
| var, | |||
| field | |||
| ) |
Loops safely over (traverses) the entries in a list.
| head | This is a pointer to the list head structure |
| var | This is the name of the variable that will hold a pointer to the current list entry on each iteration. It must be declared before calling this macro. |
| field | This is the name of the field (declared using AST_LIST_ENTRY()) used to link entries of this list together. |
This macro is used to safely loop over (traverse) the entries in a list. It uses a for loop, and supplies the enclosed code with a pointer to each list entry as it loops. It is typically used as follows:
static AST_LIST_HEAD(entry_list, list_entry) entries; ... struct list_entry { ... AST_LIST_ENTRY(list_entry) list; } ... struct list_entry *current; ... AST_LIST_TRAVERSE_SAFE_BEGIN(&entries, current, list) { (do something with current here) } AST_LIST_TRAVERSE_SAFE_END;
It differs from AST_LIST_TRAVERSE() in that the code inside the loop can modify (or even free, after calling AST_LIST_REMOVE_CURRENT()) the entry pointed to by the current pointer without affecting the loop traversal.
Definition at line 528 of file linkedlists.h.
Referenced by shaun_of_the_dead(), ast_unlock_path_flock(), sla_choose_ringing_trunk(), sla_handle_dial_state_event(), sla_check_failed_station(), sla_hangup_stations(), sla_calc_trunk_timeouts(), sla_calc_station_timeouts(), sla_station_exec(), sla_trunk_exec(), insert_penaltychange(), forward_message(), internal_ao2_callback(), dtmf_audiohook_write_list(), audio_audiohook_write_list(), ast_autochan_destroy(), ast_autoservice_stop(), cc_generic_monitor_destructor(), request_cc(), unsuspend(), suspend(), cancel_available_timer(), cc_monitor_failed(), ast_cdr_setvar(), cdr_merge_vars(), read_agent_config(), reload_firmware(), complete_dpreply(), timing_read(), defer_full_frame(), acf_iaxvar_write(), find_cache(), build_peer(), sip_removeheader(), destroy_session(), skinny_reload(), __ast_queue_frame(), __ast_read(), ast_do_masquerade(), drop_translator(), ast_dial_destroy(), manage_parkinglot(), parked_call_exec(), usage_context_add_ramp(), usage_context_add_spaces(), dialplan_usage_add_parkinglot(), ast_frdup(), framehook_list_push_event(), ast_framehook_detach(), ast_framehook_list_destroy(), func_inheritance_write(), acf_curlopt_write(), clearvar_prefix(), iax_frame_new(), iax_provision_free_templates(), ast_register_indication(), ast_unregister_indication(), prune_tone_zone(), ast_module_unregister(), ast_module_shutdown(), load_resource_list(), load_modules(), ast_loader_unregister(), inotify_daemon(), astman_datastore_find(), ast_context_remove_switch2(), __ast_context_destroy(), pbx_builtin_setvar_helper(), precache_transactions(), reschedule_precache(), prune_peers(), prune_mappings(), queue_file(), queue_file_open(), queue_created_files(), queue_file_write(), ast_calendar_unregister(), add_event_to_list(), unload_pgsql(), acf_jabberreceive_read(), delete_old_messages(), add_user_extension(), do_pktccops(), srv_callback(), and process_weights().
| #define AST_LIST_TRAVERSE_SAFE_END } |
Closes a safe loop traversal block.
Definition at line 600 of file linkedlists.h.
Referenced by shaun_of_the_dead(), ast_unlock_path_flock(), sla_choose_ringing_trunk(), sla_handle_dial_state_event(), sla_check_failed_station(), sla_hangup_stations(), sla_calc_trunk_timeouts(), sla_calc_station_timeouts(), sla_station_exec(), sla_trunk_exec(), insert_penaltychange(), forward_message(), internal_ao2_callback(), dtmf_audiohook_write_list(), audio_audiohook_write_list(), ast_autochan_destroy(), ast_autoservice_stop(), cc_generic_monitor_destructor(), request_cc(), unsuspend(), suspend(), cancel_available_timer(), cc_monitor_failed(), ast_cdr_setvar(), cdr_merge_vars(), read_agent_config(), reload_firmware(), complete_dpreply(), timing_read(), defer_full_frame(), acf_iaxvar_write(), find_cache(), build_peer(), sip_removeheader(), destroy_session(), skinny_reload(), ast_channel_unregister(), __ast_queue_frame(), __ast_read(), ast_do_masquerade(), drop_translator(), ast_dial_destroy(), manage_parkinglot(), parked_call_exec(), usage_context_add_ramp(), usage_context_add_spaces(), dialplan_usage_add_parkinglot(), ast_frdup(), framehook_list_push_event(), ast_framehook_detach(), ast_framehook_list_destroy(), func_inheritance_write(), acf_curlopt_write(), clearvar_prefix(), iax_frame_new(), iax_provision_free_templates(), ast_register_indication(), ast_unregister_indication(), prune_tone_zone(), ast_module_unregister(), ast_module_shutdown(), load_resource_list(), load_modules(), ast_loader_unregister(), inotify_daemon(), astman_datastore_find(), ast_context_remove_switch2(), __ast_context_destroy(), pbx_builtin_setvar_helper(), precache_transactions(), reschedule_precache(), prune_peers(), prune_mappings(), queue_file(), queue_file_open(), queue_created_files(), queue_file_write(), ast_calendar_unregister(), add_event_to_list(), unload_pgsql(), acf_jabberreceive_read(), delete_old_messages(), add_user_extension(), do_pktccops(), srv_callback(), and process_weights().
| #define AST_LIST_TRYLOCK | ( | head | ) | ast_mutex_trylock(&(head)->lock) |
Locks a list, without blocking if the list is locked.
| head | This is a pointer to the list head structure |
This macro attempts to place an exclusive lock in the list head structure pointed to by head.
| 0 | on success |
| non-zero | on failure |
Definition at line 104 of file linkedlists.h.
Referenced by ast_update_module_list().
| #define AST_LIST_UNLOCK | ( | head | ) | ast_mutex_unlock(&(head)->lock) |
Attempts to unlock a list.
| head | This is a pointer to the list head structure |
This macro attempts to remove an exclusive lock from the list head structure pointed to by head. If the list was not locked by this thread, this macro has no effect.
Definition at line 139 of file linkedlists.h.
Referenced by shaun_of_the_dead(), ast_lock_path_flock(), ast_unlock_path_flock(), ast_safe_fork(), dial_exec_full(), gen_nextfile(), gen_readframe(), eivr_comm(), conf_play(), build_conf(), complete_meetmecmd(), meetme_show_cmd(), conf_free(), dispose_conf(), conf_run(), find_conf_realtime(), find_conf(), conf_exec(), admin_exec(), channel_admin_exec(), meetmemute(), action_meetmelist(), recordthread(), meetmestate(), acf_meetme_info(), meetme_data_provider_get(), message_template_build(), message_template_find(), message_destroy_list(), vmaccounts_destroy_list(), find_account(), sendmail(), create_vmaccount(), timezone_destroy_list(), timezone_add(), handle_minivm_list_templates(), handle_minivm_show_users(), handle_minivm_show_zones(), try_calling(), copy_rules(), reload_queue_rules(), manager_queue_rule_show(), complete_queue_rule_show(), handle_queue_rule_show(), gosub_free(), pop_exec(), return_exec(), gosub_exec(), local_read(), local_write(), find_user(), reset_user_pw(), vmu_tm(), play_message_datetime(), handle_voicemail_show_users(), handle_voicemail_show_zones(), vm_users_data_provider_get_helper(), vm_users_data_provider_get(), manager_list_voicemail_users(), free_vm_users(), free_vm_zones(), load_config(), autoservice_run(), ast_autoservice_start(), ast_autoservice_stop(), ast_autoservice_ignore(), ast_cc_extension_monitor_add_dialstring(), ast_handle_cc_control_frame(), ast_cc_call_init(), request_cc(), unsuspend(), suspend(), cancel_available_timer(), ast_cc_is_recall(), ast_cc_get_monitor_by_recall_core_id(), ast_cc_agent_set_interfaces_chanvar(), ast_set_cc_interfaces_chanvar(), cc_monitor_failed(), cc_status_response(), count_monitors_cb(), print_stats_cb(), agent_hangup(), read_agent_config(), check_availability(), check_beep(), agent_request(), action_agents(), agent_logoff(), complete_agent_logoff_cmd(), agents_show(), agents_show_online(), login_exec(), agentmonitoroutgoing_exec(), agent_devicestate(), function_agent(), agents_data_provider_get(), unload_module(), network_change_event_sched_cb(), iax2_dup_variable_datastore(), iax2_free_variable_datastore(), insert_idle_thread(), find_idle_thread(), iax_check_version(), iax_firmware_append(), reload_firmware(), handle_cli_iax2_show_cache(), iax2_call(), find_tpeer(), handle_cli_iax2_show_threads(), handle_cli_iax2_show_firmware(), handle_cli_iax2_show_registry(), manager_iax2_show_registry(), complete_dpreply(), iax2_append_register(), timing_read(), socket_read(), acf_iaxvar_read(), acf_iaxvar_write(), socket_process(), iax2_process_thread(), start_network_thread(), delete_users(), set_config(), reload_config(), find_cache(), iax2_exists(), iax2_canmatch(), iax2_matchmore(), iax2_exec(), cleanup_thread_list(), load_module(), misdn_call(), misdn_request(), misdn_facility_ie_handler(), cb_events(), sip_epa_register(), find_static_data(), sip_show_domains(), add_sip_domain(), check_sip_domain(), clear_sip_domains(), get_button_template(), find_line_by_name(), skinny_register(), handle_skinny_reset(), _skinny_show_devices(), _skinny_show_device(), _skinny_show_lines(), _skinny_show_line(), destroy_session(), accept_thread(), config_line(), config_device(), delete_devices(), skinny_reload(), register_translator(), drop_translator(), unregister_translators(), config_cache_attribute(), config_text_file_load(), handle_cli_config_reload(), handle_cli_config_list(), ast_devstate_changed_literal(), do_devstate_changes(), begin_dial(), handle_call_forward(), find_relative_dial_channel(), handle_frame(), handle_frame_ownerless(), monitor_dial(), ast_dial_join(), ast_dial_hangup(), ast_dial_destroy(), find_dial_channel(), park_space_reserve(), park_call_full(), manage_parkinglot(), parked_call_exec(), handle_parkedcalls(), manager_parking_status(), acf_curlopt_write(), acf_curlopt_helper(), acf_curl_helper(), lock_free(), lock_fixup(), lock_broker(), get_lock(), unlock_read(), odbc_datastore_free(), acf_fetch(), dialed_interface_destroy(), dialed_interface_duplicate(), ast_module_register(), ast_module_unregister(), __ast_module_user_add(), __ast_module_user_remove(), __ast_module_user_hangup_all(), find_resource(), ast_module_shutdown(), ast_unload_resource(), ast_module_helper(), ast_process_pending_reloads(), queue_reload_request(), ast_module_reload(), ast_load_resource(), load_modules(), ast_update_use_count(), ast_update_module_list(), ast_loader_register(), ast_loader_unregister(), inotify_daemon(), ast_localtime_wakeup_monitor(), ast_tzset(), gmtsub(), store_by_locale(), ast_setlocale(), logger_thread(), close_logger(), ast_log(), dundi_lookup_thread(), dundi_precache_thread(), dundi_query_thread(), handle_command_response(), network_thread(), process_precache(), dundi_flush(), complete_peer_helper(), dundi_show_peer(), dundi_show_peers(), dundi_show_trans(), dundi_show_entityid(), dundi_show_requests(), dundi_show_mappings(), dundi_show_precache(), dundi_rexmit(), dundi_ie_append_eid_appropriately(), discover_transactions(), precache_transactions(), query_transactions(), optimize_transactions(), cancel_request(), abort_request(), build_transactions(), register_request(), unregister_request(), check_request(), reschedule_precache(), dundi_precache_internal(), mark_peers(), mark_mappings(), prune_peers(), prune_mappings(), build_peer(), queue_file(), scan_thread(), agi_destroy_commands_cb(), get_agi_cmd(), add_agi_cmd(), ast_calendar_register(), ast_calendar_unregister(), reload(), find_table(), unload_pgsql(), handle_cli_realtime_pgsql_cache(), acf_jabberreceive_read(), delete_old_messages(), aji_handle_message(), find_transaction(), release_transaction(), odbc_txn_free(), mark_transaction_active(), ast_odbc_retrieve_transaction_obj(), cops_gate_cmd(), do_pktccops(), pktccops_show_cmtses(), pktccops_show_gates(), pktccops_show_pools(), pktccops_gatedel(), pktccops_gateset(), pktccops_add_ippool(), pktccops_unregister_cmtses(), and pktccops_unregister_ippools().
| #define AST_RWLIST_APPEND_LIST AST_LIST_APPEND_LIST |
Definition at line 783 of file linkedlists.h.
| #define AST_RWLIST_EMPTY AST_LIST_EMPTY |
Definition at line 451 of file linkedlists.h.
Referenced by handle_cli_status(), load_config(), handle_verbose(), handle_feature_show(), unload_module(), reload(), ast_http_uri_link(), add_redirect(), handle_show_http(), logger_print_normal(), ast_log(), handle_showmanagers(), __ast_manager_event_multichan(), handle_show_switches(), and handle_show_applications().
| #define AST_RWLIST_ENTRY AST_LIST_ENTRY |
Definition at line 414 of file linkedlists.h.
| #define AST_RWLIST_FIRST AST_LIST_FIRST |
Definition at line 422 of file linkedlists.h.
Referenced by ast_app_group_list_head(), ast_event_check_subscriber(), ast_http_uri_link(), add_redirect(), purge_events(), ast_speech_unregister(), and ast_rtp_instance_new().
| #define AST_RWLIST_HEAD | ( | name, | |
| type | |||
| ) |
Defines a structure to be used to hold a read/write list of specified type.
| name | This will be the name of the defined structure. |
| type | This is the type of each list entry. |
This macro creates a structure definition that can be used to hold a list of the entries of type type. It does not actually declare (allocate) a structure; to do that, either follow this macro with the desired name of the instance you wish to declare, or use the specified name to declare instances elsewhere.
Example usage:
static AST_RWLIST_HEAD(entry_list, entry) entries;
This would define struct entry_list, and declare an instance of it named entries, all intended to hold a list of type struct entry.
Definition at line 198 of file linkedlists.h.
| #define AST_RWLIST_HEAD_DESTROY | ( | head | ) |
Destroys an rwlist head structure.
| head | This is a pointer to the list head structure |
This macro destroys a list head structure by setting the head entry to NULL (empty list) and destroying the embedded lock. It does not free the structure from memory.
Definition at line 652 of file linkedlists.h.
Referenced by free_table(), and destroy_table_cache().
| #define AST_RWLIST_HEAD_INIT | ( | head | ) |
Initializes an rwlist head structure.
| head | This is a pointer to the list head structure |
This macro initializes a list head structure by setting the head entry to NULL (empty list) and recreating the embedded lock.
Definition at line 624 of file linkedlists.h.
Referenced by find_table(), and ast_odbc_find_table().
| #define AST_RWLIST_HEAD_INIT_VALUE |
{ \
.first = NULL, \
.last = NULL, \
.lock = AST_RWLOCK_INIT_VALUE, \
}
Defines initial values for a declaration of AST_RWLIST_HEAD.
Definition at line 242 of file linkedlists.h.
| #define AST_RWLIST_HEAD_SET | ( | head, | |
| entry | |||
| ) |
do { \ (head)->first = (entry); \ (head)->last = (entry); \ ast_rwlock_init(&(head)->lock); \ } while (0)
Initializes an rwlist head structure with a specified first entry.
| head | This is a pointer to the list head structure |
| entry | pointer to the list entry that will become the head of the list |
This macro initializes a list head structure by setting the head entry to the supplied value and recreating the embedded lock.
Definition at line 373 of file linkedlists.h.
| #define AST_RWLIST_HEAD_STATIC | ( | name, | |
| type | |||
| ) |
struct name { \ struct type *first; \ struct type *last; \ ast_rwlock_t lock; \ } name = AST_RWLIST_HEAD_INIT_VALUE
Defines a structure to be used to hold a read/write list of specified type, statically initialized.
| name | This will be the name of the defined structure. |
| type | This is the type of each list entry. |
This macro creates a structure definition that can be used to hold a list of the entries of type type, and allocates an instance of it, initialized to be empty.
Example usage:
static AST_RWLIST_HEAD_STATIC(entry_list, entry);
This would define struct entry_list, intended to hold a list of type struct entry.
Definition at line 332 of file linkedlists.h.
| #define AST_RWLIST_INSERT_AFTER AST_LIST_INSERT_AFTER |
Definition at line 687 of file linkedlists.h.
Referenced by ast_http_uri_link(), add_redirect(), and ast_manager_register_struct().
| #define AST_RWLIST_INSERT_BEFORE_CURRENT AST_LIST_INSERT_BEFORE_CURRENT |
Definition at line 595 of file linkedlists.h.
Referenced by __ast_cli_register(), __ast_custom_function_register(), ast_register_application2(), and __ast_register_translator().
| #define AST_RWLIST_INSERT_HEAD AST_LIST_INSERT_HEAD |
Definition at line 703 of file linkedlists.h.
Referenced by reload_followme(), ast_register_file_version(), ast_register_thread(), ast_register_atexit(), ast_cdr_register(), ast_channel_register(), ast_devstate_prov_add(), ast_dnsmgr_get(), ast_register_feature(), __ast_format_register(), load_module(), reload(), ast_http_uri_link(), add_redirect(), ast_image_register(), init_logger_chain(), ast_register_verbose(), ast_manager_register_struct(), ast_speech_register(), and __ast_register_translator().
| #define AST_RWLIST_INSERT_LIST_AFTER AST_LIST_INSERT_LIST_AFTER |
Definition at line 807 of file linkedlists.h.
| #define AST_RWLIST_INSERT_SORTALPHA AST_LIST_INSERT_SORTALPHA |
Definition at line 756 of file linkedlists.h.
| #define AST_RWLIST_INSERT_TAIL AST_LIST_INSERT_TAIL |
Definition at line 726 of file linkedlists.h.
Referenced by ast_app_group_set_channel(), sla_build_trunk(), sla_build_station(), handle_subscribe(), __ast_bridge_technology_register(), ast_cc_monitor_register(), ast_cc_agent_register(), load_config(), config_module(), handle_verbose(), ast_cli_perms_init(), __ast_cli_register(), build_event_channel(), config_function_read(), ast_http_uri_link(), add_redirect(), ast_manager_register_hook(), append_event(), __init_manager(), __ast_custom_function_register(), ast_register_application2(), ast_register_switch(), find_table(), try_load_key(), ast_fax_tech_register(), ast_odbc_find_table(), ast_rtp_engine_register2(), ast_rtp_glue_register2(), ast_udptl_proto_register(), and ast_xmldoc_load_documentation().
| #define AST_RWLIST_LAST AST_LIST_LAST |
Definition at line 430 of file linkedlists.h.
Referenced by grab_last().
| #define AST_RWLIST_MOVE_CURRENT AST_LIST_MOVE_CURRENT |
Definition at line 573 of file linkedlists.h.
| #define AST_RWLIST_NEXT AST_LIST_NEXT |
Definition at line 440 of file linkedlists.h.
Referenced by ast_http_uri_link(), add_redirect(), purge_events(), advance_event(), action_waitevent(), and append_event().
| #define AST_RWLIST_RDLOCK | ( | head | ) | ast_rwlock_rdlock(&(head)->lock) |
Read locks a list.
| head | This is a pointer to the list head structure |
This macro attempts to place a read lock in the list head structure pointed to by head.
| 0 | on success |
| non-zero | on failure |
Definition at line 77 of file linkedlists.h.
Referenced by ast_app_group_get_count(), ast_app_group_match_get_count(), ast_app_group_list_rdlock(), app_exec(), sla_show_trunks(), sla_show_stations(), sla_queue_event_conf(), sla_check_reload(), sla_station_exec(), sla_trunk_exec(), sla_state(), destroy_station(), sla_add_trunk_to_station(), sla_build_station(), poll_subscribed_mailboxes(), ast_complete_source_filename(), handle_show_threads(), handle_show_version_files(), ast_run_atexits(), find_best_technology(), find_monitor_callbacks(), find_agent_callbacks(), post_cdr(), handle_cli_status(), odbc_log(), custom_log(), pgsql_log(), syslog_log(), ast_channeltype_list(), handle_cli_core_show_channeltypes(), complete_channeltypes(), handle_cli_core_show_channeltype(), ast_get_channel_tech(), ast_request(), data_channeltypes_provider_handler(), ast_debug_get_by_module(), ast_verbose_get_by_module(), cli_has_permissions(), handle_cli_show_permissions(), find_best(), help1(), handle_help(), __ast_cli_generator(), ast_cli_command_full(), getproviderstate(), refresh_list(), ais_evt_show_event_channels(), feature_interpret_helper(), set_config_flags(), process_applicationmap_line(), process_config(), handle_feature_show(), ast_filehelper(), ast_readfile(), ast_writefile(), ast_format_str_reduce(), handle_cli_core_show_file_formats(), config_function_read(), acf_odbc_write(), acf_odbc_read(), cli_odbc_read(), cli_odbc_write(), handle_uri(), handle_show_http(), ast_read_image(), handle_core_show_image_formats(), ast_queue_log(), handle_logger_show_channels(), logger_print_normal(), manager_displayconnects(), handle_showmancmd(), handle_showmanager(), handle_showmanagers(), handle_showmancmds(), handle_showmaneventq(), advance_event(), ast_hook_send_action(), process_message(), append_channel_vars(), __ast_manager_event_multichan(), pbx_findapp(), pbx_findswitch(), handle_show_functions(), handle_show_function(), ast_custom_function_find(), handle_show_application(), handle_show_switches(), handle_show_applications(), ast_complete_applications(), help_workhorse(), find_command(), write_htmldump(), find_table(), handle_cli_sqlite_show_tables(), ast_key_get(), handle_cli_keys_show(), fax_session_reserve(), fax_session_new(), cli_fax_show_version(), cli_fax_show_capabilities(), cli_fax_show_settings(), cli_fax_show_stats(), ast_odbc_find_table(), find_engine(), ast_rtp_instance_new(), ast_rtp_instance_get_glue(), ast_translator_build_path(), handle_cli_core_show_translation(), ast_translator_best_choice(), ast_translate_path_steps(), ast_translate_available_formats(), get_proto(), and xmldoc_get_node().
| #define AST_RWLIST_REMOVE AST_LIST_REMOVE |
Definition at line 866 of file linkedlists.h.
Referenced by handle_verbose(), __ast_cli_unregister(), ast_dnsmgr_release(), ast_unregister_feature(), ast_http_uri_unlink(), ast_image_unregister(), ast_manager_unregister_hook(), ast_custom_function_unregister(), ast_unregister_switch(), ast_rtp_engine_unregister(), ast_rtp_glue_unregister(), and ast_udptl_proto_unregister().
| #define AST_RWLIST_REMOVE_CURRENT AST_LIST_REMOVE_CURRENT |
Definition at line 565 of file linkedlists.h.
Referenced by ast_app_group_set_channel(), ast_app_group_update(), ast_app_group_discard(), sla_check_reload(), ast_unregister_file_version(), ast_unregister_thread(), ast_unregister_atexit(), ast_bridge_technology_unregister(), ast_cc_monitor_unregister(), ast_cc_agent_unregister(), ast_cdr_unregister(), ast_devstate_prov_del(), ast_format_unregister(), ast_http_uri_unlink_all_with_key(), ast_unregister_verbose(), purge_events(), ast_manager_unregister(), __init_manager(), ast_unregister_application(), ast_agi_unregister(), realtime_unload_handler(), crypto_load(), ast_fax_tech_unregister(), ast_speech_unregister(), and ast_unregister_translator().
| #define AST_RWLIST_REMOVE_HEAD AST_LIST_REMOVE_HEAD |
Definition at line 829 of file linkedlists.h.
Referenced by unload_module(), sla_destroy(), free_config(), handle_verbose(), destroy_event_channels(), ast_unregister_features(), reload(), __ast_http_load(), init_logger_chain(), purge_events(), free_channelvars(), free_table(), unload_config(), destroy_table_cache(), and xmldoc_unload_documentation().
| #define AST_RWLIST_TIMEDRDLOCK | ( | head, | |
| ts | |||
| ) | ast_rwlock_timedrdlock(&(head)->lock, ts) |
Read locks a list, with timeout.
| head | This is a pointer to the list head structure |
| ts | Pointer to a timespec structure |
This macro attempts to place a read lock in the list head structure pointed to by head.
| 0 | on success |
| non-zero | on failure |
Definition at line 92 of file linkedlists.h.
| #define AST_RWLIST_TIMEDWRLOCK | ( | head, | |
| ts | |||
| ) | ast_rwlock_timedwrlock(&(head)->lock, ts) |
Write locks a list, with timeout.
| head | This is a pointer to the list head structure |
| ts | Pointer to a timespec structure |
This macro attempts to place an exclusive write lock in the list head structure pointed to by head.
| 0 | on success |
| non-zero | on failure |
Definition at line 66 of file linkedlists.h.
Referenced by ast_manager_unregister(), and ast_manager_register_struct().
| #define AST_RWLIST_TRAVERSE AST_LIST_TRAVERSE |
Definition at line 493 of file linkedlists.h.
Referenced by ast_app_group_get_count(), ast_app_group_match_get_count(), reload_followme(), app_exec(), sla_show_trunks(), sla_show_stations(), sla_queue_event_conf(), sla_find_trunk(), sla_find_station(), sla_check_reload(), sla_add_trunk_to_station(), poll_subscribed_mailboxes(), ast_complete_source_filename(), ast_file_version_find(), handle_show_threads(), handle_show_version_files(), ast_run_atexits(), __ast_bridge_technology_register(), find_best_technology(), find_monitor_callbacks(), find_agent_callbacks(), ast_cdr_register(), post_cdr(), handle_cli_status(), pgsql_log(), ast_channeltype_list(), handle_cli_core_show_channeltypes(), complete_channeltypes(), handle_cli_core_show_channeltype(), ast_channel_register(), ast_get_channel_tech(), ast_request(), data_channeltypes_provider_handler(), getproviderstate(), refresh_list(), ais_evt_show_event_channels(), build_event_channel(), find_dynamic_feature(), set_config_flags(), handle_feature_show(), __ast_format_register(), ast_filehelper(), ast_readfile(), ast_writefile(), ast_format_str_reduce(), handle_cli_core_show_file_formats(), config_function_read(), acf_odbc_write(), acf_odbc_read(), cli_odbc_read(), cli_odbc_write(), ast_http_uri_link(), handle_uri(), add_redirect(), handle_show_http(), ast_read_image(), handle_core_show_image_formats(), reload_logger(), handle_logger_show_channels(), logger_print_normal(), close_logger(), update_logchannels(), get_manager_by_name_locked(), handle_showmancmd(), handle_showmanager(), handle_showmanagers(), handle_showmancmds(), handle_showmaneventq(), ast_hook_send_action(), action_listcommands(), process_message(), __ast_manager_event_multichan(), ast_manager_register_struct(), pbx_findapp(), pbx_findswitch(), handle_show_functions(), handle_show_function(), ast_custom_function_find(), __ast_custom_function_register(), ast_register_application2(), ast_register_switch(), handle_show_application(), handle_show_switches(), handle_show_applications(), ast_complete_applications(), help_workhorse(), find_command(), write_htmldump(), require_odbc(), find_table_cb(), find_table(), cdr_handler(), realtime_require_handler(), handle_cli_sqlite_show_tables(), ast_key_get(), try_load_key(), crypto_load(), handle_cli_keys_show(), fax_session_reserve(), fax_session_new(), cli_fax_show_version(), cli_fax_show_capabilities(), cli_fax_show_settings(), cli_fax_show_stats(), ast_odbc_find_table(), ast_odbc_find_column(), find_engine(), ast_rtp_engine_register2(), ast_rtp_glue_register2(), ast_rtp_instance_new(), ast_rtp_instance_get_glue(), rebuild_matrix(), ast_udptl_proto_register(), and get_proto().
| #define AST_RWLIST_TRAVERSE_SAFE_BEGIN AST_LIST_TRAVERSE_SAFE_BEGIN |
Definition at line 542 of file linkedlists.h.
Referenced by ast_app_group_set_channel(), ast_app_group_update(), ast_app_group_discard(), sla_check_reload(), handle_unsubscribe(), ast_unregister_file_version(), ast_unregister_thread(), ast_unregister_atexit(), ast_bridge_technology_unregister(), ast_cc_monitor_unregister(), ast_cc_agent_unregister(), ast_cdr_unregister(), ast_channel_unregister(), __ast_cli_register(), ast_devstate_prov_del(), ast_format_unregister(), ast_http_uri_unlink_all_with_key(), ast_unregister_verbose(), purge_events(), ast_manager_unregister(), __init_manager(), __ast_custom_function_register(), ast_register_application2(), ast_unregister_application(), ast_agi_unregister(), realtime_unload_handler(), crypto_load(), handle_cli_keys_init(), ast_fax_tech_unregister(), ast_odbc_clear_cache(), ast_speech_unregister(), __ast_register_translator(), and ast_unregister_translator().
| #define AST_RWLIST_TRAVERSE_SAFE_END AST_LIST_TRAVERSE_SAFE_END |
Definition at line 602 of file linkedlists.h.
Referenced by ast_app_group_set_channel(), ast_app_group_update(), ast_app_group_discard(), sla_check_reload(), handle_unsubscribe(), ast_unregister_file_version(), ast_unregister_thread(), ast_unregister_atexit(), ast_bridge_technology_unregister(), ast_cc_monitor_unregister(), ast_cc_agent_unregister(), ast_cdr_unregister(), __ast_cli_register(), ast_devstate_prov_del(), ast_format_unregister(), ast_http_uri_unlink_all_with_key(), ast_unregister_verbose(), purge_events(), ast_manager_unregister(), __init_manager(), __ast_custom_function_register(), ast_register_application2(), ast_unregister_application(), ast_agi_unregister(), realtime_unload_handler(), crypto_load(), handle_cli_keys_init(), ast_fax_tech_unregister(), ast_odbc_clear_cache(), ast_speech_unregister(), __ast_register_translator(), and ast_unregister_translator().
| #define AST_RWLIST_TRYRDLOCK | ( | head | ) | ast_rwlock_tryrdlock(&(head)->lock) |
Read locks a list, without blocking if the list is locked.
| head | This is a pointer to the list head structure |
This macro attempts to place a read lock in the list head structure pointed to by head.
| 0 | on success |
| non-zero | on failure |
Definition at line 128 of file linkedlists.h.
| #define AST_RWLIST_TRYWRLOCK | ( | head | ) | ast_rwlock_trywrlock(&(head)->lock) |
Write locks a list, without blocking if the list is locked.
| head | This is a pointer to the list head structure |
This macro attempts to place an exclusive write lock in the list head structure pointed to by head.
| 0 | on success |
| non-zero | on failure |
Definition at line 116 of file linkedlists.h.
| #define AST_RWLIST_UNLOCK | ( | head | ) | ast_rwlock_unlock(&(head)->lock) |
Attempts to unlock a read/write based list.
| head | This is a pointer to the list head structure |
This macro attempts to remove a read or write lock from the list head structure pointed to by head. If the list was not locked by this thread, this macro has no effect.
Definition at line 150 of file linkedlists.h.
Referenced by ast_app_group_set_channel(), ast_app_group_get_count(), ast_app_group_match_get_count(), ast_app_group_update(), ast_app_group_discard(), ast_app_group_list_unlock(), reload_followme(), app_exec(), unload_module(), sla_show_trunks(), sla_show_stations(), sla_queue_event_conf(), sla_check_reload(), sla_station_exec(), sla_trunk_exec(), sla_state(), destroy_station(), sla_destroy(), sla_build_trunk(), sla_add_trunk_to_station(), sla_build_station(), poll_subscribed_mailboxes(), handle_unsubscribe(), handle_subscribe(), ast_register_file_version(), ast_unregister_file_version(), ast_complete_source_filename(), ast_file_version_find(), ast_register_thread(), ast_unregister_thread(), handle_show_threads(), handle_show_version_files(), ast_register_atexit(), ast_unregister_atexit(), ast_run_atexits(), __ast_bridge_technology_register(), ast_bridge_technology_unregister(), find_best_technology(), ast_cc_monitor_register(), find_monitor_callbacks(), ast_cc_monitor_unregister(), ast_cc_agent_register(), ast_cc_agent_unregister(), find_agent_callbacks(), ast_cdr_register(), ast_cdr_unregister(), post_cdr(), handle_cli_status(), odbc_log(), load_module(), reload(), custom_log(), pgsql_log(), syslog_log(), ast_channeltype_list(), handle_cli_core_show_channeltypes(), complete_channeltypes(), handle_cli_core_show_channeltype(), ast_channel_register(), ast_channel_unregister(), ast_get_channel_tech(), ast_request(), data_channeltypes_provider_handler(), ast_debug_get_by_module(), ast_verbose_get_by_module(), cli_has_permissions(), handle_verbose(), handle_cli_show_permissions(), destroy_user_perms(), ast_cli_perms_init(), find_best(), __ast_cli_unregister(), __ast_cli_register(), help1(), handle_help(), __ast_cli_generator(), ast_cli_command_full(), ast_devstate_prov_add(), ast_devstate_prov_del(), getproviderstate(), ast_dnsmgr_get(), ast_dnsmgr_release(), refresh_list(), ais_evt_show_event_channels(), build_event_channel(), destroy_event_channels(), ast_register_feature(), ast_unregister_feature(), ast_unregister_features(), ast_unregister_groups(), feature_interpret_helper(), set_config_flags(), process_applicationmap_line(), process_config(), handle_feature_show(), __ast_format_register(), ast_format_unregister(), ast_filehelper(), ast_readfile(), ast_writefile(), ast_format_str_reduce(), handle_cli_core_show_file_formats(), config_function_read(), acf_odbc_write(), acf_odbc_read(), cli_odbc_read(), cli_odbc_write(), ast_http_uri_link(), ast_http_uri_unlink(), ast_http_uri_unlink_all_with_key(), handle_uri(), add_redirect(), __ast_http_load(), handle_show_http(), ast_image_register(), ast_image_unregister(), ast_read_image(), handle_core_show_image_formats(), init_logger_chain(), ast_queue_log(), reload_logger(), handle_logger_set_level(), handle_logger_show_channels(), logger_print_normal(), close_logger(), ast_register_verbose(), ast_unregister_verbose(), update_logchannels(), ast_logger_register_level(), ast_logger_unregister_level(), ast_manager_register_hook(), ast_manager_unregister_hook(), grab_last(), purge_events(), manager_displayconnects(), handle_showmancmd(), handle_showmanager(), handle_showmanagers(), handle_showmancmds(), handle_showmaneventq(), advance_event(), ast_hook_send_action(), authenticate(), process_message(), append_event(), append_channel_vars(), __ast_manager_event_multichan(), ast_manager_unregister(), ast_manager_register_struct(), auth_http_callback(), __init_manager(), free_channelvars(), pbx_findapp(), pbx_findswitch(), handle_show_functions(), handle_show_function(), ast_custom_function_find(), ast_custom_function_unregister(), __ast_custom_function_register(), ast_register_application2(), ast_register_switch(), ast_unregister_switch(), handle_show_application(), handle_show_switches(), handle_show_applications(), ast_unregister_application(), ast_complete_applications(), help_workhorse(), ast_agi_register(), ast_agi_unregister(), find_command(), write_htmldump(), require_odbc(), free_table(), find_table(), unload_config(), realtime_require_handler(), realtime_unload_handler(), handle_cli_sqlite_show_tables(), ast_key_get(), crypto_load(), handle_cli_keys_show(), handle_cli_keys_init(), ast_fax_tech_register(), ast_fax_tech_unregister(), fax_session_reserve(), fax_session_new(), cli_fax_show_version(), cli_fax_show_capabilities(), cli_fax_show_settings(), cli_fax_show_stats(), destroy_table_cache(), ast_odbc_find_table(), ast_odbc_clear_cache(), find_engine(), ast_speech_register(), ast_speech_unregister(), ast_rtp_engine_register2(), ast_rtp_engine_unregister(), ast_rtp_glue_register2(), ast_rtp_glue_unregister(), ast_rtp_instance_new(), ast_rtp_instance_get_glue(), ast_translator_build_path(), handle_cli_core_show_translation(), __ast_register_translator(), ast_unregister_translator(), ast_translator_activate(), ast_translator_deactivate(), ast_translator_best_choice(), ast_translate_path_steps(), ast_translate_available_formats(), ast_udptl_proto_unregister(), ast_udptl_proto_register(), get_proto(), xmldoc_get_node(), xmldoc_unload_documentation(), and ast_xmldoc_load_documentation().
| #define AST_RWLIST_WRLOCK | ( | head | ) | ast_rwlock_wrlock(&(head)->lock) |
Write locks a list.
| head | This is a pointer to the list head structure |
This macro attempts to place an exclusive write lock in the list head structure pointed to by head.
| 0 | on success |
| non-zero | on failure |
Definition at line 51 of file linkedlists.h.
Referenced by ast_app_group_set_channel(), ast_app_group_update(), ast_app_group_discard(), ast_app_group_list_wrlock(), reload_followme(), unload_module(), sla_destroy(), sla_build_trunk(), sla_add_trunk_to_station(), sla_build_station(), handle_unsubscribe(), handle_subscribe(), ast_register_file_version(), ast_unregister_file_version(), ast_file_version_find(), ast_register_thread(), ast_unregister_thread(), ast_register_atexit(), ast_unregister_atexit(), __ast_bridge_technology_register(), ast_bridge_technology_unregister(), ast_cc_monitor_register(), ast_cc_monitor_unregister(), ast_cc_agent_register(), ast_cc_agent_unregister(), ast_cdr_register(), ast_cdr_unregister(), load_module(), reload(), ast_channel_register(), ast_channel_unregister(), handle_verbose(), destroy_user_perms(), ast_cli_perms_init(), __ast_cli_unregister(), __ast_cli_register(), ast_devstate_prov_add(), ast_devstate_prov_del(), ast_dnsmgr_get(), ast_dnsmgr_release(), build_event_channel(), destroy_event_channels(), ast_register_feature(), ast_unregister_feature(), ast_unregister_features(), ast_unregister_groups(), process_config(), __ast_format_register(), ast_format_unregister(), config_function_read(), ast_http_uri_link(), ast_http_uri_unlink(), ast_http_uri_unlink_all_with_key(), add_redirect(), __ast_http_load(), ast_image_register(), ast_image_unregister(), init_logger_chain(), ast_queue_log(), reload_logger(), handle_logger_set_level(), close_logger(), ast_register_verbose(), ast_unregister_verbose(), update_logchannels(), ast_logger_register_level(), ast_logger_unregister_level(), ast_manager_register_hook(), ast_manager_unregister_hook(), grab_last(), purge_events(), authenticate(), append_event(), auth_http_callback(), __init_manager(), free_channelvars(), ast_custom_function_unregister(), __ast_custom_function_register(), ast_register_application2(), ast_register_switch(), ast_unregister_switch(), ast_unregister_application(), ast_agi_register(), ast_agi_unregister(), free_table(), find_table(), unload_config(), realtime_unload_handler(), crypto_load(), handle_cli_keys_init(), ast_fax_tech_register(), ast_fax_tech_unregister(), destroy_table_cache(), ast_odbc_clear_cache(), ast_speech_register(), ast_speech_unregister(), ast_rtp_engine_register2(), ast_rtp_engine_unregister(), ast_rtp_glue_register2(), ast_rtp_glue_unregister(), handle_cli_core_show_translation(), __ast_register_translator(), ast_unregister_translator(), ast_translator_activate(), ast_translator_deactivate(), ast_udptl_proto_unregister(), ast_udptl_proto_register(), xmldoc_unload_documentation(), and ast_xmldoc_load_documentation().