#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_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_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, tv) ast_rwlock_timedrdlock(&(head)->lock, tv) |
Read locks a list, with timeout. | |
#define | AST_RWLIST_TIMEDWRLOCK(head, tv) ast_rwlock_timedwrlock(&(head)->lock, tv) |
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 732 of file linkedlists.h.
Referenced by __ast_queue_frame(), announce_thread(), ast_do_masquerade(), 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 445 of file linkedlists.h.
Referenced by __ast_context_destroy(), __ast_read(), ack_trans(), action_meetmelist(), announce_thread(), ast_autoservice_start(), ast_dial_option_disable(), ast_dial_option_enable(), ast_dial_run(), ast_event_check_subscriber(), ast_event_get_cached(), ast_event_queue_and_cache(), ast_sched_runq(), ast_sched_wait(), 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(), features_show(), 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_show_http(), handle_voicemail_show_users(), handle_voicemail_show_zones(), locals_show(), logger_thread(), manager_list_voicemail_users(), meetme_cmd(), moh_class_inuse(), monmp3thread(), register_verify(), reload(), sip_show_domains(), sip_show_settings(), sla_check_reload(), sla_load_config(), sla_thread(), unload_module(), 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 405 of file linkedlists.h.
Referenced by ast_event_get_cached(), and ast_event_queue_and_cache().
#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 416 of file linkedlists.h.
Referenced by __ast_queue_frame(), __ast_read(), abort_request(), ast_add_extension2_lockopt(), ast_dial_answered(), ast_dial_answered_steal(), ast_dial_join(), ast_do_masquerade(), ast_get_indication_tone(), ast_get_indication_zone(), ast_sched_runq(), ast_sched_wait(), ast_walk_context_switches(), cli_next(), clone_variables(), do_devstate_changes(), gen_readframe(), join_queue(), local_read(), local_write(), logger_thread(), process_precache(), process_weights(), purge_events(), and reschedule_precache().
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 168 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 632 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 605 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 660 of file linkedlists.h.
Referenced by __ast_answer(), __ast_channel_alloc_ap(), __ast_queue_frame(), alloc_profile(), announce_thread(), app_exec(), ast_audiohook_attach(), build_profile(), conf_run(), do_devstate_changes(), dundi_lookup_local(), findmeexec(), free_numbers(), gosub_allocate_frame(), load_module(), load_modules(), logger_thread(), loopback_subst(), new_iax(), and sip_alloc().
#define AST_LIST_HEAD_INIT_VALUE |
Value:
{ \ .first = NULL, \ .last = NULL, \ .lock = AST_MUTEX_INIT_VALUE, \ }
Definition at line 229 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 220 of file linkedlists.h.
Referenced by __ast_answer(), __ast_queue_frame(), announce_thread(), and ast_do_masquerade().
#define AST_LIST_HEAD_NOLOCK_INIT_VALUE |
Value:
{ \ .first = NULL, \ .last = NULL, \ }
Definition at line 247 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 341 of file linkedlists.h.
Referenced by ast_event_check_subscriber(), ast_event_get_cached(), ast_event_new(), ast_event_queue_and_cache(), 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 355 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 383 of file linkedlists.h.
Referenced by 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 286 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 674 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 578 of file linkedlists.h.
Referenced by defer_full_frame(), insert_penaltychange(), schedule(), 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 690 of file linkedlists.h.
Referenced by __ast_answer(), __ast_module_user_add(), __frame_free(), ack_trans(), add_to_interfaces(), aji_handle_message(), append_transaction(), ast_autoservice_start(), ast_cdr_copy_vars(), ast_cdr_setvar(), ast_channel_datastore_add(), ast_channel_register(), ast_loader_register(), ast_merge_contexts_and_delete(), ast_module_shutdown(), ast_odbc_request_obj(), autoservice_run(), build_conf(), build_mapping(), build_peer(), create_transaction(), deep_copy_peer(), dundi_lookup_local(), dundi_send(), features_alloc(), 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(), load_module(), local_alloc(), loopback_subst(), mohalloc(), odbc_register_class(), parse_config(), pbx_builtin_pushvar_helper(), pbx_builtin_setvar_helper(), queue_ringing_trunk(), register_group(), register_group_feature(), register_request(), register_translator(), reload(), reschedule_precache(), sched_release(), session_do(), shared_write(), sla_ring_station(), and unload_module().
#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. |
Definition at line 761 of file linkedlists.h.
Referenced by __ast_queue_frame().
#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 710 of file linkedlists.h.
Referenced by __ast_queue_frame(), _sip_tcp_helper_thread(), acf_iaxvar_write(), add_agent(), add_agi_cmd(), add_peer_mailboxes(), add_sip_domain(), add_to_load_order(), ao2_link(), 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_dup_and_cache(), ast_event_get_cached(), ast_event_new(), ast_event_queue(), ast_event_queue_and_cache(), ast_event_subscribe(), ast_iax2_new(), ast_lock_path_flock(), ast_log(), ast_module_register(), ast_odbc_request_obj(), ast_slinfactory_feed(), ast_tzset(), ast_verbose(), authenticate_reply(), build_profile(), build_user(), clone_variables(), conf_run(), config_cache_attribute(), config_text_file_load(), copy_rules(), create_vmaccount(), defer_full_frame(), dial_exec_full(), dialed_interface_duplicate(), dummy_start(), eivr_comm(), find_cache(), find_or_create(), find_tpeer(), findmeexec(), gen_readframe(), get_lock(), gmtsub(), iax2_dup_variable_datastore(), iax2_transmit(), inherit_category(), insert_idle_thread(), insert_penaltychange(), load_config(), load_values_config(), local_call(), message_template_build(), park_space_reserve(), phoneprov_callback(), queue_reload_request(), queue_request(), reload_followme(), reload_queue_rules(), schedule(), search_directory(), 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(), statechange_queue(), 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 424 of file linkedlists.h.
Referenced by __ast_queue_frame(), __ast_read(), 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(), __attempt_transmit(), __manager_event(), __unload_module(), _sip_tcp_helper_thread(), abort_request(), acf_fetch(), acf_iaxvar_read(), acf_iaxvar_write(), acf_odbc_read(), acf_odbc_write(), 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_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_odbc_request_obj(), ast_process_pending_reloads(), ast_tzset(), ast_unload_resource(), ast_unlock_path_flock(), ast_update_use_count(), ast_verbose(), 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_users(), destroy_session(), dial_exec_full(), dialed_interface_destroy(), dialed_interface_duplicate(), discover_transactions(), dispose_conf(), do_devstate_changes(), do_parking_thread(), 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(), features_alloc(), features_hangup(), features_show(), find_account(), find_cache(), find_conf(), find_conf_realtime(), find_dial_channel(), find_idle_thread(), find_relative_dial_channel(), find_resource(), find_session(), find_tpeer(), find_user(), free_vm_users(), free_vm_zones(), function_agent(), gen_readframe(), get_agi_cmd(), get_lock(), gmtsub(), gosub_exec(), gosub_free(), grab_last(), 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_odbc_show(), handle_command_response(), handle_frame(), handle_frame_ownerless(), handle_minivm_list_templates(), handle_minivm_show_users(), handle_minivm_show_zones(), handle_parkedcalls(), handle_queue_rule_show(), handle_showmanconn(), handle_showmaneventq(), 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(), 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(), odbc_register_class(), optimize_transactions(), park_exec(), park_space_reserve(), play_message_datetime(), pop_exec(), precache_transactions(), process_precache(), prune_mappings(), prune_peers(), purge_events(), purge_sessions(), pvt_destructor(), query_transactions(), queue_reload_request(), 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(), socket_process(), socket_read(), start_network_thread(), timezone_add(), timezone_destroy_list(), timing_read(), try_calling(), unload_module(), 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 561 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 434 of file linkedlists.h.
Referenced by __ast_queue_frame(), __ast_read(), ao2_iterator_next(), append_event(), ast_frame_free(), ast_slinfactory_feed(), ast_speech_results_free(), ast_walk_context_switches(), ast_write(), ast_writestream(), cli_next(), conf_run(), 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_speechrecognize(), logger_thread(), mixmonitor_thread(), peer_mailboxes_to_str(), purge_events(), reschedule_precache(), speech_read(), spy_generate(), 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 803 of file linkedlists.h.
Referenced by __ast_module_user_remove(), __attempt_transmit(), agent_hangup(), ast_audiohook_remove(), ast_autoservice_start(), ast_channel_datastore_remove(), ast_event_unsubscribe(), conf_free(), conf_run(), destroy_packet(), destroy_session(), features_hangup(), handle_frame(), handle_frame_ownerless(), iax2_process_thread(), local_hangup(), local_request(), moh_release(), pbx_builtin_setvar_helper(), shared_write(), 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 548 of file linkedlists.h.
Referenced by __ast_context_destroy(), __ast_read(), acf_iaxvar_write(), aji_handle_message(), ao2_callback(), ast_autoservice_stop(), ast_cdr_setvar(), ast_channel_unregister(), ast_context_remove_switch2(), ast_dial_destroy(), ast_event_queue_and_cache(), ast_frdup(), ast_loader_unregister(), ast_module_unregister(), ast_sched_del(), ast_unlock_path_flock(), audio_audiohook_write_list(), clearvar_prefix(), complete_dpreply(), do_parking_thread(), drop_translator(), dtmf_audiohook_write_list(), find_cache(), forward_message(), func_inheritance_write(), iax_frame_new(), iax_provision_free_templates(), mwi_unsub_event_cb(), network_thread(), park_exec(), 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(), and timing_read().
#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 782 of file linkedlists.h.
Referenced by __ast_answer(), __ast_internal_context_destroy(), __ast_module_user_hangup_all(), __ast_queue_frame(), __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_dispatcher(), ast_event_sub_destroy(), ast_frame_header_new(), ast_get_srv(), ast_merge_contexts_and_delete(), ast_module_shutdown(), ast_process_pending_reloads(), ast_sched_runq(), 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(), delete_user(), delete_users(), destroy_all_mailbox_mappings(), destroy_packets(), destroy_permissions(), destroy_station(), destroy_trunk(), device_state_thread(), dialed_interface_destroy(), do_directory(), dundi_lookup_local(), eivr_comm(), find_idle_thread(), findmeexec(), forward_message(), frame_cache_cleanup(), free_config(), free_numbers(), 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(), queue_reload_request(), reload(), reload_queue_rules(), return_exec(), sched_alloc(), sched_context_destroy(), shared_variable_free(), sla_stop_ringing_trunk(), sla_thread(), table_configs_free(), timezone_destroy_list(), unload_module(), unregister_translators(), 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 485 of file linkedlists.h.
Referenced by __ast_queue_frame(), __manager_event(), acf_iaxvar_read(), acf_odbc_read(), acf_odbc_write(), ack_trans(), action_agents(), action_meetmelist(), add_agent(), add_peer_mwi_subs(), add_to_interfaces(), add_to_load_order(), admin_exec(), agent_devicestate(), agent_logoff(), agent_request(), agentmonitoroutgoing_exec(), agents_show(), agents_show_online(), ao2_iterator_next(), 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_event_check_subscriber(), ast_event_dispatcher(), ast_event_get_cached(), ast_event_new(), ast_event_queue_and_cache(), ast_event_report_subs(), ast_event_subscribe(), ast_get_channel_tech(), ast_module_helper(), ast_module_reload(), ast_odbc_request_obj(), ast_request(), ast_sched_dump(), ast_sched_when(), 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_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(), dump_agents(), 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(), features_alloc(), features_show(), find_account(), find_agent(), find_audiohook_by_source(), find_conf(), find_conf_realtime(), find_debug_file(), find_dial_channel(), find_group(), find_or_create(), find_peer(), find_relative_dial_channel(), find_resource(), find_session(), find_tpeer(), find_transaction(), find_user(), findmeexec(), frame_set_var(), get_cached_mwi(), get_lock(), get_trans_id(), gmtsub(), 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_odbc_show(), handle_minivm_list_templates(), handle_minivm_show_users(), handle_minivm_show_zones(), handle_parkedcalls(), handle_queue_rule_show(), handle_show_globals(), handle_show_http(), handle_showmanconn(), handle_showmaneventq(), 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(), play_message_datetime(), precache_transactions(), process_weights(), pvt_destructor(), query_transactions(), queue_reload_request(), read_agent_config(), register_request(), reload(), reload_agents(), reload_config(), reload_firmware(), reload_followme(), reset_user_pw(), sendmail(), shared_read(), shared_write(), sip_call(), sip_dump_history(), sip_show_domains(), sip_show_history(), sip_show_tcp(), sip_tcp_locate(), 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(), 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 523 of file linkedlists.h.
Referenced by __ast_context_destroy(), __ast_read(), acf_iaxvar_write(), aji_handle_message(), ao2_callback(), 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_do_masquerade(), ast_frdup(), ast_loader_unregister(), ast_module_unregister(), ast_sched_del(), ast_unlock_path_flock(), audio_audiohook_write_list(), cdr_merge_vars(), clearvar_prefix(), complete_dpreply(), defer_full_frame(), do_parking_thread(), 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(), precache_transactions(), process_weights(), prune_mappings(), prune_peers(), purge_sessions(), read_agent_config(), reload_firmware(), remove_from_interfaces(), reschedule_precache(), schedule(), 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(), and unload_module().
#define AST_LIST_TRAVERSE_SAFE_END } |
Closes a safe loop traversal block.
Definition at line 594 of file linkedlists.h.
Referenced by __ast_context_destroy(), __ast_read(), acf_iaxvar_write(), aji_handle_message(), ao2_callback(), 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_do_masquerade(), ast_frdup(), ast_loader_unregister(), ast_module_unregister(), ast_sched_del(), ast_unlock_path_flock(), audio_audiohook_write_list(), cdr_merge_vars(), clearvar_prefix(), complete_dpreply(), defer_full_frame(), do_parking_thread(), 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(), precache_transactions(), process_weights(), prune_mappings(), prune_peers(), purge_sessions(), read_agent_config(), reload_firmware(), remove_from_interfaces(), reschedule_precache(), schedule(), 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(), and unload_module().
#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 100 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 135 of file linkedlists.h.
Referenced by __ast_module_user_add(), __ast_module_user_hangup_all(), __ast_module_user_remove(), __attempt_transmit(), __manager_event(), __unload_module(), _sip_tcp_helper_thread(), abort_request(), acf_fetch(), acf_iaxvar_read(), acf_iaxvar_write(), acf_odbc_read(), acf_odbc_write(), 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_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_odbc_request_obj(), ast_process_pending_reloads(), ast_tzset(), ast_unload_resource(), ast_unlock_path_flock(), ast_update_module_list(), ast_update_use_count(), ast_verbose(), 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_users(), destroy_session(), dial_exec_full(), dialed_interface_destroy(), dialed_interface_duplicate(), discover_transactions(), dispose_conf(), do_devstate_changes(), do_parking_thread(), 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(), features_alloc(), features_hangup(), features_show(), find_account(), find_cache(), find_conf(), find_conf_realtime(), find_dial_channel(), find_idle_thread(), find_relative_dial_channel(), find_resource(), find_session(), find_tpeer(), find_user(), free_vm_users(), free_vm_zones(), function_agent(), gen_readframe(), get_agi_cmd(), get_lock(), gmtsub(), gosub_exec(), gosub_free(), grab_last(), handle_call_forward(), handle_cli_iax2_show_firmware(), handle_cli_iax2_show_registry(), handle_cli_iax2_show_stats(), handle_cli_iax2_show_threads(), handle_cli_odbc_show(), handle_command_response(), handle_frame(), handle_frame_ownerless(), handle_minivm_list_templates(), handle_minivm_show_users(), handle_minivm_show_zones(), handle_parkedcalls(), handle_queue_rule_show(), handle_showmanconn(), handle_showmaneventq(), 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(), odbc_register_class(), park_exec(), park_space_reserve(), play_message_datetime(), pop_exec(), precache_transactions(), process_precache(), prune_mappings(), prune_peers(), purge_events(), purge_sessions(), pvt_destructor(), query_transactions(), queue_reload_request(), 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(), socket_process(), socket_read(), start_network_thread(), timezone_add(), timezone_destroy_list(), timing_read(), try_calling(), unload_module(), 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 747 of file linkedlists.h.
#define AST_RWLIST_EMPTY AST_LIST_EMPTY |
Definition at line 447 of file linkedlists.h.
Referenced by add_redirect(), ast_http_uri_link(), ast_log(), handle_feature_show(), handle_show_applications(), handle_show_hint(), handle_show_hints(), handle_show_http(), handle_show_switches(), handle_showmanagers(), handle_verbose(), and logger_print_normal().
#define AST_RWLIST_ENTRY AST_LIST_ENTRY |
Definition at line 410 of file linkedlists.h.
#define AST_RWLIST_FIRST AST_LIST_FIRST |
Definition at line 418 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 194 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 646 of file linkedlists.h.
#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 618 of file linkedlists.h.
Referenced by ast_event_init().
#define AST_RWLIST_HEAD_INIT_VALUE |
Value:
{ \ .first = NULL, \ .last = NULL, \ .lock = AST_RWLOCK_INIT_VALUE, \ }
Definition at line 238 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 369 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 312 of file linkedlists.h.
#define AST_RWLIST_INSERT_AFTER AST_LIST_INSERT_AFTER |
Definition at line 681 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 589 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 697 of file linkedlists.h.
Referenced by __ast_channel_alloc_ap(), __ast_format_register(), __ast_register_translator(), add_redirect(), ast_add_hint_nolock(), ast_cdr_register(), 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(), and reload_followme().
#define AST_RWLIST_INSERT_LIST_AFTER AST_LIST_INSERT_LIST_AFTER |
Definition at line 771 of file linkedlists.h.
#define AST_RWLIST_INSERT_TAIL AST_LIST_INSERT_TAIL |
Definition at line 720 of file linkedlists.h.
Referenced by __ast_cli_register(), __ast_custom_function_register(), add_redirect(), ast_app_group_set_channel(), ast_event_subscribe(), ast_http_uri_link(), ast_manager_register_hook(), ast_register_application2(), ast_register_indication_country(), ast_register_switch(), ast_udptl_proto_register(), config_module(), handle_verbose(), mwi_sub_event_cb(), and try_load_key().
#define AST_RWLIST_LAST AST_LIST_LAST |
Definition at line 426 of file linkedlists.h.
#define AST_RWLIST_MOVE_CURRENT AST_LIST_MOVE_CURRENT |
Definition at line 567 of file linkedlists.h.
#define AST_RWLIST_NEXT AST_LIST_NEXT |
Definition at line 436 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 75 of file linkedlists.h.
Referenced by __ast_cli_generator(), __ast_key_get(), __manager_event(), 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_event_check_subscriber(), ast_event_dispatcher(), ast_event_get_cached(), ast_event_report_subs(), ast_filehelper(), ast_get_channel_tech(), ast_get_indication_tone(), ast_get_indication_zone(), 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(), destroy_station(), feature_interpret_helper(), find_best(), find_command(), find_engine(), 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_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(), pp_each_user_exec(), 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 825 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 559 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_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(), and crypto_load().
#define AST_RWLIST_REMOVE_HEAD AST_LIST_REMOVE_HEAD |
Definition at line 793 of file linkedlists.h.
Referenced by __ast_http_load(), ast_unregister_features(), free_config(), handle_verbose(), init_logger_chain(), sla_destroy(), and unload_module().
Read locks a list, with timeout.
head | This is a pointer to the list head structure | |
tv | Pointer to a timeval structure |
0 | on success | |
non-zero | on failure |
Definition at line 88 of file linkedlists.h.
Write locks a list, with timeout.
head | This is a pointer to the list head structure | |
tv | Pointer to a timeval structure |
0 | on success | |
non-zero | on failure |
Definition at line 64 of file linkedlists.h.
Referenced by ast_manager_register_struct(), and ast_manager_unregister().
#define AST_RWLIST_TRAVERSE AST_LIST_TRAVERSE |
Definition at line 488 of file linkedlists.h.
Referenced by __ast_custom_function_register(), __ast_format_register(), __ast_key_get(), __manager_event(), 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_event_check_subscriber(), ast_event_dispatcher(), ast_event_report_subs(), ast_extension_state_del(), ast_filehelper(), ast_get_indication_zone(), ast_http_uri_link(), ast_manager_register_struct(), ast_merge_contexts_and_delete(), 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(), channel_find_locked(), close_logger(), complete_core_show_hint(), crypto_load(), find_command(), find_dynamic_feature(), find_engine(), get_manager_by_name_locked(), get_proto(), getproviderstate(), handle_cli_core_show_file_formats(), handle_cli_keys_show(), 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(), pp_each_user_exec(), process_message(), rebuild_matrix(), refresh_list(), reload_followme(), reload_logger(), 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 536 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_event_get_cached(), ast_event_queue_and_cache(), ast_file_version_find(), ast_format_unregister(), ast_manager_unregister(), 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(), and mwi_unsub_event_cb().
#define AST_RWLIST_TRAVERSE_SAFE_END AST_LIST_TRAVERSE_SAFE_END |
Definition at line 596 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_event_get_cached(), ast_event_queue_and_cache(), ast_file_version_find(), ast_format_unregister(), ast_manager_unregister(), 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(), and mwi_unsub_event_cb().
#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 124 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 112 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 146 of file linkedlists.h.
Referenced by __ast_channel_alloc_ap(), __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(), 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_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_event_check_subscriber(), ast_event_dispatcher(), ast_event_get_cached(), ast_event_queue_and_cache(), ast_event_report_subs(), ast_event_subscribe(), ast_event_unsubscribe(), 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_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_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(), crypto_load(), delete_users(), destroy_station(), feature_interpret_helper(), find_best(), find_command(), find_engine(), 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_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(), handle_verbose(), help1(), help_workhorse(), init_logger_chain(), load_module(), logger_print_normal(), logger_print_verbose(), manager_displayconnects(), mwi_sub_event_cb(), mwi_unsub_event_cb(), odbc_log(), pbx_findapp(), pbx_findswitch(), pgsql_log(), poll_subscribed_mailboxes(), post_cdr(), pp_each_user_exec(), process_message(), refresh_list(), reload(), reload_followme(), reload_logger(), 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_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_channel_alloc_ap(), __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_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_event_queue_and_cache(), ast_event_subscribe(), ast_event_unsubscribe(), ast_extension_state_add(), ast_extension_state_del(), ast_file_version_find(), ast_format_unregister(), ast_http_uri_link(), ast_http_uri_unlink(), ast_image_register(), ast_image_unregister(), ast_manager_register_hook(), ast_manager_unregister_hook(), ast_merge_contexts_and_delete(), 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(), crypto_load(), delete_users(), handle_cli_core_show_translation(), handle_cli_keys_init(), handle_verbose(), init_logger_chain(), load_module(), mwi_sub_event_cb(), mwi_unsub_event_cb(), reload(), reload_followme(), reload_logger(), sla_add_trunk_to_station(), sla_destroy(), and unload_module().