#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(head, elm, field) |
Inserts a list entry before the current entry during a traversal. | |
#define | AST_LIST_INSERT_HEAD(head, elm, field) |
Inserts a list entry at the head of a list. | |
#define | AST_LIST_INSERT_LIST_AFTER(head, list, elm, field) |
Inserts a whole list after a specific entry in a list. | |
#define | AST_LIST_INSERT_SORTALPHA(head, elm, field, sortfield) |
Inserts a list entry into a alphabetically sorted list. | |
#define | AST_LIST_INSERT_TAIL(head, elm, field) |
Appends a list entry to the tail of a list. | |
#define | AST_LIST_LAST(head) ((head)->last) |
Returns the last entry contained in a list. | |
#define | AST_LIST_LOCK(head) ast_mutex_lock(&(head)->lock) |
Locks a list. | |
#define | AST_LIST_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(head, field) |
Removes the current entry from a list during a traversal. | |
#define | AST_LIST_REMOVE_HEAD(head, field) |
Removes and returns the head entry from a list. | |
#define | AST_LIST_TRAVERSE(head, var, field) for((var) = (head)->first; (var); (var) = (var)->field.next) |
Loops over (traverses) the entries in a list. | |
#define | AST_LIST_TRAVERSE_SAFE_BEGIN(head, var, field) |
Loops safely over (traverses) the entries in a list. | |
#define | AST_LIST_TRAVERSE_SAFE_END } |
Closes a safe loop traversal block. | |
#define | AST_LIST_TRYLOCK(head) ast_mutex_trylock(&(head)->lock) |
Locks a list, without blocking if the list is locked. | |
#define | AST_LIST_UNLOCK(head) ast_mutex_unlock(&(head)->lock) |
Attempts to unlock a list. | |
#define | AST_RWLIST_APPEND_LIST AST_LIST_APPEND_LIST |
#define | AST_RWLIST_EMPTY AST_LIST_EMPTY |
#define | AST_RWLIST_ENTRY AST_LIST_ENTRY |
#define | AST_RWLIST_FIRST AST_LIST_FIRST |
#define | AST_RWLIST_HEAD(name, type) |
Defines a structure to be used to hold a read/write list of specified type. | |
#define | AST_RWLIST_HEAD_DESTROY(head) |
Destroys an rwlist head structure. | |
#define | AST_RWLIST_HEAD_INIT(head) |
Initializes an rwlist head structure. | |
#define | AST_RWLIST_HEAD_INIT_VALUE |
Defines initial values for a declaration of AST_RWLIST_HEAD. | |
#define | AST_RWLIST_HEAD_SET(head, entry) |
Initializes an rwlist head structure with a specified first entry. | |
#define | AST_RWLIST_HEAD_STATIC(name, type) |
Defines a structure to be used to hold a read/write list of specified type, statically initialized. | |
#define | AST_RWLIST_INSERT_AFTER AST_LIST_INSERT_AFTER |
#define | AST_RWLIST_INSERT_BEFORE_CURRENT AST_LIST_INSERT_BEFORE_CURRENT |
#define | AST_RWLIST_INSERT_HEAD AST_LIST_INSERT_HEAD |
#define | AST_RWLIST_INSERT_LIST_AFTER AST_LIST_INSERT_LIST_AFTER |
#define | AST_RWLIST_INSERT_SORTALPHA AST_LIST_INSERT_SORTALPHA |
#define | AST_RWLIST_INSERT_TAIL AST_LIST_INSERT_TAIL |
#define | AST_RWLIST_LAST AST_LIST_LAST |
#define | AST_RWLIST_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_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 the list together. |
Definition at line 723 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 |
Definition at line 413 of file linkedlists.h.
Referenced by __ast_read(), __queues_show(), ack_trans(), announce_thread(), app_exec(), ast_audiohook_write_list_empty(), ast_autoservice_start(), ast_dial_option_disable(), ast_dial_option_enable(), ast_dial_run(), ast_log(), ast_rtp_read(), ast_sched_runq(), ast_sched_wait(), audio_audiohook_write_list(), autoservice_run(), check_bridge(), check_extenstate_updates(), clear_extenstate_updates(), clearmarked_extenstate_updates(), complete_queue_remove_member(), config_text_file_save(), dundi_lookup_internal(), dundi_precache_internal(), dundi_query_eid_internal(), dundi_show_peer(), features_show(), findmeexec(), forward_message(), get_destination(), handle_request_refer(), handle_show_applications(), handle_show_applications_deprecated(), handle_show_switches(), handle_showmanagers(), handle_voicemail_show_users(), handle_voicemail_show_zones(), markall_extenstate_updates(), meetme_cmd(), moh_class_inuse(), monmp3thread(), odbc_unload_module(), register_verify(), reload(), shaun_of_the_dead(), sip_show_domains(), sip_show_settings(), sipsock_read(), sla_load_config(), sla_thread(), unmark_extenstate_update(), 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 374 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 385 of file linkedlists.h.
Referenced by __ast_queue_frame(), __ast_read(), abort_request(), ast_add_extension2(), ast_app_group_list_head(), ast_device_state_changed_literal(), ast_dial_answered(), ast_dial_join(), ast_do_masquerade(), ast_rtp_read(), ast_sched_runq(), ast_sched_wait(), ast_speech_unregister(), ast_walk_context_switches(), cli_next(), clone_variables(), gen_readframe(), process_precache(), process_weights(), 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 137 of file linkedlists.h.
Referenced by dialed_interface_destroy(), dialed_interface_duplicate(), and try_calling().
#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 594 of file linkedlists.h.
Referenced by __unload_module(), aji_client_destroy(), ast_module_shutdown(), ast_module_unregister(), and dialed_interface_destroy().
#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 567 of file linkedlists.h.
Referenced by aji_create_client(), ast_dial_create(), ast_module_register(), dialed_interface_duplicate(), load_module(), 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 622 of file linkedlists.h.
Referenced by __ast_queue_frame(), alloc_profile(), announce_thread(), app_exec(), ast_audiohook_attach(), ast_rtp_read(), ast_safe_sleep_conditional(), conf_run(), dundi_lookup_local(), feature_request_and_dial(), findmeexec(), free_numbers(), load_module(), load_modules(), 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 198 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 189 of file linkedlists.h.
Referenced by __ast_queue_frame(), announce_thread(), ast_do_masquerade(), ast_safe_sleep_conditional(), and feature_request_and_dial().
#define AST_LIST_HEAD_NOLOCK_INIT_VALUE |
Value:
{ \ .first = NULL, \ .last = NULL, \ }
Definition at line 216 of file linkedlists.h.
Referenced by ast_get_srv(), 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 310 of file linkedlists.h.
Referenced by 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 324 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 352 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 255 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 636 of file linkedlists.h.
Referenced by reschedule_precache().
#define AST_LIST_INSERT_BEFORE_CURRENT | ( | head, | |||
elm, | |||||
field | ) |
Inserts a list entry before the current entry during a traversal.
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 540 of file linkedlists.h.
Referenced by __ast_cli_register(), __ast_register_translator(), ast_custom_function_register(), ast_register_application(), defer_full_frame(), 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 652 of file linkedlists.h.
Referenced by __ao2_link(), __ast_format_register(), __ast_module_user_add(), __ast_register_translator(), __frame_free(), accept_thread(), ack_trans(), add_to_interfaces(), aji_handle_message(), append_transaction(), ast_autoservice_start(), ast_cdr_copy_vars(), ast_cdr_register(), ast_cdr_setvar(), ast_channel_datastore_add(), ast_channel_register(), ast_devstate_add(), ast_devstate_prov_add(), ast_dnsmgr_get(), ast_image_register(), ast_loader_register(), ast_merge_contexts_and_delete(), ast_odbc_request_obj(), ast_register_atexit(), ast_register_file_version(), ast_register_thread(), ast_register_verbose(), ast_rtp_proto_register(), ast_safe_sleep_conditional(), ast_speech_register(), autoservice_run(), build_conf(), build_mapping(), build_peer(), cdr_merge_vars(), create_transaction(), deep_copy_peer(), dundi_lookup_local(), dundi_send(), feature_request_and_dial(), features_alloc(), find_queue_by_name_rt(), forward_message(), handle_command_response(), handle_frame(), handle_frame_ownerless(), iax2_register(), iax_frame_free(), init_logger_chain(), load_config(), loopback_subst(), mohalloc(), odbc_load_module(), odbc_register_class(), pbx_builtin_pushvar_helper(), pbx_builtin_setvar_helper(), queue_ringing_trunk(), register_request(), register_translator(), reload(), reload_followme(), reload_queues(), reschedule_precache(), sched_release(), sla_ring_station(), and socket_read().
#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 752 of file linkedlists.h.
Referenced by __ast_queue_frame().
#define AST_LIST_INSERT_SORTALPHA | ( | head, | |||
elm, | |||||
field, | |||||
sortfield | ) |
Inserts a list entry into a alphabetically sorted list.
head | Pointer to the list head structure | |
elm | Pointer to the entry to be inserted | |
field | Name of the list entry field (declared using AST_LIST_ENTRY()) | |
sortfield | Name of the field on which the list is sorted |
Definition at line 691 of file linkedlists.h.
#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 672 of file linkedlists.h.
Referenced by __ao2_link(), __ast_cli_register(), __ast_queue_frame(), add_agent(), add_extensionstate_update(), add_sip_domain(), add_to_load_order(), app_exec(), append_history_va(), append_mailbox_mapping(), append_permission(), ast_app_group_set_channel(), ast_audiohook_attach(), ast_channel_datastore_inherit(), ast_channel_inherit_variables(), ast_context_add_switch2(), ast_custom_function_register(), ast_device_state_changed_literal(), ast_dial_append(), ast_do_masquerade(), ast_module_register(), ast_odbc_request_obj(), ast_register_application(), ast_register_switch(), ast_rtp_read(), ast_slinfactory_feed(), ast_tzset(), clone_variables(), conf_run(), defer_full_frame(), dialed_interface_duplicate(), dummy_start(), find_or_create(), findmeexec(), gen_readframe(), gmtsub(), iax2_transmit(), inherit_category(), init_manager(), insert_idle_thread(), local_call(), process_rfc2833(), process_weights(), queue_reload_request(), queue_request(), queue_signalling(), reload_followme(), run_agi(), schedule(), setup_inheritable_audiohook(), sla_add_trunk_to_station(), sla_queue_event_full(), sla_stop_ringing_station(), srv_callback(), start_network_thread(), statechange_queue(), and try_calling().
#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 393 of file linkedlists.h.
Referenced by __ast_queue_frame(), __ast_read(), ast_channel_clear_softhangup(), ast_dial_option_disable(), ast_dial_option_enable(), config_text_file_save(), 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 |
Definition at line 38 of file linkedlists.h.
Referenced by __ast_cli_generator(), __ast_cli_register(), __ast_cli_unregister(), __ast_format_register(), __ast_module_user_add(), __ast_module_user_hangup_all(), __ast_module_user_remove(), __ast_register_translator(), __attempt_transmit(), __login_exec(), __queues_show(), __unload_module(), abort_request(), accept_thread(), acf_odbc_read(), acf_odbc_write(), action_agent_callback_login(), action_agents(), add_extensionstate_update(), add_sip_domain(), add_to_interfaces(), add_to_queue(), admin_exec(), agent_devicestate(), agent_hangup(), agent_logoff(), agent_request(), agentmonitoroutgoing_exec(), agents_show(), agents_show_online(), aji_client_destroy(), aji_handle_message(), app_exec(), ast_active_channels(), ast_app_group_discard(), ast_app_group_get_count(), ast_app_group_list_lock(), ast_app_group_match_get_count(), ast_app_group_set_channel(), ast_app_group_update(), ast_autoservice_ignore(), ast_autoservice_start(), ast_autoservice_stop(), ast_begin_shutdown(), ast_cdr_register(), ast_cdr_unregister(), ast_channel_free(), ast_channel_register(), ast_channel_unregister(), ast_cli_command(), ast_custom_function_find(), ast_custom_function_register(), ast_custom_function_unregister(), ast_device_state_changed_literal(), ast_devstate_add(), ast_devstate_del(), ast_devstate_prov_add(), ast_devstate_prov_del(), ast_dial_destroy(), ast_dial_hangup(), ast_dial_join(), ast_dial_option_disable(), ast_dial_option_enable(), ast_dnsmgr_get(), ast_dnsmgr_release(), ast_filehelper(), ast_format_str_reduce(), ast_format_unregister(), ast_get_channel_tech(), ast_hangup(), ast_image_register(), ast_image_unregister(), ast_load_resource(), ast_loader_register(), ast_loader_unregister(), 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_queue_log(), ast_read_image(), ast_readfile(), ast_register_application(), ast_register_atexit(), ast_register_file_version(), ast_register_switch(), ast_register_thread(), ast_register_verbose(), ast_request(), ast_rtp_proto_register(), ast_rtp_proto_unregister(), ast_run_atexits(), 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_tzset(), ast_unload_resource(), ast_unregister_application(), ast_unregister_atexit(), ast_unregister_file_version(), ast_unregister_switch(), ast_unregister_thread(), ast_unregister_translator(), ast_unregister_verbose(), ast_update_use_count(), ast_verbose(), ast_writefile(), astman_verify_session_readpermissions(), astman_verify_session_writepermissions(), autoservice_run(), begin_dial(), build_conf(), build_peer(), build_transactions(), cancel_request(), channel_find_locked(), check_availability(), check_beep(), check_extenstate_updates(), check_request(), check_sip_domain(), clear_and_free_interfaces(), clear_extenstate_updates(), clear_sip_domains(), clearmarked_extenstate_updates(), close_logger(), complete_agent_logoff_cmd(), complete_meetmecmd(), complete_peer_helper(), complete_queue(), complete_show_application(), complete_show_function(), complete_show_version_files(), complete_show_version_files_deprecated(), complete_transfer(), conf_exec(), conf_free(), conf_play(), delete_users(), destroy_session(), dialed_interface_destroy(), dialed_interface_duplicate(), discover_transactions(), dispose_conf(), do_devstate_changes(), do_state_change(), 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(), features_alloc(), features_hangup(), features_show(), find_best(), find_conf(), find_conf_realtime(), find_engine(), find_idle_thread(), find_relative_dial_channel(), find_resource(), find_session(), find_user(), free_vm_users(), function_agent(), gen_readframe(), get_proto(), getproviderstate(), gmtsub(), handle_cli_status(), handle_command_response(), handle_frame(), handle_frame_ownerless(), handle_help(), handle_logger_show_channels(), handle_show_application(), handle_show_application_deprecated(), handle_show_applications(), handle_show_applications_deprecated(), handle_show_functions(), handle_show_functions_deprecated(), handle_show_switches(), handle_show_threads(), handle_show_version_files(), handle_show_version_files_deprecated(), handle_showmanager(), handle_showmanagers(), handle_showmanconn(), handle_showmaneventq(), handle_statechange(), handle_voicemail_show_users(), handle_voicemail_show_zones(), help1(), iax2_process_thread(), iax2_register(), iax2_show_registry(), iax2_show_stats(), iax2_show_threads(), iax2_transmit(), init_logger_chain(), init_manager(), insert_idle_thread(), interface_exists_global(), join_queue(), load_config(), load_module(), load_modules(), load_realtime_queue(), manager_event(), manager_queues_status(), mark_mappings(), mark_peers(), markall_extenstate_updates(), meetme_cmd(), meetmemute(), meetmestate(), monitor_dial(), network_thread(), odbc_load_module(), odbc_register_class(), odbc_show_command(), odbc_unload_module(), optimize_transactions(), pbx_findapp(), pbx_findswitch(), play_message_datetime(), post_cdr(), precache_transactions(), process_precache(), prune_mappings(), prune_peers(), pvt_destructor(), query_transactions(), queue_function_queuememberlist(), queue_function_queuewaitingcount(), queue_reload_request(), read_agent_config(), recordthread(), refresh_list(), register_request(), register_translator(), reload(), reload_agents(), reload_config(), reload_followme(), reload_logger(), reload_queue_members(), reload_queues(), remove_from_interfaces(), remove_from_queue(), remove_queue(), reschedule_precache(), resend_with_token(), reset_user_pw(), run_agi(), set_config(), set_member_paused(), shaun_of_the_dead(), show_channeltype(), show_channeltype_deprecated(), show_channeltypes(), show_file_formats(), show_file_formats_deprecated(), show_translation(), show_translation_deprecated(), sip_show_domains(), socket_process(), socket_read(), start_network_thread(), try_calling(), unload_module(), unmark_extenstate_update(), unregister_request(), unregister_translators(), update_status(), vmu_tm(), and vnak_retransmit().
#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 403 of file linkedlists.h.
Referenced by __ast_queue_frame(), __ast_read(), __queues_show(), ao2_iterator_next(), ast_frame_free(), ast_slinfactory_feed(), ast_walk_context_switches(), ast_write(), ast_writestream(), channel_find_locked(), cli_next(), conf_run(), create_dtmf_frame(), find_user(), group_count_function_read(), group_function_read(), group_list_function_read(), group_show_channels(), mixmonitor_thread(), reschedule_precache(), spy_generate(), and udptl_rx_packet().
#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 794 of file linkedlists.h.
Referenced by __ast_cli_unregister(), __ast_module_user_remove(), __ast_queue_frame(), __attempt_transmit(), agent_hangup(), ast_audiohook_remove(), ast_autoservice_start(), ast_channel_clear_softhangup(), ast_channel_free(), ast_dnsmgr_release(), ast_hangup(), ast_rtp_proto_unregister(), ast_unregister_switch(), conf_free(), destroy_packet(), destroy_session(), features_hangup(), handle_frame(), handle_frame_ownerless(), iax2_process_thread(), moh_release(), remove_queue(), resend_with_token(), and unregister_request().
#define AST_LIST_REMOVE_CURRENT | ( | head, | |||
field | ) |
Removes the current entry from a list during a traversal.
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 517 of file linkedlists.h.
Referenced by __ast_queue_frame(), __ast_read(), __unload_module(), accept_thread(), aji_handle_message(), ao2_callback(), app_exec(), ast_app_group_discard(), ast_app_group_set_channel(), ast_app_group_update(), ast_audiohook_detach_list(), ast_autoservice_stop(), ast_cdr_setvar(), ast_cdr_unregister(), ast_channel_datastore_remove(), ast_channel_unregister(), ast_context_remove_switch2(), ast_custom_function_unregister(), ast_destroy_template_list(), ast_devstate_del(), ast_devstate_prov_del(), ast_dial_destroy(), ast_format_unregister(), ast_frdup(), ast_image_unregister(), ast_loader_unregister(), ast_module_shutdown(), ast_module_unregister(), ast_sched_del(), ast_speech_unregister(), ast_unregister_application(), ast_unregister_atexit(), ast_unregister_file_version(), ast_unregister_thread(), ast_unregister_translator(), ast_unregister_verbose(), audio_audiohook_write_list(), cdr_merge_vars(), check_extenstate_updates(), clear_extenstate_updates(), clearmarked_extenstate_updates(), drop_translator(), dtmf_audiohook_write_list(), findmeexec(), forward_message(), func_inheritance_write(), iax_frame_new(), network_thread(), pbx_builtin_setvar_helper(), process_weights(), prune_mappings(), prune_peers(), read_agent_config(), remove_from_interfaces(), reschedule_precache(), shaun_of_the_dead(), 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 unload_module().
#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 773 of file linkedlists.h.
Referenced by __ast_context_destroy(), __ast_module_user_hangup_all(), __sip_destroy(), aji_client_destroy(), announce_thread(), app_exec(), append_history_va(), ast_autoservice_stop(), ast_cdr_free_vars(), ast_channel_free(), ast_do_masquerade(), ast_frame_header_new(), ast_get_srv(), ast_merge_contexts_and_delete(), ast_process_pending_reloads(), ast_safe_sleep_conditional(), ast_sched_runq(), ast_slinfactory_destroy(), ast_slinfactory_flush(), ast_slinfactory_read(), ast_unregister_features(), audiohook_inheritance_destroy(), cancel_request(), clear_and_free_interfaces(), clear_sip_domains(), conf_free(), container_destruct(), delete_users(), destroy_all_mailbox_mappings(), destroy_packets(), destroy_permissions(), destroy_station(), destroy_trunk(), device_state_thread(), dialed_interface_destroy(), do_devstate_changes(), dundi_lookup_local(), feature_request_and_dial(), find_idle_thread(), forward_message(), frame_cache_cleanup(), free_numbers(), free_vm_users(), gen_nextfile(), handle_deferred_full_frames(), init_logger_chain(), loopback_subst(), moh_class_destructor(), odbc_unload_module(), pbx_builtin_clear_globals(), process_precache(), process_request_queue(), pvt_destructor(), queue_reload_request(), reload(), sched_alloc(), sched_context_destroy(), send_signaling(), sla_stop_ringing_trunk(), sla_thread(), unload_module(), and unregister_translators().
#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 454 of file linkedlists.h.
Referenced by __ast_format_register(), __ast_queue_frame(), __login_exec(), __queues_show(), acf_odbc_read(), acf_odbc_write(), ack_trans(), action_agent_callback_login(), action_agents(), add_agent(), add_to_interfaces(), add_to_load_order(), admin_exec(), agent_devicestate(), agent_devicestate_cb(), agent_logoff(), agent_request(), agentmonitoroutgoing_exec(), agents_show(), agents_show_online(), allow_multiple_login(), ao2_iterator_next(), app_exec(), ast_active_channels(), ast_app_group_get_count(), ast_app_group_match_get_count(), ast_autoservice_ignore(), ast_autoservice_start(), ast_begin_shutdown(), ast_cdr_copy_vars(), ast_cdr_getvar_internal(), ast_cdr_register(), ast_cdr_serialize_variables(), ast_channel_datastore_inherit(), ast_channel_inherit_variables(), ast_channel_register(), ast_channeltype_list(), ast_context_add_switch2(), ast_custom_function_find(), ast_dial_hangup(), ast_dial_option_disable(), ast_dial_option_enable(), ast_filehelper(), ast_format_str_reduce(), ast_get_channel_tech(), ast_get_manager_by_name_locked(), ast_log(), ast_module_helper(), ast_module_reload(), ast_odbc_request_obj(), ast_read_image(), ast_readfile(), ast_register_application(), ast_register_switch(), ast_request(), ast_rtp_proto_register(), ast_run_atexits(), ast_sched_dump(), ast_sched_when(), ast_slinfactory_feed(), ast_tzset(), ast_update_module_list(), ast_update_use_count(), ast_verbose(), ast_writefile(), astman_verify_session_readpermissions(), astman_verify_session_writepermissions(), audiohook_inheritance_fixup(), autoservice_run(), begin_dial(), build_conf(), build_mapping(), build_peer(), build_transactions(), cdr_merge_vars(), channel_find_locked(), check_availability(), check_beep(), check_request(), check_sip_domain(), clear_calling_tree(), clone_variables(), close_logger(), compare_weight(), complete_agent_logoff_cmd(), complete_channeltypes(), complete_channeltypes_deprecated(), complete_meetmecmd(), complete_peer_helper(), complete_queue(), complete_queue_remove_member(), complete_show_application(), complete_show_function(), complete_show_version_files(), complete_show_version_files_deprecated(), complete_transfer(), complete_voicemail_show_users(), conf_exec(), config_text_file_save(), deep_copy_peer(), destroy_station(), destroy_trans(), dialed_interface_duplicate(), discover_transactions(), do_state_change(), 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(), features_alloc(), features_show(), find_agent(), find_audiohook_by_source(), find_conf(), find_conf_realtime(), find_or_create(), find_peer(), find_queue_by_name_rt(), find_relative_dial_channel(), find_resource(), find_session(), find_transaction(), find_user(), findmeexec(), get_proto(), get_trans_id(), gmtsub(), handle_cli_status(), handle_logger_show_channels(), handle_show_application(), handle_show_application_deprecated(), handle_show_applications(), handle_show_applications_deprecated(), handle_show_functions(), handle_show_functions_deprecated(), handle_show_globals(), handle_show_switches(), handle_show_threads(), handle_show_version_files(), handle_show_version_files_deprecated(), handle_showmanagers(), handle_showmanconn(), handle_statechange(), handle_voicemail_show_users(), handle_voicemail_show_zones(), has_permission(), iax2_show_registry(), iax2_show_stats(), iax2_show_threads(), interface_exists_global(), load_module(), load_realtime_queue(), local_call(), manager_event(), manager_queues_status(), mark_mappings(), mark_peers(), markall_extenstate_updates(), meetme_cmd(), meetmemute(), meetmestate(), mgcp_call(), monitor_dial(), monmp3thread(), mwi_monitor_handler(), odbc_show_command(), optimize_transactions(), ospauth_exec(), ospfinished_exec(), osplookup_exec(), ospnext_exec(), pbx_builtin_getvar_helper(), pbx_builtin_serialize_variables(), pbx_findapp(), pbx_findswitch(), pbx_retrieve_variable(), play_message_datetime(), post_cdr(), precache_transactions(), process_weights(), pvt_destructor(), query_transactions(), queue_function_queuememberlist(), queue_function_queuewaitingcount(), queue_reload_request(), read_agent_config(), rebuild_matrix(), refresh_list(), register_request(), reload(), reload_agents(), reload_config(), reload_followme(), reload_logger(), reload_queue_members(), reload_queues(), remove_from_queue(), reset_user_pw(), set_member_paused(), show_channeltype(), show_channeltype_deprecated(), show_channeltypes(), show_file_formats(), show_file_formats_deprecated(), show_image_formats(), show_image_formats_deprecated(), sip_call(), sip_dump_history(), sip_show_domains(), sip_show_history(), 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(), transmit_invite(), try_calling(), unmark_extenstate_update(), update_status(), 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 492 of file linkedlists.h.
Referenced by __ast_cli_register(), __ast_queue_frame(), __ast_read(), __ast_register_translator(), __unload_module(), accept_thread(), aji_handle_message(), ao2_callback(), app_exec(), ast_app_group_discard(), ast_app_group_set_channel(), ast_app_group_update(), ast_audiohook_detach_list(), ast_autoservice_stop(), ast_cdr_setvar(), ast_cdr_unregister(), ast_channel_datastore_find(), ast_channel_datastore_remove(), ast_channel_unregister(), ast_context_remove_switch2(), ast_custom_function_register(), ast_custom_function_unregister(), ast_destroy_template_list(), ast_devstate_del(), ast_devstate_prov_del(), ast_dial_destroy(), ast_do_masquerade(), ast_format_unregister(), ast_frdup(), ast_image_unregister(), ast_loader_unregister(), ast_module_shutdown(), ast_module_unregister(), ast_register_application(), ast_sched_del(), ast_speech_unregister(), ast_unregister_application(), ast_unregister_atexit(), ast_unregister_file_version(), ast_unregister_thread(), ast_unregister_translator(), ast_unregister_verbose(), audio_audiohook_write_list(), cdr_merge_vars(), check_extenstate_updates(), clear_extenstate_updates(), clearmarked_extenstate_updates(), defer_full_frame(), drop_translator(), dtmf_audiohook_write_list(), find_engine(), findmeexec(), forward_message(), func_inheritance_write(), getproviderstate(), iax_frame_new(), network_thread(), pbx_builtin_setvar_helper(), precache_transactions(), process_weights(), prune_mappings(), prune_peers(), read_agent_config(), remove_from_interfaces(), reschedule_precache(), schedule(), shaun_of_the_dead(), 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(), and unload_module().
#define AST_LIST_TRAVERSE_SAFE_END } |
Closes a safe loop traversal block.
Definition at line 556 of file linkedlists.h.
Referenced by __ast_cli_register(), __ast_queue_frame(), __ast_read(), __ast_register_translator(), __unload_module(), accept_thread(), aji_handle_message(), ao2_callback(), app_exec(), ast_app_group_discard(), ast_app_group_set_channel(), ast_app_group_update(), ast_audiohook_detach_list(), ast_autoservice_stop(), ast_cdr_setvar(), ast_cdr_unregister(), ast_channel_datastore_find(), ast_channel_datastore_remove(), ast_channel_unregister(), ast_context_remove_switch2(), ast_custom_function_register(), ast_custom_function_unregister(), ast_destroy_template_list(), ast_devstate_del(), ast_devstate_prov_del(), ast_do_masquerade(), ast_format_unregister(), ast_frdup(), ast_image_unregister(), ast_loader_unregister(), ast_module_shutdown(), ast_module_unregister(), ast_register_application(), ast_sched_del(), ast_speech_unregister(), ast_unregister_application(), ast_unregister_atexit(), ast_unregister_file_version(), ast_unregister_thread(), ast_unregister_translator(), ast_unregister_verbose(), audio_audiohook_write_list(), cdr_merge_vars(), check_extenstate_updates(), clear_extenstate_updates(), clearmarked_extenstate_updates(), defer_full_frame(), drop_translator(), dtmf_audiohook_write_list(), find_engine(), findmeexec(), forward_message(), func_inheritance_write(), getproviderstate(), iax_frame_new(), network_thread(), pbx_builtin_setvar_helper(), precache_transactions(), process_weights(), prune_mappings(), prune_peers(), read_agent_config(), remove_from_interfaces(), reschedule_precache(), schedule(), shaun_of_the_dead(), 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(), 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 |
Definition at line 71 of file linkedlists.h.
Referenced by agent_devicestate_cb(), and 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 104 of file linkedlists.h.
Referenced by __ast_cli_generator(), __ast_cli_register(), __ast_cli_unregister(), __ast_format_register(), __ast_module_user_add(), __ast_module_user_hangup_all(), __ast_module_user_remove(), __ast_register_translator(), __attempt_transmit(), __login_exec(), __queues_show(), __unload_module(), abort_request(), accept_thread(), acf_odbc_read(), acf_odbc_write(), action_agent_callback_login(), action_agents(), add_extensionstate_update(), add_sip_domain(), add_to_interfaces(), add_to_queue(), admin_exec(), agent_devicestate(), agent_devicestate_cb(), agent_hangup(), agent_logoff(), agent_request(), agentmonitoroutgoing_exec(), agents_show(), agents_show_online(), aji_handle_message(), app_exec(), ast_active_channels(), 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_autoservice_ignore(), ast_autoservice_start(), ast_autoservice_stop(), ast_begin_shutdown(), ast_cdr_register(), ast_cdr_unregister(), ast_channel_free(), ast_channel_register(), ast_channel_unregister(), ast_cli_command(), ast_custom_function_find(), ast_custom_function_register(), ast_custom_function_unregister(), ast_device_state_changed_literal(), ast_devstate_add(), ast_devstate_del(), ast_devstate_prov_add(), ast_devstate_prov_del(), ast_dial_hangup(), ast_dial_join(), ast_dial_option_disable(), ast_dial_option_enable(), ast_dnsmgr_get(), ast_dnsmgr_release(), ast_filehelper(), ast_format_str_reduce(), ast_format_unregister(), ast_get_channel_tech(), ast_hangup(), ast_image_register(), ast_image_unregister(), ast_load_resource(), ast_loader_register(), ast_loader_unregister(), 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_queue_log(), ast_read_image(), ast_readfile(), ast_register_application(), ast_register_atexit(), ast_register_file_version(), ast_register_switch(), ast_register_thread(), ast_register_verbose(), ast_request(), ast_rtp_proto_register(), ast_rtp_proto_unregister(), ast_run_atexits(), 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_tzset(), ast_unload_resource(), ast_unregister_application(), ast_unregister_atexit(), ast_unregister_file_version(), ast_unregister_switch(), ast_unregister_thread(), ast_unregister_translator(), ast_unregister_verbose(), ast_update_module_list(), ast_update_use_count(), ast_verbose(), ast_writefile(), astman_verify_session_readpermissions(), astman_verify_session_writepermissions(), autoservice_run(), begin_dial(), build_conf(), build_peer(), cancel_request(), channel_find_locked(), check_availability(), check_beep(), check_extenstate_updates(), check_request(), check_sip_domain(), clear_and_free_interfaces(), clear_extenstate_updates(), clear_sip_domains(), clearmarked_extenstate_updates(), close_logger(), complete_agent_logoff_cmd(), complete_meetmecmd(), complete_peer_helper(), complete_queue(), complete_show_application(), complete_show_function(), complete_show_version_files(), complete_show_version_files_deprecated(), complete_transfer(), conf_exec(), conf_free(), conf_play(), delete_users(), destroy_session(), dialed_interface_destroy(), dialed_interface_duplicate(), discover_transactions(), dispose_conf(), do_devstate_changes(), do_state_change(), 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(), features_alloc(), features_hangup(), features_show(), find_best(), find_conf(), find_conf_realtime(), find_engine(), find_idle_thread(), find_relative_dial_channel(), find_resource(), find_session(), find_user(), free_vm_users(), function_agent(), gen_readframe(), get_proto(), getproviderstate(), gmtsub(), handle_cli_status(), handle_command_response(), handle_frame(), handle_frame_ownerless(), handle_help(), handle_logger_show_channels(), handle_show_applications(), handle_show_applications_deprecated(), handle_show_functions(), handle_show_functions_deprecated(), handle_show_switches(), handle_show_threads(), handle_show_version_files(), handle_show_version_files_deprecated(), handle_showmanager(), handle_showmanagers(), handle_showmanconn(), handle_showmaneventq(), handle_statechange(), handle_voicemail_show_users(), handle_voicemail_show_zones(), help1(), iax2_process_thread(), iax2_register(), iax2_show_registry(), iax2_show_stats(), iax2_show_threads(), iax2_transmit(), init_logger_chain(), insert_idle_thread(), interface_exists_global(), join_queue(), load_config(), load_module(), load_realtime_queue(), manager_event(), manager_queues_status(), mark_mappings(), mark_peers(), markall_extenstate_updates(), meetme_cmd(), meetmemute(), meetmestate(), monitor_dial(), network_thread(), odbc_load_module(), odbc_register_class(), odbc_show_command(), odbc_unload_module(), pbx_findapp(), pbx_findswitch(), play_message_datetime(), post_cdr(), precache_transactions(), process_precache(), prune_mappings(), prune_peers(), pvt_destructor(), query_transactions(), queue_function_queuememberlist(), queue_function_queuewaitingcount(), queue_reload_request(), read_agent_config(), recordthread(), refresh_list(), register_request(), register_translator(), reload(), reload_agents(), reload_config(), reload_followme(), reload_logger(), reload_queue_members(), remove_from_interfaces(), remove_from_queue(), remove_queue(), reschedule_precache(), resend_with_token(), reset_user_pw(), run_agi(), set_config(), set_member_paused(), shaun_of_the_dead(), show_channeltype(), show_channeltype_deprecated(), show_channeltypes(), show_file_formats(), show_file_formats_deprecated(), show_translation(), show_translation_deprecated(), sip_show_domains(), socket_process(), socket_read(), start_network_thread(), try_calling(), unload_module(), unmark_extenstate_update(), unregister_request(), unregister_translators(), update_status(), vmu_tm(), and vnak_retransmit().
#define AST_RWLIST_APPEND_LIST AST_LIST_APPEND_LIST |
Definition at line 738 of file linkedlists.h.
#define AST_RWLIST_EMPTY AST_LIST_EMPTY |
#define AST_RWLIST_ENTRY AST_LIST_ENTRY |
Definition at line 379 of file linkedlists.h.
#define AST_RWLIST_FIRST AST_LIST_FIRST |
Definition at line 387 of file linkedlists.h.
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 163 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 608 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 580 of file linkedlists.h.
#define AST_RWLIST_HEAD_INIT_VALUE |
Value:
{ \ .first = NULL, \ .last = NULL, \ .lock = AST_RWLOCK_INIT_VALUE, \ }
Definition at line 207 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 338 of file linkedlists.h.
Value:
struct name { \ struct type *first; \ struct type *last; \ ast_rwlock_t lock; \ } name = AST_RWLIST_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_RWLIST_HEAD_STATIC(entry_list, entry);
This would define struct
entry_list
, intended to hold a list of type struct
entry
.
Definition at line 297 of file linkedlists.h.
#define AST_RWLIST_INSERT_AFTER AST_LIST_INSERT_AFTER |
Definition at line 643 of file linkedlists.h.
#define AST_RWLIST_INSERT_BEFORE_CURRENT AST_LIST_INSERT_BEFORE_CURRENT |
Definition at line 551 of file linkedlists.h.
#define AST_RWLIST_INSERT_HEAD AST_LIST_INSERT_HEAD |
#define AST_RWLIST_INSERT_LIST_AFTER AST_LIST_INSERT_LIST_AFTER |
Definition at line 762 of file linkedlists.h.
#define AST_RWLIST_INSERT_SORTALPHA AST_LIST_INSERT_SORTALPHA |
Definition at line 711 of file linkedlists.h.
#define AST_RWLIST_INSERT_TAIL AST_LIST_INSERT_TAIL |
Definition at line 682 of file linkedlists.h.
#define AST_RWLIST_LAST AST_LIST_LAST |
Definition at line 395 of file linkedlists.h.
#define AST_RWLIST_NEXT AST_LIST_NEXT |
Definition at line 405 of file linkedlists.h.
#define AST_RWLIST_RDLOCK | ( | head | ) | ast_rwlock_rdlock(&(head)->lock) |
Read locks a list.
head | This is a pointer to the list head structure |
Definition at line 60 of file linkedlists.h.
Referenced by destroy_station(), feature_interpret_helper(), handle_showfeatures(), set_config_flags(), sla_add_trunk_to_station(), sla_queue_event_conf(), sla_show_stations(), sla_show_trunks(), sla_state(), sla_station_exec(), and sla_trunk_exec().
#define AST_RWLIST_REMOVE AST_LIST_REMOVE |
#define AST_RWLIST_REMOVE_CURRENT AST_LIST_REMOVE_CURRENT |
Definition at line 528 of file linkedlists.h.
#define AST_RWLIST_REMOVE_HEAD AST_LIST_REMOVE_HEAD |
#define AST_RWLIST_TRAVERSE AST_LIST_TRAVERSE |
Definition at line 457 of file linkedlists.h.
Referenced by find_dynamic_feature(), handle_showfeatures(), sla_add_trunk_to_station(), sla_find_station(), sla_find_trunk(), sla_queue_event_conf(), sla_show_stations(), and sla_show_trunks().
#define AST_RWLIST_TRAVERSE_SAFE_BEGIN AST_LIST_TRAVERSE_SAFE_BEGIN |
Definition at line 504 of file linkedlists.h.
#define AST_RWLIST_TRAVERSE_SAFE_END AST_LIST_TRAVERSE_SAFE_END |
Definition at line 558 of file linkedlists.h.
#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 |
Definition at line 93 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 |
Definition at line 82 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 115 of file linkedlists.h.
Referenced by ast_register_feature(), ast_unregister_feature(), ast_unregister_features(), destroy_station(), feature_interpret_helper(), handle_showfeatures(), set_config_flags(), sla_add_trunk_to_station(), sla_destroy(), sla_queue_event_conf(), sla_show_stations(), sla_show_trunks(), sla_state(), sla_station_exec(), and sla_trunk_exec().
#define AST_RWLIST_WRLOCK | ( | head | ) | ast_rwlock_wrlock(&(head)->lock) |
Write locks a list.
head | This is a pointer to the list head structure |
Definition at line 49 of file linkedlists.h.
Referenced by ast_register_feature(), ast_unregister_feature(), ast_unregister_features(), sla_add_trunk_to_station(), and sla_destroy().