#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_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_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. |
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. |
Definition at line 767 of file linkedlists.h.
Referenced by announce_thread(), ast_do_masquerade(), ast_merge_contexts_and_delete(), clone_variables(), 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 |
zero if not.
Definition at line 449 of file linkedlists.h.
Referenced by __ast_context_destroy(), __ast_read(), ack_trans(), action_meetmelist(), add_user_extension(), announce_thread(), ast_autoservice_start(), ast_dial_option_disable(), ast_dial_option_enable(), ast_dial_run(), ast_merge_contexts_and_delete(), audio_audiohook_write_list(), autoservice_run(), build_peer(), check_bridge(), conf_run(), config_text_file_save(), do_devstate_changes(), dundi_lookup_internal(), dundi_precache_internal(), dundi_query_eid_internal(), dundi_show_peer(), eivr_comm(), findmeexec(), forward_message(), get_destination(), handle_minivm_list_templates(), handle_minivm_show_users(), handle_minivm_show_zones(), handle_request_do(), handle_request_refer(), handle_request_subscribe(), handle_voicemail_show_users(), handle_voicemail_show_zones(), locals_show(), logger_thread(), manager_list_voicemail_users(), meetme_cmd(), moh_class_inuse(), monmp3thread(), register_verify(), rpt(), sip_show_domains(), sip_show_settings(), skinny_hangup(), sla_check_reload(), sla_load_config(), sla_thread(), and wait_for_winner().
#define AST_LIST_ENTRY | ( | type | ) |
Value:
struct { \ struct type *next; \ }
type | This is the type of each list entry. |
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 __ast_read(), abort_request(), ast_dial_answered(), ast_dial_answered_steal(), ast_dial_join(), ast_do_masquerade(), ast_get_indication_tone(), ast_get_indication_zone(), ast_walk_context_switches(), build_device(), build_user_routes(), cli_next(), clone_variables(), do_devstate_changes(), find_subchannel_by_instance_reference(), gen_readframe(), iax_frame_free(), iax_frame_new(), join_queue(), local_read(), local_write(), logger_thread(), phoneprov_callback(), pp_each_user_exec(), process_precache(), process_weights(), purge_events(), reschedule_precache(), and skinny_hangup().
Value:
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. |
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 acf_iaxvar_read(), acf_iaxvar_write(), add_agi_cmd(), add_to_agi(), agi_destroy_commands_cb(), ast_iax2_new(), authenticate_reply(), dial_exec_full(), dialed_interface_destroy(), dialed_interface_duplicate(), get_agi_cmd(), get_lock(), gosub_exec(), gosub_free(), iax2_call(), iax2_dup_variable_datastore(), iax2_free_variable_datastore(), local_read(), local_write(), lock_free(), pop_exec(), return_exec(), socket_process(), try_calling(), and unlock_read().
#define AST_LIST_HEAD_DESTROY | ( | head | ) |
Value:
{ \ (head)->first = NULL; \ (head)->last = NULL; \ ast_mutex_destroy(&(head)->lock); \ }
head | This is a pointer to the list head structure |
Definition at line 637 of file linkedlists.h.
Referenced by agi_destroy_commands_cb(), aji_client_destroy(), ast_module_shutdown(), ast_module_unregister(), dialed_interface_destroy(), gosub_free(), iax2_free_variable_datastore(), lock_free(), and odbc_datastore_free().
#define AST_LIST_HEAD_INIT | ( | head | ) |
Value:
{ \ (head)->first = NULL; \ (head)->last = NULL; \ ast_mutex_init(&(head)->lock); \ }
head | This is a pointer to the list head structure |
Definition at line 610 of file linkedlists.h.
Referenced by acf_iaxvar_write(), acf_odbc_read(), add_to_agi(), aji_create_client(), ast_dial_create(), ast_iax2_new(), ast_module_register(), authenticate_reply(), config_cache_attribute(), config_text_file_load(), dial_exec_full(), dialed_interface_duplicate(), get_lock(), gosub_exec(), iax2_dup_variable_datastore(), socket_process(), and try_calling().
#define AST_LIST_HEAD_INIT_NOLOCK | ( | head | ) |
Value:
Initializes a list head structure.
head | This is a pointer to the list head structure |
Definition at line 665 of file linkedlists.h.
Referenced by __ast_answer(), alloc_profile(), announce_thread(), app_exec(), ast_audiohook_attach(), ast_channel_alloc(), build_profile(), conf_run(), do_devstate_changes(), dundi_lookup_local(), find_table(), findmeexec(), free_numbers(), gosub_allocate_frame(), load_module(), load_modules(), logger_thread(), loopback_subst(), new_iax(), session_do(), and sip_alloc().
#define AST_LIST_HEAD_INIT_VALUE |
Value:
{ \ .first = NULL, \ .last = NULL, \ .lock = AST_MUTEX_INIT_VALUE, \ }
Definition at line 233 of file linkedlists.h.
Referenced by app_exec(), and ast_merge_contexts_and_delete().
Value:
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. |
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 __ast_answer(), announce_thread(), and ast_do_masquerade().
#define AST_LIST_HEAD_NOLOCK_INIT_VALUE |
Value:
{ \ .first = NULL, \ .last = NULL, \ }
Definition at line 251 of file linkedlists.h.
Referenced by ast_get_srv(), do_directory(), and process_weights().
Value:
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 ast_event_check_subscriber(), ast_event_new(), ast_module_shutdown(), and forward_message().
#define AST_LIST_HEAD_SET | ( | head, | |||
entry | ) |
Value:
do { \ (head)->first = (entry); \ (head)->last = (entry); \ ast_mutex_init(&(head)->lock); \ } while (0)
head | This is a pointer to the list head structure | |
entry | pointer to the list entry that will become the head of the list |
Definition at line 359 of file linkedlists.h.
#define AST_LIST_HEAD_SET_NOLOCK | ( | head, | |||
entry | ) |
Value:
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 |
Definition at line 387 of file linkedlists.h.
Referenced by __ast_read(), and ast_do_masquerade().
Value:
struct name { \ struct type *first; \ struct type *last; \ ast_mutex_t lock; \ } name = AST_LIST_HEAD_INIT_VALUE
name | This will be the name of the defined structure. | |
type | This is the type of each list entry. |
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 679 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 583 of file linkedlists.h.
Referenced by add_user_extension(), defer_full_frame(), insert_penaltychange(), 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 695 of file linkedlists.h.
Referenced by __ast_answer(), __ast_module_user_add(), __ast_queue_frame(), accept_thread(), ack_trans(), add_to_interfaces(), add_user_extension(), aji_handle_message(), append_transaction(), ast_autoservice_start(), ast_cdr_copy_vars(), ast_cdr_setvar(), ast_channel_datastore_add(), ast_channel_register(), ast_extension_state_add(), ast_frame_free(), ast_frame_header_new(), ast_loader_register(), ast_merge_contexts_and_delete(), ast_module_shutdown(), astman_datastore_add(), autoservice_run(), build_conf(), build_device(), build_mapping(), build_peer(), create_transaction(), deep_copy_peer(), dundi_lookup_local(), dundi_send(), forward_message(), frame_set_var(), gosub_exec(), handle_command_response(), handle_frame(), handle_frame_ownerless(), iax2_append_register(), iax_frame_free(), iax_process_template(), load_config(), local_alloc(), loopback_subst(), mohalloc(), parse_config(), pbx_builtin_pushvar_helper(), pbx_builtin_setvar_helper(), queue_ringing_trunk(), register_group(), register_group_feature(), register_request(), register_translator(), reload_config(), reschedule_precache(), sched_release(), session_do(), shared_write(), skinny_new(), sla_ring_station(), and unload_module().
#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 735 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. |
Definition at line 715 of file linkedlists.h.
Referenced by __ao2_link(), __ast_queue_frame(), __ast_verbose_ap(), _sip_tcp_helper_thread(), acf_iaxvar_write(), add_agent(), add_agi_cmd(), add_peer_mailboxes(), add_sip_domain(), add_to_load_order(), add_user_extension(), app_exec(), append_event(), append_history_va(), append_mailbox_mapping(), append_permission(), ast_agi_register(), ast_audiohook_attach(), ast_channel_datastore_inherit(), ast_channel_inherit_variables(), ast_context_add_switch2(), ast_devstate_changed_literal(), ast_dial_append(), ast_do_masquerade(), ast_event_check_subscriber(), ast_event_new(), ast_event_sub_append_ie_exists(), ast_event_sub_append_ie_raw(), ast_event_sub_append_ie_str(), ast_event_sub_append_ie_uint(), ast_iax2_new(), ast_lock_path_flock(), ast_log(), ast_module_register(), ast_odbc_find_table(), ast_slinfactory_feed(), ast_taskprocessor_push(), ast_tzset(), authenticate_reply(), build_extension(), build_profile(), clone_variables(), conf_run(), config_cache_attribute(), copy_rules(), create_vmaccount(), defer_full_frame(), devstate_change_collector_cb(), dial_exec_full(), dialed_interface_duplicate(), dummy_start(), eivr_comm(), find_cache(), find_or_create(), find_table(), find_tpeer(), findmeexec(), gen_readframe(), get_lock(), gmtsub(), iax2_dup_variable_datastore(), iax2_transmit(), iax_frame_free(), iax_frame_new(), inherit_category(), insert_idle_thread(), insert_penaltychange(), load_config(), load_values_config(), local_call(), message_template_build(), phoneprov_callback(), queue_request(), reload_followme(), reload_queue_rules(), rpt(), search_directory(), set_config(), set_timezone_variables(), setup_inheritable_audiohook(), sla_add_trunk_to_station(), sla_queue_event_full(), sla_stop_ringing_station(), socket_process(), srv_callback(), start_network_thread(), timezone_add(), try_calling(), and try_firmware().
#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 __ast_queue_frame(), admin_exec(), conf_run(), config_text_file_save(), find_dial_channel(), grab_last(), 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 |
0 | on success | |
non-zero | on failure |
Definition at line 39 of file linkedlists.h.
Referenced by __ast_module_user_add(), __ast_module_user_hangup_all(), __ast_module_user_remove(), __ast_verbose_ap(), __attempt_transmit(), __manager_event(), __unload_module(), _sip_tcp_helper_thread(), abort_request(), accept_thread(), acf_fetch(), acf_iaxvar_read(), acf_iaxvar_write(), acf_meetme_info(), action_agents(), action_meetmelist(), add_agi_cmd(), add_sip_domain(), add_to_interfaces(), admin_exec(), agent_devicestate(), agent_hangup(), agent_logoff(), agent_request(), agentmonitoroutgoing_exec(), agents_show(), agents_show_online(), agi_destroy_commands_cb(), aji_client_destroy(), aji_handle_message(), append_event(), ast_autoservice_start(), ast_autoservice_stop(), ast_devstate_changed_literal(), ast_dial_destroy(), ast_dial_hangup(), ast_dial_join(), ast_frame_free(), ast_frame_header_new(), ast_load_resource(), ast_loader_register(), ast_loader_unregister(), ast_lock_path_flock(), ast_log(), ast_module_helper(), ast_module_register(), ast_module_reload(), ast_module_shutdown(), ast_module_unregister(), ast_tzset(), ast_unload_resource(), ast_unlock_path_flock(), ast_update_use_count(), astman_verify_session_readpermissions(), astman_verify_session_writepermissions(), autoservice_run(), begin_dial(), build_conf(), build_peer(), build_transactions(), cancel_request(), channel_admin_exec(), check_availability(), check_beep(), check_manager_session_inuse(), check_request(), check_sip_domain(), clear_and_free_interfaces(), clear_sip_domains(), close_logger(), complete_agent_logoff_cmd(), complete_dpreply(), complete_meetmecmd(), complete_peer_helper(), complete_queue_rule_show(), complete_transfer(), conf_exec(), conf_free(), conf_play(), conf_run(), config_cache_attribute(), config_text_file_load(), copy_rules(), create_vmaccount(), delete_devices(), delete_users(), destroy_session(), dial_exec_full(), dialed_interface_destroy(), dialed_interface_duplicate(), discover_transactions(), dispose_conf(), do_devstate_changes(), drop_translator(), dundi_flush(), dundi_ie_append_eid_appropriately(), dundi_lookup_thread(), dundi_precache_internal(), dundi_precache_thread(), dundi_query_thread(), dundi_rexmit(), dundi_show_entityid(), dundi_show_mappings(), dundi_show_peer(), dundi_show_peers(), dundi_show_precache(), dundi_show_requests(), dundi_show_trans(), eivr_comm(), find_account(), find_cache(), find_conf(), find_conf_realtime(), find_dial_channel(), find_idle_thread(), find_line_by_name(), find_relative_dial_channel(), find_resource(), find_session(), find_table(), find_tpeer(), find_user(), free_vm_users(), free_vm_zones(), function_agent(), gen_readframe(), get_agi_cmd(), get_button_template(), get_lock(), gmtsub(), gosub_exec(), gosub_free(), grab_last(), handle_cli_config_list(), handle_cli_config_reload(), handle_cli_iax2_show_cache(), handle_cli_iax2_show_firmware(), handle_cli_iax2_show_registry(), handle_cli_iax2_show_stats(), handle_cli_iax2_show_threads(), handle_cli_realtime_pgsql_cache(), handle_command_response(), handle_frame(), handle_frame_ownerless(), handle_line_state_req_message(), handle_minivm_list_templates(), handle_minivm_show_users(), handle_minivm_show_zones(), handle_parkedcalls(), handle_queue_rule_show(), handle_showmanconn(), handle_showmaneventq(), handle_skinny_reset(), handle_skinny_show_device(), handle_skinny_show_devices(), handle_skinny_show_line(), handle_skinny_show_lines(), handle_statechange(), handle_voicemail_show_users(), handle_voicemail_show_zones(), iax2_append_register(), iax2_call(), iax2_canmatch(), iax2_dup_variable_datastore(), iax2_exec(), iax2_exists(), iax2_free_variable_datastore(), iax2_matchmore(), iax2_process_thread(), iax2_transmit(), iax_check_version(), iax_firmware_append(), insert_idle_thread(), load_config(), load_module(), load_modules(), local_alloc(), local_devicestate(), local_hangup(), local_read(), local_request(), local_write(), locals_show(), lock_free(), logger_thread(), login_exec(), manage_parkinglot(), manager_list_voicemail_users(), manager_parking_status(), manager_queue_rule_show(), mark_mappings(), mark_peers(), meetme_cmd(), meetmemute(), meetmestate(), message_destroy_list(), message_template_build(), message_template_find(), monitor_dial(), network_thread(), odbc_datastore_free(), optimize_transactions(), park_exec_full(), park_space_reserve(), play_message_datetime(), pop_exec(), precache_transactions(), process_precache(), prune_mappings(), prune_peers(), purge_events(), purge_sessions(), pvt_destructor(), query_transactions(), read_agent_config(), recordthread(), register_request(), register_translator(), reload(), reload_agents(), reload_config(), reload_firmware(), reload_queue_rules(), remove_from_interfaces(), reschedule_precache(), reset_user_pw(), return_exec(), sendmail(), session_do(), set_config(), sip_show_domains(), sip_show_tcp(), sip_tcp_locate(), skinny_register(), socket_process(), socket_read(), start_network_thread(), timezone_add(), timezone_destroy_list(), timing_read(), try_calling(), unload_module(), unload_pgsql(), unlock_read(), unregister_request(), unregister_translators(), vmaccounts_destroy_list(), vmu_tm(), and vnak_retransmit().
#define AST_LIST_MOVE_CURRENT | ( | newhead, | |||
field | ) |
Value:
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 566 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 __ao2_iterator_next(), __ast_read(), add_user_extension(), append_event(), ast_speech_results_free(), ast_walk_context_switches(), cli_next(), create_video_frame(), do_devstate_changes(), find_result(), find_user(), group_count_function_read(), group_function_read(), group_list_function_read(), group_show_channels(), handle_keypad_button_message(), handle_onhook_message(), handle_soft_key_event_message(), handle_speechrecognize(), logger_thread(), peer_mailboxes_to_str(), purge_events(), reschedule_precache(), skinny_hangup(), speech_read(), udptl_rx_packet(), unref_event(), and update_qe_rule().
#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 811 of file linkedlists.h.
Referenced by __ast_module_user_remove(), __attempt_transmit(), _sip_tcp_helper_thread(), agent_hangup(), ast_audiohook_remove(), ast_autoservice_start(), ast_channel_datastore_remove(), ast_frame_free(), astman_datastore_remove(), conf_free(), conf_run(), destroy_packet(), destroy_session(), handle_frame(), handle_frame_ownerless(), handle_onhook_message(), handle_soft_key_event_message(), iax2_process_thread(), iax_frame_new(), local_hangup(), local_request(), moh_release(), pbx_builtin_setvar_helper(), shared_write(), skinny_hangup(), and unregister_request().
#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 553 of file linkedlists.h.
Referenced by __ao2_callback(), __ast_context_destroy(), __ast_read(), acf_iaxvar_write(), aji_handle_message(), ast_autoservice_stop(), ast_cdr_setvar(), ast_channel_unregister(), ast_context_remove_switch2(), ast_dial_destroy(), ast_extension_state_del(), ast_frdup(), ast_loader_unregister(), ast_module_unregister(), ast_odbc_clear_cache(), ast_unlock_path_flock(), audio_audiohook_write_list(), clearvar_prefix(), complete_dpreply(), destroy_session(), drop_translator(), dtmf_audiohook_write_list(), find_cache(), forward_message(), func_inheritance_write(), handle_unsubscribe(), iax_frame_new(), iax_provision_free_templates(), manage_parkinglot(), network_thread(), park_exec_full(), prune_mappings(), prune_peers(), purge_sessions(), read_agent_config(), reload_firmware(), remove_from_interfaces(), reschedule_precache(), sla_calc_station_timeouts(), sla_calc_trunk_timeouts(), sla_check_failed_station(), sla_choose_ringing_trunk(), sla_handle_dial_state_event(), sla_hangup_stations(), sla_station_exec(), sla_trunk_exec(), timing_read(), and unload_pgsql().
#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. |
Definition at line 790 of file linkedlists.h.
Referenced by __ast_answer(), __ast_internal_context_destroy(), __ast_module_user_hangup_all(), __sip_destroy(), __unload_module(), acf_fetch(), agi_destroy_commands_cb(), aji_client_destroy(), announce_thread(), app_exec(), append_history_va(), ast_audiohook_detach_list(), ast_autoservice_stop(), ast_cdr_free_vars(), ast_channel_free(), ast_destroy_template_list(), ast_do_masquerade(), ast_event_sub_destroy(), ast_frame_header_new(), ast_get_srv(), ast_merge_contexts_and_delete(), ast_module_shutdown(), ast_remove_hint(), ast_slinfactory_destroy(), ast_slinfactory_flush(), ast_slinfactory_read(), ast_unregister_groups(), audiohook_inheritance_destroy(), cancel_request(), clear_and_free_interfaces(), clear_peer_mailboxes(), clear_sip_domains(), conf_free(), container_destruct(), container_destruct_debug(), delete_devices(), delete_extension(), delete_users(), destroy_all_mailbox_mappings(), destroy_packets(), destroy_permissions(), destroy_station(), destroy_table(), destroy_trunk(), dialed_interface_destroy(), do_directory(), dundi_lookup_local(), eivr_comm(), find_idle_thread(), findmeexec(), forward_message(), frame_cache_cleanup(), free_config(), free_numbers(), free_session(), free_vm_users(), free_vm_zones(), gen_nextfile(), get_agi_cmd(), gosub_free(), gosub_release_frame(), handle_deferred_full_frames(), iax2_free_variable_datastore(), init_queue(), leave_queue(), lock_free(), loopback_subst(), message_destroy_list(), moh_class_destructor(), odbc_datastore_free(), pbx_builtin_clear_globals(), pop_exec(), process_precache(), process_request_queue(), profile_destructor(), purge_events(), reload(), reload_queue_rules(), return_exec(), rpt(), run_devstate_collector(), sched_alloc(), sched_context_destroy(), shared_variable_free(), sla_stop_ringing_trunk(), sla_thread(), table_configs_free(), timezone_destroy_list(), tps_taskprocessor_pop(), unload_module(), unregister_translators(), user_destructor(), and vmaccounts_destroy_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.
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. |
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 __ao2_iterator_next(), __ast_queue_frame(), __manager_event(), acf_iaxvar_read(), acf_meetme_info(), ack_trans(), action_agents(), action_meetmelist(), add_agent(), add_peer_mwi_subs(), add_to_interfaces(), add_to_load_order(), add_user_extension(), admin_exec(), agent_devicestate(), agent_logoff(), agent_request(), agentmonitoroutgoing_exec(), agents_show(), agents_show_online(), app_exec(), ast_autoservice_start(), ast_cdr_copy_vars(), ast_cdr_getvar_internal(), ast_cdr_serialize_variables(), ast_channel_datastore_inherit(), ast_channel_inherit_variables(), ast_channel_register(), ast_channeltype_list(), ast_context_add_switch2(), ast_debug_get_by_file(), ast_dial_hangup(), ast_do_masquerade(), ast_event_check_subscriber(), ast_event_new(), ast_event_report_subs(), ast_extension_state_add(), ast_get_channel_tech(), ast_module_helper(), ast_module_reload(), ast_request(), ast_slinfactory_feed(), ast_tzset(), ast_update_module_list(), ast_update_use_count(), ast_verbose_get_by_file(), astman_verify_session_readpermissions(), astman_verify_session_writepermissions(), audiohook_inheritance_fixup(), autoservice_run(), begin_dial(), build_conf(), build_mapping(), build_peer(), build_transactions(), build_user_routes(), cdr_merge_vars(), channel_admin_exec(), check_availability(), check_beep(), check_manager_session_inuse(), check_request(), check_sip_domain(), clear_calling_tree(), clone_variables(), complete_agent_logoff_cmd(), complete_channeltypes(), complete_meetmecmd(), complete_minivm_show_users(), complete_peer_helper(), complete_queue_rule_show(), complete_skinny_devices(), complete_skinny_show_line(), complete_transfer(), complete_voicemail_show_users(), conf_exec(), conf_queue_dtmf(), config_cache_attribute(), config_text_file_load(), config_text_file_save(), copy_rules(), deep_copy_peer(), destroy_station(), destroy_trans(), dial_exec_full(), dialed_interface_duplicate(), discover_transactions(), do_directory(), do_housekeeping(), dump_agents(), dump_cache_cb(), dundi_answer_query(), dundi_flush(), dundi_ie_append_eid_appropriately(), dundi_precache_full(), dundi_precache_internal(), dundi_show_mappings(), dundi_show_peer(), dundi_show_peers(), dundi_show_precache(), dundi_show_requests(), dundi_show_trans(), feature_interpret_helper(), find_account(), find_agent(), find_audiohook_by_source(), find_conf(), find_conf_realtime(), find_debug_file(), find_dial_channel(), find_group(), find_line_by_instance(), find_line_by_name(), find_or_create(), find_peer(), find_relative_dial_channel(), find_resource(), find_session(), find_speeddial_by_instance(), find_subchannel_by_instance_reference(), find_subchannel_by_reference(), find_table(), find_tpeer(), find_transaction(), find_user(), findmeexec(), frame_set_var(), gen_sub_event(), get_button_template(), get_cached_mwi(), get_devicestate(), get_lock(), get_trans_id(), gmtsub(), handle_button_template_req_message(), handle_capabilities_res_message(), handle_cli_config_list(), handle_cli_config_reload(), handle_cli_core_show_channeltype(), handle_cli_core_show_channeltypes(), handle_cli_iax2_show_cache(), handle_cli_iax2_show_firmware(), handle_cli_iax2_show_registry(), handle_cli_iax2_show_stats(), handle_cli_iax2_show_threads(), handle_cli_realtime_pgsql_cache(), handle_event(), handle_minivm_list_templates(), handle_minivm_show_users(), handle_minivm_show_zones(), handle_offhook_message(), handle_parkedcalls(), handle_queue_rule_show(), handle_show_globals(), handle_show_hint(), handle_show_hints(), handle_showmanconn(), handle_showmaneventq(), handle_skinny_reset(), handle_skinny_show_device(), handle_skinny_show_devices(), handle_skinny_show_line(), handle_skinny_show_lines(), handle_statechange(), handle_timeout_trip(), handle_voicemail_show_users(), handle_voicemail_show_zones(), has_permission(), hashkeys_read(), iax2_call(), iax2_dup_variable_datastore(), iax_check_version(), iax_firmware_append(), iax_prov_complete_template(), iax_provision_reload(), iax_show_provisioning(), iax_template_find(), insert_penaltychange(), load_module(), local_call(), local_devicestate(), local_read(), locals_show(), login_exec(), manager_list_voicemail_users(), manager_parking_status(), manager_queue_rule_show(), mark_mappings(), mark_peers(), meetme_cmd(), meetmemute(), meetmestate(), message_template_find(), mgcp_call(), monitor_dial(), monmp3thread(), mwi_monitor_handler(), odbc_log(), optimize_transactions(), ospauth_exec(), ospfinished_exec(), osplookup_exec(), ospnext_exec(), park_space_reserve(), pbx_builtin_getvar_helper(), pbx_builtin_serialize_variables(), pbx_builtin_setvar_helper(), pbx_find_extension(), pbx_retrieve_variable(), peer_mailboxes_to_str(), phoneprov_callback(), play_message_datetime(), pp_each_extension_exec(), precache_transactions(), process_weights(), pvt_destructor(), query_transactions(), read_agent_config(), register_request(), reload(), reload_agents(), reload_config(), reload_firmware(), reload_followme(), require_pgsql(), reset_user_pw(), rpt(), sendmail(), shared_read(), shared_write(), sip_call(), sip_dump_history(), sip_show_domains(), sip_show_history(), sip_show_tcp(), sip_tcp_locate(), skinny_register(), skinny_unregister(), sla_calc_station_delays(), sla_calc_station_timeouts(), sla_change_trunk_state(), sla_check_inuse_station(), sla_check_ringing_station(), sla_check_station_hold_access(), sla_check_timed_out_station(), sla_choose_idle_trunk(), sla_choose_ringing_trunk(), sla_find_trunk_ref(), sla_find_trunk_ref_byname(), sla_hangup_stations(), sla_queue_event_conf(), sla_ring_stations(), sla_show_stations(), sla_show_trunks(), sla_state(), sla_stop_ringing_station(), socket_process(), socket_read(), sqlite3_log(), table_config_for_table_name(), transmit_invite(), try_calling(), try_firmware(), unload_module(), unlock_read(), update_pgsql(), vmu_tm(), vnak_retransmit(), and wait_for_winner().
#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. |
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 __ao2_callback(), __ast_context_destroy(), __ast_read(), acf_iaxvar_write(), add_user_extension(), aji_handle_message(), ast_autoservice_stop(), ast_cdr_setvar(), ast_channel_audiohook_count_by_source(), ast_channel_audiohook_count_by_source_running(), ast_channel_datastore_find(), ast_channel_unregister(), ast_context_remove_switch2(), ast_dial_destroy(), ast_extension_state_del(), ast_frdup(), ast_loader_unregister(), ast_module_unregister(), ast_unlock_path_flock(), astman_datastore_find(), audio_audiohook_write_list(), cdr_merge_vars(), clearvar_prefix(), complete_dpreply(), defer_full_frame(), destroy_session(), drop_translator(), dtmf_audiohook_write_list(), find_cache(), forward_message(), func_inheritance_write(), iax_frame_new(), iax_provision_free_templates(), insert_penaltychange(), manage_parkinglot(), network_thread(), park_exec_full(), precache_transactions(), process_weights(), prune_mappings(), prune_peers(), purge_sessions(), read_agent_config(), reload_firmware(), remove_from_interfaces(), reschedule_precache(), sla_calc_station_timeouts(), sla_calc_trunk_timeouts(), sla_check_failed_station(), sla_choose_ringing_trunk(), sla_handle_dial_state_event(), sla_hangup_stations(), sla_station_exec(), sla_trunk_exec(), srv_callback(), timing_read(), unload_module(), and unload_pgsql().
#define AST_LIST_TRAVERSE_SAFE_END } |
Closes a safe loop traversal block.
Definition at line 599 of file linkedlists.h.
Referenced by __ao2_callback(), __ast_context_destroy(), __ast_read(), acf_iaxvar_write(), add_user_extension(), aji_handle_message(), ast_autoservice_stop(), ast_cdr_setvar(), ast_channel_audiohook_count_by_source(), ast_channel_audiohook_count_by_source_running(), ast_channel_datastore_find(), ast_channel_unregister(), ast_context_remove_switch2(), ast_extension_state_del(), ast_frdup(), ast_loader_unregister(), ast_module_unregister(), ast_unlock_path_flock(), astman_datastore_find(), audio_audiohook_write_list(), cdr_merge_vars(), clearvar_prefix(), complete_dpreply(), defer_full_frame(), destroy_session(), drop_translator(), dtmf_audiohook_write_list(), find_cache(), forward_message(), func_inheritance_write(), iax_frame_new(), iax_provision_free_templates(), insert_penaltychange(), network_thread(), park_exec_full(), precache_transactions(), process_weights(), prune_mappings(), prune_peers(), purge_sessions(), read_agent_config(), reload_firmware(), remove_from_interfaces(), reschedule_precache(), sla_calc_station_timeouts(), sla_calc_trunk_timeouts(), sla_check_failed_station(), sla_choose_ringing_trunk(), sla_handle_dial_state_event(), sla_hangup_stations(), sla_station_exec(), sla_trunk_exec(), srv_callback(), timing_read(), unload_module(), and unload_pgsql().
#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 |
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 |
Definition at line 139 of file linkedlists.h.
Referenced by __ast_module_user_add(), __ast_module_user_hangup_all(), __ast_module_user_remove(), __ast_verbose_ap(), __attempt_transmit(), __manager_event(), __unload_module(), _sip_tcp_helper_thread(), abort_request(), accept_thread(), acf_fetch(), acf_iaxvar_read(), acf_iaxvar_write(), acf_meetme_info(), action_agents(), action_meetmelist(), add_agi_cmd(), add_sip_domain(), add_to_interfaces(), admin_exec(), agent_devicestate(), agent_hangup(), agent_logoff(), agent_request(), agentmonitoroutgoing_exec(), agents_show(), agents_show_online(), agi_destroy_commands_cb(), aji_handle_message(), append_event(), ast_autoservice_start(), ast_autoservice_stop(), ast_devstate_changed_literal(), ast_dial_hangup(), ast_dial_join(), ast_frame_free(), ast_frame_header_new(), ast_load_resource(), ast_loader_register(), ast_loader_unregister(), ast_lock_path_flock(), ast_log(), ast_module_helper(), ast_module_register(), ast_module_reload(), ast_module_shutdown(), ast_module_unregister(), ast_park_call_full(), ast_tzset(), ast_unload_resource(), ast_unlock_path_flock(), ast_update_module_list(), ast_update_use_count(), astman_verify_session_readpermissions(), astman_verify_session_writepermissions(), autoservice_run(), begin_dial(), build_conf(), build_peer(), cancel_request(), channel_admin_exec(), check_availability(), check_beep(), check_manager_session_inuse(), check_request(), check_sip_domain(), clear_and_free_interfaces(), clear_sip_domains(), close_logger(), complete_agent_logoff_cmd(), complete_dpreply(), complete_meetmecmd(), complete_peer_helper(), complete_queue_rule_show(), complete_transfer(), conf_exec(), conf_free(), conf_play(), conf_run(), config_cache_attribute(), config_text_file_load(), copy_rules(), create_vmaccount(), delete_devices(), delete_users(), destroy_session(), dial_exec_full(), dialed_interface_destroy(), dialed_interface_duplicate(), discover_transactions(), dispose_conf(), do_devstate_changes(), drop_translator(), dundi_flush(), dundi_ie_append_eid_appropriately(), dundi_lookup_thread(), dundi_precache_internal(), dundi_precache_thread(), dundi_query_thread(), dundi_rexmit(), dundi_show_entityid(), dundi_show_mappings(), dundi_show_peers(), dundi_show_precache(), dundi_show_requests(), dundi_show_trans(), eivr_comm(), find_account(), find_cache(), find_conf(), find_conf_realtime(), find_dial_channel(), find_idle_thread(), find_line_by_name(), find_relative_dial_channel(), find_resource(), find_session(), find_table(), find_tpeer(), find_user(), free_vm_users(), free_vm_zones(), function_agent(), gen_readframe(), get_agi_cmd(), get_button_template(), get_lock(), gmtsub(), gosub_exec(), gosub_free(), grab_last(), handle_call_forward(), handle_cli_config_list(), handle_cli_config_reload(), handle_cli_iax2_show_firmware(), handle_cli_iax2_show_registry(), handle_cli_iax2_show_stats(), handle_cli_iax2_show_threads(), handle_cli_realtime_pgsql_cache(), handle_command_response(), handle_frame(), handle_frame_ownerless(), handle_line_state_req_message(), handle_minivm_list_templates(), handle_minivm_show_users(), handle_minivm_show_zones(), handle_parkedcalls(), handle_queue_rule_show(), handle_showmanconn(), handle_showmaneventq(), handle_skinny_reset(), handle_skinny_show_device(), handle_skinny_show_devices(), handle_skinny_show_line(), handle_skinny_show_lines(), handle_statechange(), handle_voicemail_show_users(), handle_voicemail_show_zones(), iax2_append_register(), iax2_call(), iax2_canmatch(), iax2_dup_variable_datastore(), iax2_exec(), iax2_exists(), iax2_free_variable_datastore(), iax2_matchmore(), iax2_process_thread(), iax2_transmit(), iax_check_version(), iax_firmware_append(), insert_idle_thread(), load_config(), load_module(), local_alloc(), local_devicestate(), local_hangup(), local_read(), local_request(), local_write(), locals_show(), lock_free(), logger_thread(), login_exec(), manager_list_voicemail_users(), manager_parking_status(), manager_queue_rule_show(), mark_mappings(), mark_peers(), meetme_cmd(), meetmemute(), meetmestate(), message_destroy_list(), message_template_build(), message_template_find(), monitor_dial(), network_thread(), odbc_datastore_free(), park_exec_full(), park_space_reserve(), play_message_datetime(), pop_exec(), precache_transactions(), process_precache(), prune_mappings(), prune_peers(), purge_events(), purge_sessions(), pvt_destructor(), query_transactions(), read_agent_config(), recordthread(), register_request(), register_translator(), reload(), reload_agents(), reload_config(), reload_firmware(), reload_queue_rules(), remove_from_interfaces(), reschedule_precache(), reset_user_pw(), return_exec(), sendmail(), session_do(), set_config(), sip_show_domains(), sip_show_tcp(), sip_tcp_locate(), skinny_register(), socket_process(), socket_read(), start_network_thread(), timezone_add(), timezone_destroy_list(), timing_read(), try_calling(), unload_module(), unload_pgsql(), unlock_read(), unregister_request(), unregister_translators(), vmaccounts_destroy_list(), vmu_tm(), and vnak_retransmit().
#define AST_RWLIST_APPEND_LIST AST_LIST_APPEND_LIST |
Definition at line 779 of file linkedlists.h.
#define AST_RWLIST_EMPTY AST_LIST_EMPTY |
Definition at line 451 of file linkedlists.h.
Referenced by add_redirect(), ast_http_uri_link(), ast_log(), handle_cli_status(), handle_feature_show(), handle_show_applications(), handle_show_hint(), handle_show_hints(), handle_show_http(), handle_show_switches(), handle_showmanagers(), handle_verbose(), logger_print_normal(), reload(), and unload_module().
#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 add_redirect(), ast_app_group_list_head(), ast_http_uri_link(), ast_speech_unregister(), and ast_walk_indications().
Value:
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. |
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 | ) |
Value:
{ \ (head)->first = NULL; \ (head)->last = NULL; \ ast_rwlock_destroy(&(head)->lock); \ }
head | This is a pointer to the list head structure |
Definition at line 651 of file linkedlists.h.
Referenced by destroy_table_cache(), and free_table().
#define AST_RWLIST_HEAD_INIT | ( | head | ) |
Value:
{ \ (head)->first = NULL; \ (head)->last = NULL; \ ast_rwlock_init(&(head)->lock); \ }
head | This is a pointer to the list head structure |
Definition at line 623 of file linkedlists.h.
Referenced by ast_odbc_find_table().
#define AST_RWLIST_HEAD_INIT_VALUE |
Value:
{ \ .first = NULL, \ .last = NULL, \ .lock = AST_RWLOCK_INIT_VALUE, \ }
Definition at line 242 of file linkedlists.h.
#define AST_RWLIST_HEAD_SET | ( | head, | |||
entry | ) |
Value:
do { \ (head)->first = (entry); \ (head)->last = (entry); \ ast_rwlock_init(&(head)->lock); \ } while (0)
head | This is a pointer to the list head structure | |
entry | pointer to the list entry that will become the head of the list |
Definition at line 373 of file linkedlists.h.
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. |
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 316 of file linkedlists.h.
#define AST_RWLIST_INSERT_AFTER AST_LIST_INSERT_AFTER |
Definition at line 686 of file linkedlists.h.
Referenced by add_redirect(), ast_http_uri_link(), and ast_manager_register_struct().
#define AST_RWLIST_INSERT_BEFORE_CURRENT AST_LIST_INSERT_BEFORE_CURRENT |
Definition at line 594 of file linkedlists.h.
Referenced by __ast_cli_register(), __ast_custom_function_register(), __ast_register_translator(), and ast_register_application2().
#define AST_RWLIST_INSERT_HEAD AST_LIST_INSERT_HEAD |
Definition at line 702 of file linkedlists.h.
Referenced by __ast_format_register(), __ast_register_translator(), add_redirect(), ast_add_hint_nolock(), ast_cdr_register(), ast_channel_alloc(), ast_devstate_prov_add(), ast_dnsmgr_get(), ast_http_uri_link(), ast_image_register(), ast_manager_register_struct(), ast_register_atexit(), ast_register_feature(), ast_register_file_version(), ast_register_thread(), ast_register_verbose(), ast_rtp_proto_register(), ast_speech_register(), init_logger_chain(), load_module(), reload(), and reload_followme().
#define AST_RWLIST_INSERT_SORTALPHA AST_LIST_INSERT_SORTALPHA |
Definition at line 755 of file linkedlists.h.
#define AST_RWLIST_INSERT_TAIL AST_LIST_INSERT_TAIL |
Definition at line 725 of file linkedlists.h.
Referenced by __ast_cli_register(), __ast_custom_function_register(), add_redirect(), ast_app_group_set_channel(), ast_http_uri_link(), ast_manager_register_hook(), ast_odbc_find_table(), ast_register_application2(), ast_register_indication_country(), ast_register_switch(), ast_udptl_proto_register(), config_function_read(), config_module(), handle_subscribe(), handle_verbose(), and try_load_key().
#define AST_RWLIST_LAST AST_LIST_LAST |
Definition at line 430 of file linkedlists.h.
#define AST_RWLIST_MOVE_CURRENT AST_LIST_MOVE_CURRENT |
Definition at line 572 of file linkedlists.h.
#define AST_RWLIST_NEXT AST_LIST_NEXT |
Definition at line 440 of file linkedlists.h.
Referenced by add_redirect(), ast_http_uri_link(), ast_walk_indications(), and channel_find_locked().
#define AST_RWLIST_RDLOCK | ( | head | ) | ast_rwlock_rdlock(&(head)->lock) |
Read locks a list.
head | This is a pointer to the list head structure |
0 | on success | |
non-zero | on failure |
Definition at line 77 of file linkedlists.h.
Referenced by __ast_cli_generator(), __ast_key_get(), __manager_event(), acf_odbc_read(), acf_odbc_write(), app_exec(), ast_active_channels(), ast_app_group_get_count(), ast_app_group_list_rdlock(), ast_app_group_match_get_count(), ast_begin_shutdown(), ast_cli_command(), ast_custom_function_find(), ast_debug_get_by_file(), ast_filehelper(), ast_get_channel_tech(), ast_get_indication_tone(), ast_get_indication_zone(), ast_odbc_find_table(), ast_queue_log(), ast_read_image(), ast_readfile(), ast_request(), ast_run_atexits(), ast_translate_available_formats(), ast_translate_path_steps(), ast_translator_best_choice(), ast_translator_build_path(), ast_verbose_get_by_file(), ast_walk_indications(), ast_writefile(), channel_find_locked(), complete_core_show_hint(), config_function_read(), destroy_station(), feature_interpret_helper(), find_best(), find_command(), find_engine(), find_table(), get_proto(), getproviderstate(), handle_cli_core_show_channeltype(), handle_cli_core_show_channeltypes(), handle_cli_core_show_file_formats(), handle_cli_core_show_translation(), handle_cli_keys_show(), handle_cli_sqlite_show_tables(), handle_cli_status(), handle_core_show_image_formats(), handle_feature_show(), handle_help(), handle_logger_show_channels(), handle_show_application(), handle_show_applications(), handle_show_function(), handle_show_functions(), handle_show_hint(), handle_show_hints(), handle_show_http(), handle_show_switches(), handle_show_threads(), handle_show_version_files(), handle_showmanager(), handle_showmanagers(), handle_showmancmd(), handle_showmancmds(), handle_statechange(), handle_uri(), help1(), help_workhorse(), logger_print_normal(), logger_print_verbose(), manager_displayconnects(), odbc_log(), pbx_findapp(), pbx_findswitch(), pgsql_log(), poll_subscribed_mailboxes(), post_cdr(), process_message(), refresh_list(), set_config_flags(), sla_add_trunk_to_station(), sla_check_reload(), sla_queue_event_conf(), sla_show_stations(), sla_show_trunks(), sla_state(), sla_station_exec(), sla_trunk_exec(), and write_htmldump().
#define AST_RWLIST_REMOVE AST_LIST_REMOVE |
Definition at line 833 of file linkedlists.h.
Referenced by __ast_cli_unregister(), ast_channel_free(), ast_custom_function_unregister(), ast_dnsmgr_release(), ast_http_uri_unlink(), ast_image_unregister(), ast_manager_unregister_hook(), ast_rtp_proto_unregister(), ast_udptl_proto_unregister(), ast_unregister_feature(), ast_unregister_switch(), and handle_verbose().
#define AST_RWLIST_REMOVE_CURRENT AST_LIST_REMOVE_CURRENT |
Definition at line 564 of file linkedlists.h.
Referenced by ast_agi_unregister(), ast_app_group_discard(), ast_app_group_set_channel(), ast_app_group_update(), ast_cdr_unregister(), ast_devstate_prov_del(), ast_format_unregister(), ast_http_uri_unlink_all_with_key(), ast_manager_unregister(), ast_register_indication_country(), ast_remove_hint(), ast_speech_unregister(), ast_unregister_application(), ast_unregister_atexit(), ast_unregister_file_version(), ast_unregister_indication_country(), ast_unregister_thread(), ast_unregister_translator(), ast_unregister_verbose(), crypto_load(), and realtime_unload_handler().
#define AST_RWLIST_REMOVE_HEAD AST_LIST_REMOVE_HEAD |
Definition at line 801 of file linkedlists.h.
Referenced by __ast_http_load(), ast_unregister_features(), destroy_table_cache(), free_config(), free_table(), handle_verbose(), init_logger_chain(), reload(), sla_destroy(), unload_config(), and unload_module().
#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 |
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 |
0 | on success | |
non-zero | on failure |
Definition at line 66 of file linkedlists.h.
Referenced by ast_manager_register_struct(), and ast_manager_unregister().
#define AST_RWLIST_TRAVERSE AST_LIST_TRAVERSE |
Definition at line 493 of file linkedlists.h.
Referenced by __ast_custom_function_register(), __ast_format_register(), __ast_key_get(), __manager_event(), acf_odbc_read(), acf_odbc_write(), action_listcommands(), add_redirect(), app_exec(), ast_active_channels(), ast_add_hint_nolock(), ast_app_group_get_count(), ast_app_group_match_get_count(), ast_begin_shutdown(), ast_cdr_register(), ast_change_hint(), ast_custom_function_find(), ast_extension_state_add(), ast_extension_state_del(), ast_filehelper(), ast_get_indication_zone(), ast_http_uri_link(), ast_manager_register_struct(), ast_merge_contexts_and_delete(), ast_odbc_find_column(), ast_odbc_find_table(), ast_read_image(), ast_readfile(), ast_register_application2(), ast_register_switch(), ast_rtp_proto_register(), ast_run_atexits(), ast_udptl_proto_register(), ast_walk_indications(), ast_writefile(), cdr_handler(), channel_find_locked(), close_logger(), complete_core_show_hint(), config_function_read(), crypto_load(), find_command(), find_dynamic_feature(), find_engine(), find_table(), find_table_cb(), get_manager_by_name_locked(), get_proto(), getproviderstate(), handle_cli_core_show_file_formats(), handle_cli_keys_show(), handle_cli_sqlite_show_tables(), handle_cli_status(), handle_core_show_image_formats(), handle_feature_show(), handle_logger_show_channels(), handle_show_application(), handle_show_applications(), handle_show_function(), handle_show_functions(), handle_show_hint(), handle_show_hints(), handle_show_http(), handle_show_switches(), handle_show_threads(), handle_show_version_files(), handle_showmanager(), handle_showmanagers(), handle_showmancmd(), handle_showmancmds(), handle_statechange(), handle_uri(), help_workhorse(), logger_print_normal(), logger_print_verbose(), pbx_findapp(), pbx_findswitch(), pgsql_log(), poll_subscribed_mailboxes(), post_cdr(), process_message(), realtime_require_handler(), rebuild_matrix(), refresh_list(), reload_followme(), reload_logger(), require_odbc(), sla_add_trunk_to_station(), sla_check_reload(), sla_find_station(), sla_find_trunk(), sla_queue_event_conf(), sla_show_stations(), sla_show_trunks(), try_load_key(), and write_htmldump().
#define AST_RWLIST_TRAVERSE_SAFE_BEGIN AST_LIST_TRAVERSE_SAFE_BEGIN |
Definition at line 541 of file linkedlists.h.
Referenced by __ast_cli_register(), __ast_custom_function_register(), __ast_register_translator(), ast_agi_unregister(), ast_app_group_discard(), ast_app_group_set_channel(), ast_app_group_update(), ast_cdr_unregister(), ast_devstate_prov_del(), ast_file_version_find(), ast_format_unregister(), ast_http_uri_unlink_all_with_key(), ast_manager_unregister(), ast_odbc_clear_cache(), ast_register_application2(), ast_register_indication_country(), ast_remove_hint(), ast_speech_unregister(), ast_unregister_application(), ast_unregister_atexit(), ast_unregister_file_version(), ast_unregister_indication_country(), ast_unregister_thread(), ast_unregister_translator(), ast_unregister_verbose(), crypto_load(), handle_cli_keys_init(), handle_unsubscribe(), and realtime_unload_handler().
#define AST_RWLIST_TRAVERSE_SAFE_END AST_LIST_TRAVERSE_SAFE_END |
Definition at line 601 of file linkedlists.h.
Referenced by __ast_cli_register(), __ast_custom_function_register(), __ast_register_translator(), ast_agi_unregister(), ast_app_group_discard(), ast_app_group_set_channel(), ast_app_group_update(), ast_cdr_unregister(), ast_devstate_prov_del(), ast_file_version_find(), ast_format_unregister(), ast_http_uri_unlink_all_with_key(), ast_manager_unregister(), ast_odbc_clear_cache(), ast_register_application2(), ast_register_indication_country(), ast_remove_hint(), ast_speech_unregister(), ast_unregister_application(), ast_unregister_atexit(), ast_unregister_file_version(), ast_unregister_indication_country(), ast_unregister_thread(), ast_unregister_translator(), ast_unregister_verbose(), crypto_load(), handle_cli_keys_init(), handle_unsubscribe(), and realtime_unload_handler().
#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 |
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 |
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 |
Definition at line 150 of file linkedlists.h.
Referenced by __ast_cli_generator(), __ast_cli_register(), __ast_cli_unregister(), __ast_custom_function_register(), __ast_format_register(), __ast_http_load(), __ast_key_get(), __ast_register_translator(), __manager_event(), acf_odbc_read(), acf_odbc_write(), add_redirect(), app_exec(), ast_active_channels(), ast_add_hint(), ast_agi_register(), ast_agi_unregister(), ast_app_group_discard(), ast_app_group_get_count(), ast_app_group_list_unlock(), ast_app_group_match_get_count(), ast_app_group_set_channel(), ast_app_group_update(), ast_begin_shutdown(), ast_cdr_register(), ast_cdr_unregister(), ast_change_hint(), ast_channel_alloc(), ast_channel_free(), ast_channel_register(), ast_channel_unregister(), ast_cli_command(), ast_custom_function_find(), ast_custom_function_unregister(), ast_debug_get_by_file(), ast_devstate_prov_add(), ast_devstate_prov_del(), ast_dnsmgr_get(), ast_dnsmgr_release(), ast_extension_state_add(), ast_extension_state_del(), ast_file_version_find(), ast_filehelper(), ast_format_unregister(), ast_get_channel_tech(), ast_get_indication_tone(), ast_get_indication_zone(), ast_http_uri_link(), ast_http_uri_unlink(), ast_http_uri_unlink_all_with_key(), ast_image_register(), ast_image_unregister(), ast_manager_register_hook(), ast_manager_register_struct(), ast_manager_unregister(), ast_manager_unregister_hook(), ast_merge_contexts_and_delete(), ast_odbc_clear_cache(), ast_odbc_find_table(), ast_queue_log(), ast_read_image(), ast_readfile(), ast_register_application2(), ast_register_atexit(), ast_register_feature(), ast_register_file_version(), ast_register_indication(), ast_register_indication_country(), ast_register_switch(), ast_register_thread(), ast_register_verbose(), ast_request(), ast_rtp_proto_register(), ast_rtp_proto_unregister(), ast_run_atexits(), ast_set_indication_country(), ast_speech_register(), ast_speech_unregister(), ast_translate_available_formats(), ast_translate_path_steps(), ast_translator_activate(), ast_translator_best_choice(), ast_translator_build_path(), ast_translator_deactivate(), ast_udptl_proto_register(), ast_udptl_proto_unregister(), ast_unregister_application(), ast_unregister_atexit(), ast_unregister_feature(), ast_unregister_features(), ast_unregister_file_version(), ast_unregister_groups(), ast_unregister_indication(), ast_unregister_indication_country(), ast_unregister_switch(), ast_unregister_thread(), ast_unregister_translator(), ast_unregister_verbose(), ast_verbose_get_by_file(), ast_walk_indications(), ast_writefile(), authenticate(), channel_find_locked(), close_logger(), complete_core_show_hint(), config_function_read(), crypto_load(), destroy_station(), destroy_table_cache(), feature_interpret_helper(), find_best(), find_command(), find_engine(), find_table(), free_table(), get_proto(), getproviderstate(), handle_cli_core_show_channeltype(), handle_cli_core_show_channeltypes(), handle_cli_core_show_file_formats(), handle_cli_core_show_translation(), handle_cli_keys_init(), handle_cli_keys_show(), handle_cli_sqlite_show_tables(), handle_cli_status(), handle_core_show_image_formats(), handle_feature_show(), handle_help(), handle_logger_show_channels(), handle_show_application(), handle_show_applications(), handle_show_function(), handle_show_functions(), handle_show_hint(), handle_show_hints(), handle_show_http(), handle_show_switches(), handle_show_threads(), handle_show_version_files(), handle_showmanager(), handle_showmanagers(), handle_showmancmd(), handle_showmancmds(), handle_statechange(), handle_subscribe(), handle_unsubscribe(), handle_uri(), handle_verbose(), help1(), help_workhorse(), init_logger_chain(), load_module(), logger_print_normal(), logger_print_verbose(), manager_displayconnects(), odbc_log(), pbx_findapp(), pbx_findswitch(), pgsql_log(), poll_subscribed_mailboxes(), post_cdr(), process_message(), realtime_require_handler(), realtime_unload_handler(), refresh_list(), reload(), reload_followme(), reload_logger(), require_odbc(), set_config_flags(), sla_add_trunk_to_station(), sla_check_reload(), sla_destroy(), sla_queue_event_conf(), sla_show_stations(), sla_show_trunks(), sla_state(), sla_station_exec(), sla_trunk_exec(), unload_config(), unload_module(), and write_htmldump().
#define AST_RWLIST_WRLOCK | ( | head | ) | ast_rwlock_wrlock(&(head)->lock) |
Write locks a list.
head | This is a pointer to the list head structure |
0 | on success | |
non-zero | on failure |
Definition at line 51 of file linkedlists.h.
Referenced by __ast_cli_register(), __ast_cli_unregister(), __ast_custom_function_register(), __ast_format_register(), __ast_http_load(), __ast_register_translator(), add_redirect(), ast_add_hint(), ast_agi_register(), ast_agi_unregister(), ast_app_group_discard(), ast_app_group_list_wrlock(), ast_app_group_set_channel(), ast_app_group_update(), ast_cdr_register(), ast_cdr_unregister(), ast_change_hint(), ast_channel_alloc(), ast_channel_free(), ast_channel_register(), ast_channel_unregister(), ast_custom_function_unregister(), ast_devstate_prov_add(), ast_devstate_prov_del(), ast_dnsmgr_get(), ast_dnsmgr_release(), ast_extension_state_add(), ast_extension_state_del(), ast_file_version_find(), ast_format_unregister(), ast_http_uri_link(), ast_http_uri_unlink(), ast_http_uri_unlink_all_with_key(), ast_image_register(), ast_image_unregister(), ast_manager_register_hook(), ast_manager_unregister_hook(), ast_merge_contexts_and_delete(), ast_odbc_clear_cache(), ast_register_application2(), ast_register_atexit(), ast_register_feature(), ast_register_file_version(), ast_register_indication(), ast_register_indication_country(), ast_register_switch(), ast_register_thread(), ast_register_verbose(), ast_rtp_proto_register(), ast_rtp_proto_unregister(), ast_set_indication_country(), ast_speech_register(), ast_speech_unregister(), ast_translator_activate(), ast_translator_deactivate(), ast_udptl_proto_register(), ast_udptl_proto_unregister(), ast_unregister_application(), ast_unregister_atexit(), ast_unregister_feature(), ast_unregister_features(), ast_unregister_file_version(), ast_unregister_groups(), ast_unregister_indication(), ast_unregister_indication_country(), ast_unregister_switch(), ast_unregister_thread(), ast_unregister_translator(), ast_unregister_verbose(), authenticate(), close_logger(), config_function_read(), crypto_load(), destroy_table_cache(), find_table(), free_table(), handle_cli_core_show_translation(), handle_cli_keys_init(), handle_subscribe(), handle_unsubscribe(), handle_verbose(), init_logger_chain(), load_module(), realtime_unload_handler(), reload(), reload_followme(), reload_logger(), sla_add_trunk_to_station(), sla_destroy(), unload_config(), and unload_module().