#include <pthread.h>
#include <netdb.h>
#include <time.h>
#include <sys/param.h>
#include <unistd.h>
#include "asterisk/logger.h"
#include "asterisk/compiler.h"
#include "asterisk/inline_api.h"
Go to the source code of this file.
Defines | |
#define | __AST_MUTEX_DEFINE(scope, mutex, init_val, track) scope ast_mutex_t mutex = init_val |
#define | __AST_RWLOCK_DEFINE(scope, rwlock) scope ast_rwlock_t rwlock = AST_RWLOCK_INIT_VALUE |
#define | __MTX_PROF(a) return pthread_mutex_lock((a)) |
#define | ast_channel_lock(x) ast_mutex_lock(&x->lock) |
Lock a channel. If DEBUG_CHANNEL_LOCKS is defined in the Makefile, print relevant output for debugging. | |
#define | ast_channel_trylock(x) ast_mutex_trylock(&x->lock) |
Try locking a channel. If DEBUG_CHANNEL_LOCKS is defined in the Makefile, print relevant output for debugging. | |
#define | ast_channel_unlock(x) ast_mutex_unlock(&x->lock) |
Unlock a channel. If DEBUG_CHANNEL_LOCKS is defined in the Makefile, print relevant output for debugging. | |
#define | AST_MUTEX_DEFINE_STATIC(mutex) __AST_MUTEX_DEFINE(static, mutex, AST_MUTEX_INIT_VALUE, 1) |
#define | AST_MUTEX_DEFINE_STATIC_NOTRACKING(mutex) __AST_MUTEX_DEFINE(static, mutex, AST_MUTEX_INIT_VALUE_NOTRACKING, 0) |
#define | ast_mutex_init_notracking(m) ast_mutex_init(m) |
#define | AST_MUTEX_INIT_VALUE ((ast_mutex_t) PTHREAD_MUTEX_INIT_VALUE) |
#define | AST_MUTEX_INIT_VALUE_NOTRACKING ((ast_mutex_t) PTHREAD_MUTEX_INIT_VALUE) |
#define | AST_MUTEX_INITIALIZER __use_AST_MUTEX_DEFINE_STATIC_rather_than_AST_MUTEX_INITIALIZER__ |
#define | AST_MUTEX_KIND PTHREAD_MUTEX_RECURSIVE |
#define | ast_pthread_mutex_init(pmutex, a) pthread_mutex_init(pmutex,a) |
#define | AST_PTHREADT_NULL (pthread_t) -1 |
#define | AST_PTHREADT_STOP (pthread_t) -2 |
#define | AST_RWLOCK_DEFINE_STATIC(rwlock) __AST_RWLOCK_DEFINE(static, rwlock) |
#define | AST_RWLOCK_INIT_VALUE PTHREAD_RWLOCK_INITIALIZER |
#define | DEADLOCK_AVOIDANCE(lock) |
#define | gethostbyname __gethostbyname__is__not__reentrant__use__ast_gethostbyname__instead__ |
#define | pthread_cond_broadcast use_ast_cond_broadcast_instead_of_pthread_cond_broadcast |
#define | pthread_cond_destroy use_ast_cond_destroy_instead_of_pthread_cond_destroy |
#define | pthread_cond_init use_ast_cond_init_instead_of_pthread_cond_init |
#define | pthread_cond_signal use_ast_cond_signal_instead_of_pthread_cond_signal |
#define | pthread_cond_t use_ast_cond_t_instead_of_pthread_cond_t |
#define | pthread_cond_timedwait use_ast_cond_timedwait_instead_of_pthread_cond_timedwait |
#define | pthread_cond_wait use_ast_cond_wait_instead_of_pthread_cond_wait |
#define | pthread_create __use_ast_pthread_create_instead__ |
#define | pthread_mutex_destroy use_ast_mutex_destroy_instead_of_pthread_mutex_destroy |
#define | pthread_mutex_init use_ast_mutex_init_instead_of_pthread_mutex_init |
#define | PTHREAD_MUTEX_INIT_VALUE PTHREAD_MUTEX_INITIALIZER |
#define | pthread_mutex_lock use_ast_mutex_lock_instead_of_pthread_mutex_lock |
#define | pthread_mutex_t use_ast_mutex_t_instead_of_pthread_mutex_t |
#define | pthread_mutex_trylock use_ast_mutex_trylock_instead_of_pthread_mutex_trylock |
#define | pthread_mutex_unlock use_ast_mutex_unlock_instead_of_pthread_mutex_unlock |
Typedefs | |
typedef pthread_cond_t | ast_cond_t |
typedef pthread_mutex_t | ast_mutex_t |
typedef pthread_rwlock_t | ast_rwlock_t |
Functions | |
int | ast_atomic_dec_and_test (volatile int *p) |
decrement *p by 1 and return true if the variable has reached 0. Useful e.g. to check if a refcount has reached 0. | |
int | ast_atomic_fetchadd_int (volatile int *p, int v) |
Atomically add v to *p and return * the previous value of *p. This can be used to handle reference counts, and the return value can be used to generate unique identifiers. | |
int | ast_atomic_fetchadd_int_slow (volatile int *p, int v) |
static int | ast_cond_broadcast (ast_cond_t *cond) |
static int | ast_cond_destroy (ast_cond_t *cond) |
static int | ast_cond_init (ast_cond_t *cond, pthread_condattr_t *cond_attr) |
static int | ast_cond_signal (ast_cond_t *cond) |
static int | ast_cond_timedwait (ast_cond_t *cond, ast_mutex_t *t, const struct timespec *abstime) |
static int | ast_cond_wait (ast_cond_t *cond, ast_mutex_t *t) |
static int | ast_mutex_destroy (ast_mutex_t *pmutex) |
static int | ast_mutex_init (ast_mutex_t *pmutex) |
static int | ast_mutex_lock (ast_mutex_t *pmutex) |
static int | ast_mutex_trylock (ast_mutex_t *pmutex) |
static int | ast_mutex_unlock (ast_mutex_t *pmutex) |
static int | ast_rwlock_destroy (ast_rwlock_t *prwlock) |
static int | ast_rwlock_init (ast_rwlock_t *prwlock) |
static int | ast_rwlock_rdlock (ast_rwlock_t *prwlock) |
static int | ast_rwlock_timedrdlock (ast_rwlock_t *prwlock, const struct timespec *abs_timeout) |
static int | ast_rwlock_timedwrlock (ast_rwlock_t *prwlock, const struct timespec *abs_timeout) |
static int | ast_rwlock_tryrdlock (ast_rwlock_t *prwlock) |
static int | ast_rwlock_trywrlock (ast_rwlock_t *prwlock) |
static int | ast_rwlock_unlock (ast_rwlock_t *prwlock) |
static int | ast_rwlock_wrlock (ast_rwlock_t *prwlock) |
Definition in file lock.h.
#define __AST_MUTEX_DEFINE | ( | scope, | |||
mutex, | |||||
init_val, | |||||
track | ) | scope ast_mutex_t mutex = init_val |
#define __AST_RWLOCK_DEFINE | ( | scope, | |||
rwlock | ) | scope ast_rwlock_t rwlock = AST_RWLOCK_INIT_VALUE |
#define __MTX_PROF | ( | a | ) | return pthread_mutex_lock((a)) |
#define ast_channel_lock | ( | x | ) | ast_mutex_lock(&x->lock) |
Lock a channel. If DEBUG_CHANNEL_LOCKS is defined in the Makefile, print relevant output for debugging.
Definition at line 1384 of file lock.h.
Referenced by __ast_queue_frame(), __login_exec(), __oh323_destroy(), __sip_destroy(), _macro_exec(), action_redirect(), add_features_datastores(), agent_hangup(), agent_indicate(), ast_activate_generator(), ast_answer(), ast_async_goto(), ast_audiohook_attach(), ast_audiohook_detach_source(), ast_audiohook_remove(), ast_autoservice_start(), ast_autoservice_stop(), ast_bridge_call(), ast_call(), ast_call_forward(), ast_channel_clear_softhangup(), ast_channel_free(), ast_channel_masquerade(), ast_check_hangup_locked(), ast_deactivate_generator(), ast_dial_join(), ast_do_masquerade(), ast_explicit_goto(), ast_hangup(), ast_indicate_data(), ast_pbx_outgoing_app(), ast_pbx_outgoing_exten(), ast_read_generator_actions(), ast_rtp_bridge(), ast_rtp_early_bridge(), ast_rtp_make_compatible(), ast_safe_sleep_conditional(), ast_sendtext(), ast_set_callerid(), ast_settimeout(), ast_softhangup(), ast_stopstream(), ast_transfer(), ast_udptl_bridge(), ast_waitfor_nandfds(), ast_write(), asyncgoto_exec(), builtin_atxfer(), callerid_read(), callerid_write(), channel_spy(), clear_dialed_interfaces(), common_exec(), dahdi_handle_dtmf(), do_parking_thread(), end_bridge_callback(), feature_check(), feature_interpret(), feature_request_and_dial(), func_header_read(), func_inheritance_write(), function_agent(), function_sipchaninfo_read(), generator_force(), handle_request_invite(), local_ast_moh_stop(), local_hangup(), local_queue_frame(), local_setoption(), moh_files_generator(), p2p_callback_disable(), park_exec(), pbx_builtin_background(), pbx_builtin_getvar_helper(), pbx_builtin_pushvar_helper(), pbx_builtin_serialize_variables(), pbx_builtin_setvar_helper(), pbx_retrieve_variable(), ring_entry(), sendtext_exec(), set_ext_pri(), set_format(), setup_inheritance_datastore(), setup_mixmonitor_ds(), setup_transfer_datastore(), sip_addheader(), sip_dtmfmode(), sip_park(), sip_park_thread(), smdi_msg_read(), smdi_msg_retrieve_read(), stop_mixmonitor_exec(), transmit_invite(), try_calling(), and update_bridgepeer().
#define ast_channel_trylock | ( | x | ) | ast_mutex_trylock(&x->lock) |
Try locking a channel. If DEBUG_CHANNEL_LOCKS is defined in the Makefile, print relevant output for debugging.
Definition at line 1390 of file lock.h.
Referenced by __ast_read(), __oh323_rtp_create(), __sip_autodestruct(), agent_indicate(), agent_logoff(), agent_read(), ast_channel_masquerade(), ast_queue_hangup(), ast_rtp_bridge(), ast_rtp_early_bridge(), ast_rtp_make_compatible(), ast_udptl_bridge(), ast_write(), auto_congest(), channel_find_locked(), channel_spy(), chanspy_ds_free(), cleanup_connection(), dahdi_softhangup_all(), do_monitor(), get_sip_pvt_byid_locked(), hangup_connection(), local_hangup(), local_queue_frame(), local_setoption(), oh323_rtp_read(), oh323_simulate_dtmf_end(), receive_digit(), retrans_pkt(), scheduler_process_request_queue(), send_provisional_keepalive_full(), setup_rtp_connection(), sig_pri_lock_owner(), sip_park(), sip_reinvite_retry(), sipsock_read(), and update_state().
#define ast_channel_unlock | ( | x | ) | ast_mutex_unlock(&x->lock) |
Unlock a channel. If DEBUG_CHANNEL_LOCKS is defined in the Makefile, print relevant output for debugging.
Definition at line 1387 of file lock.h.
Referenced by __ast_queue_frame(), __ast_read(), __login_exec(), __oh323_destroy(), __oh323_rtp_create(), __sip_autodestruct(), __sip_destroy(), _macro_exec(), action_getvar(), action_hangup(), action_redirect(), action_setvar(), action_status(), action_timeout(), add_features_datastores(), agent_hangup(), agent_indicate(), agent_logoff(), agent_read(), ast_activate_generator(), ast_answer(), ast_async_goto(), ast_async_goto_by_name(), ast_audiohook_attach(), ast_audiohook_detach_source(), ast_audiohook_remove(), ast_autoservice_start(), ast_autoservice_stop(), ast_bridge_call(), ast_call(), ast_call_forward(), ast_channel_clear_softhangup(), ast_channel_free(), ast_channel_masquerade(), ast_check_hangup_locked(), ast_complete_channels(), ast_deactivate_generator(), ast_dial_join(), ast_do_masquerade(), ast_explicit_goto(), ast_hangup(), ast_indicate_data(), ast_parse_device_state(), ast_pbx_outgoing_app(), ast_pbx_outgoing_exten(), ast_pickup_call(), ast_queue_hangup(), ast_read_generator_actions(), ast_rtp_bridge(), ast_rtp_early_bridge(), ast_rtp_make_compatible(), ast_safe_sleep_conditional(), ast_sendtext(), ast_set_callerid(), ast_settimeout(), ast_softhangup(), ast_stopstream(), ast_transfer(), ast_udptl_bridge(), ast_waitfor_nandfds(), ast_write(), asyncgoto_exec(), auto_congest(), bridge_native_loop(), bridge_p2p_loop(), builtin_atxfer(), callerid_read(), callerid_write(), change_monitor_action(), channel_spy(), chanspy_ds_free(), cleanup_connection(), clear_dialed_interfaces(), common_exec(), dahdi_handle_dtmf(), dahdi_softhangup_all(), do_monitor(), do_parking_thread(), do_pause_or_unpause(), end_bridge_callback(), fast_originate(), feature_check(), feature_interpret(), feature_request_and_dial(), func_header_read(), func_inheritance_write(), function_agent(), function_sipchaninfo_read(), generator_force(), handle_chanlist(), handle_chanlist_deprecated(), handle_channelstatus(), handle_core_set_debug_channel(), handle_debugchan_deprecated(), handle_getvariablefull(), handle_hangup(), handle_invite_replaces(), handle_nodebugchan_deprecated(), handle_request_invite(), handle_request_refer(), handle_showchan(), handle_showchan_deprecated(), handle_softhangup(), hangup_connection(), local_ast_moh_stop(), local_attended_transfer(), local_hangup(), local_queue_frame(), local_setoption(), manager_park(), mixmonitor_cli(), moh_files_generator(), next_channel(), oh323_rtp_read(), oh323_simulate_dtmf_end(), p2p_callback_disable(), park_call_full(), park_exec(), pbx_builtin_background(), pbx_builtin_getvar_helper(), pbx_builtin_importvar(), pbx_builtin_pushvar_helper(), pbx_builtin_serialize_variables(), pbx_builtin_setvar_helper(), pbx_retrieve_variable(), pickup_by_exten(), pickup_by_mark(), pri_queue_frame(), receive_digit(), retrans_pkt(), ring_entry(), send_provisional_keepalive_full(), sendtext_exec(), set_ext_pri(), set_format(), setup_chanspy_ds(), setup_inheritance_datastore(), setup_mixmonitor_ds(), setup_rtp_connection(), setup_transfer_datastore(), sip_addheader(), sip_dtmfmode(), sip_park(), sip_park_thread(), sip_reinvite_retry(), sipsock_read(), smdi_msg_read(), smdi_msg_retrieve_read(), start_monitor_action(), stop_mixmonitor_exec(), stop_monitor_action(), transmit_invite(), try_calling(), update_bridgepeer(), and update_state().
#define AST_MUTEX_DEFINE_STATIC | ( | mutex | ) | __AST_MUTEX_DEFINE(static, mutex, AST_MUTEX_INIT_VALUE, 1) |
#define AST_MUTEX_DEFINE_STATIC_NOTRACKING | ( | mutex | ) | __AST_MUTEX_DEFINE(static, mutex, AST_MUTEX_INIT_VALUE_NOTRACKING, 0) |
#define AST_MUTEX_INIT_VALUE ((ast_mutex_t) PTHREAD_MUTEX_INIT_VALUE) |
#define AST_MUTEX_INIT_VALUE_NOTRACKING ((ast_mutex_t) PTHREAD_MUTEX_INIT_VALUE) |
#define AST_MUTEX_INITIALIZER __use_AST_MUTEX_DEFINE_STATIC_rather_than_AST_MUTEX_INITIALIZER__ |
#define AST_MUTEX_KIND PTHREAD_MUTEX_RECURSIVE |
#define ast_pthread_mutex_init | ( | pmutex, | |||
a | ) | pthread_mutex_init(pmutex,a) |
#define AST_PTHREADT_NULL (pthread_t) -1 |
Definition at line 79 of file lock.h.
Referenced by __unload_module(), accept_thread(), action_waitevent(), add_extensionstate_update(), ast_autoservice_start(), ast_autoservice_stop(), ast_cdr_submit_batch(), ast_device_state_changed_literal(), ast_dial_create(), ast_dial_join(), ast_smdi_interface_destroy(), build_conf(), conf_free(), conf_run(), console_verboser(), dahdi_restart(), do_reload(), http_server_start(), iax2_transmit(), init_mfcr2_globals(), load_module(), load_rpt_vars(), manager_event(), moh_class_destructor(), network_thread(), pri_grab(), process_precache(), quit_handler(), restart_monitor(), rpt_master(), sla_destroy(), sla_queue_event_full(), and unload_module().
#define AST_PTHREADT_STOP (pthread_t) -2 |
Definition at line 80 of file lock.h.
Referenced by __unload_module(), add_extensionstate_update(), answer_exec_run(), ast_dial_join(), ast_smdi_interface_destroy(), dahdi_restart(), monitor_dial(), restart_monitor(), rpt(), rpt_master(), and unload_module().
#define AST_RWLOCK_DEFINE_STATIC | ( | rwlock | ) | __AST_RWLOCK_DEFINE(static, rwlock) |
#define DEADLOCK_AVOIDANCE | ( | lock | ) |
Definition at line 725 of file lock.h.
Referenced by __sip_autodestruct(), agent_logoff(), agent_read(), channel_spy(), chanspy_ds_free(), dahdi_bridge(), dahdi_queue_frame(), dahdi_read(), dahdi_unlink(), do_monitor(), get_sip_pvt_byid_locked(), grab_owner(), iax2_destroy(), iax2_lock_owner(), lock_both(), mgcp_queue_frame(), mgcp_queue_hangup(), oh323_simulate_dtmf_end(), pri_grab(), pri_hangup_all(), retrans_pkt(), sip_park(), and wait_for_peercallno().
#define gethostbyname __gethostbyname__is__not__reentrant__use__ast_gethostbyname__instead__ |
#define pthread_cond_broadcast use_ast_cond_broadcast_instead_of_pthread_cond_broadcast |
#define pthread_cond_destroy use_ast_cond_destroy_instead_of_pthread_cond_destroy |
#define pthread_cond_init use_ast_cond_init_instead_of_pthread_cond_init |
#define pthread_cond_signal use_ast_cond_signal_instead_of_pthread_cond_signal |
#define pthread_cond_t use_ast_cond_t_instead_of_pthread_cond_t |
#define pthread_cond_timedwait use_ast_cond_timedwait_instead_of_pthread_cond_timedwait |
#define pthread_cond_wait use_ast_cond_wait_instead_of_pthread_cond_wait |
#define pthread_create __use_ast_pthread_create_instead__ |
Definition at line 858 of file lock.h.
Referenced by ast_pthread_create_stack(), and misdn_tasks_init().
#define pthread_mutex_destroy use_ast_mutex_destroy_instead_of_pthread_mutex_destroy |
#define pthread_mutex_init use_ast_mutex_init_instead_of_pthread_mutex_init |
Definition at line 840 of file lock.h.
Referenced by ast_mutex_init(), dummy_start(), init_bc(), and stack_init().
#define pthread_mutex_lock use_ast_mutex_lock_instead_of_pthread_mutex_lock |
Definition at line 837 of file lock.h.
Referenced by dummy_start(), find_free_chan_in_stack(), handle_event_nt(), handle_frm_nt(), handle_l1(), handle_timers(), manager_event_handler(), misdn_lib_get_free_bc(), misdn_lib_get_l2_down(), misdn_lib_get_l2_up(), and misdn_send_lock().
#define pthread_mutex_t use_ast_mutex_t_instead_of_pthread_mutex_t |
#define pthread_mutex_trylock use_ast_mutex_trylock_instead_of_pthread_mutex_trylock |
#define pthread_mutex_unlock use_ast_mutex_unlock_instead_of_pthread_mutex_unlock |
Definition at line 838 of file lock.h.
Referenced by ast_mutex_unlock(), dummy_start(), handle_event_nt(), handle_frm_nt(), handle_l1(), handle_timers(), manager_event_handler(), misdn_lib_get_free_bc(), misdn_lib_get_l2_down(), misdn_lib_get_l2_up(), and misdn_send_unlock().
typedef pthread_cond_t ast_cond_t |
typedef pthread_mutex_t ast_mutex_t |
typedef pthread_rwlock_t ast_rwlock_t |
int ast_atomic_dec_and_test | ( | volatile int * | p | ) | [inline] |
decrement *p by 1 and return true if the variable has reached 0. Useful e.g. to check if a refcount has reached 0.
Definition at line 1363 of file lock.h.
Referenced by dispose_conf(), iax2_process_thread_cleanup(), run_station(), sla_station_exec(), and unuse_eventqent().
int ast_atomic_fetchadd_int | ( | volatile int * | p, | |
int | v | |||
) | [inline] |
Atomically add v to *p and return * the previous value of *p. This can be used to handle reference counts, and the return value can be used to generate unique identifiers.
Definition at line 1317 of file lock.h.
Referenced by __ao2_link(), __ao2_lock(), __ao2_trylock(), __ao2_unlock(), __ast_module_user_add(), __ast_module_user_hangup_all(), __ast_module_user_remove(), accept_thread(), admin_exec(), agent_new(), ao2_alloc(), ao2_callback(), ao2_container_alloc(), ao2_lock(), ao2_ref(), ao2_trylock(), ao2_unlock(), ast_cli_command(), ast_dial_append(), ast_httpd_helper_thread(), ast_module_ref(), ast_module_unref(), authenticate_verify(), build_conf(), common_exec(), dahdi_destroy(), dahdi_translate(), destroy_session(), handle_register_message(), http_root(), iax2_destroy_helper(), iax2_process_thread(), iax_frame_free(), iax_frame_new(), inprocess_count(), process_message(), run_station(), sip_new(), sla_add_trunk_to_station(), sla_handle_hold_event(), sla_station_exec(), and smdi_msg_retrieve_read().
int ast_atomic_fetchadd_int_slow | ( | volatile int * | p, | |
int | v | |||
) |
Definition at line 1327 of file utils.c.
References ast_mutex_lock(), ast_mutex_unlock(), and fetchadd_m.
01328 { 01329 int ret; 01330 ast_mutex_lock(&fetchadd_m); 01331 ret = *p; 01332 *p += v; 01333 ast_mutex_unlock(&fetchadd_m); 01334 return ret; 01335 }
static int ast_cond_broadcast | ( | ast_cond_t * | cond | ) | [inline, static] |
Definition at line 792 of file lock.h.
References pthread_cond_broadcast.
Referenced by ast_smdi_md_message_push(), ast_smdi_md_message_putback(), ast_smdi_mwi_message_push(), and ast_smdi_mwi_message_putback().
00793 { 00794 return pthread_cond_broadcast(cond); 00795 }
static int ast_cond_destroy | ( | ast_cond_t * | cond | ) | [inline, static] |
Definition at line 797 of file lock.h.
References pthread_cond_destroy.
Referenced by __login_exec(), __unload_module(), agent_cleanup(), agent_hangup(), ast_audiohook_destroy(), ast_smdi_interface_destroy(), do_reload(), iax2_process_thread_cleanup(), mixmonitor_free(), read_agent_config(), setup_mixmonitor_ds(), sla_destroy(), sla_handle_dial_state_event(), and sla_station_exec().
00798 { 00799 return pthread_cond_destroy(cond); 00800 }
static int ast_cond_init | ( | ast_cond_t * | cond, | |
pthread_condattr_t * | cond_attr | |||
) | [inline, static] |
Definition at line 782 of file lock.h.
References pthread_cond_init.
Referenced by add_agent(), alloc_smdi_interface(), ast_audiohook_init(), ast_autoservice_init(), ast_device_state_engine_init(), do_reload(), find_idle_thread(), load_module(), setup_mixmonitor_ds(), sla_handle_dial_state_event(), sla_load_config(), sla_station_exec(), and start_network_thread().
00783 { 00784 return pthread_cond_init(cond, cond_attr); 00785 }
static int ast_cond_signal | ( | ast_cond_t * | cond | ) | [inline, static] |
Definition at line 787 of file lock.h.
References pthread_cond_signal.
Referenced by __login_exec(), __unload_module(), agent_cleanup(), agent_hangup(), agent_request(), ast_audiohook_detach_list(), ast_audiohook_remove(), ast_audiohook_write_frame(), ast_autoservice_start(), ast_device_state_changed_literal(), audio_audiohook_write_list(), conf_free(), conf_run(), dial_trunk(), iax2_sched_add(), mixmonitor_ds_destroy(), run_station(), signal_condition(), sla_destroy(), sla_queue_event_full(), statechange_queue(), stop_mixmonitor_exec(), submit_unscheduled_batch(), and unload_module().
00788 { 00789 return pthread_cond_signal(cond); 00790 }
static int ast_cond_timedwait | ( | ast_cond_t * | cond, | |
ast_mutex_t * | t, | |||
const struct timespec * | abstime | |||
) | [inline, static] |
Definition at line 807 of file lock.h.
References pthread_cond_timedwait.
Referenced by ast_audiohook_trigger_wait(), do_cdr(), iax2_process_thread(), mwi_monitor_handler(), sched_thread(), sla_thread(), and smdi_message_wait().
00808 { 00809 return pthread_cond_timedwait(cond, t, abstime); 00810 }
static int ast_cond_wait | ( | ast_cond_t * | cond, | |
ast_mutex_t * | t | |||
) | [inline, static] |
Definition at line 802 of file lock.h.
References pthread_cond_wait.
Referenced by __login_exec(), agent_request(), announce_thread(), autoservice_run(), dahdi_restart(), device_state_thread(), do_devstate_changes(), iax2_process_thread(), mixmonitor_thread(), sched_thread(), sla_handle_dial_state_event(), sla_station_exec(), and sla_thread().
00803 { 00804 return pthread_cond_wait(cond, t); 00805 }
static int ast_mutex_destroy | ( | ast_mutex_t * | pmutex | ) | [inline, static] |
Definition at line 765 of file lock.h.
References pthread_mutex_destroy.
Referenced by __ast_context_destroy(), __login_exec(), __oh323_destroy(), __unload_module(), agent_cleanup(), agent_hangup(), ao2_ref(), ast_audiohook_destroy(), ast_channel_free(), ast_dnsmgr_release(), ast_odbc_request_obj(), ast_rtp_destroy(), ast_smdi_interface_destroy(), ast_speech_destroy(), ast_speech_new(), build_conf(), build_gateway(), common_exec(), delete_devices(), destroy_dahdi_pvt(), destroy_session(), features_hangup(), free_session(), iax2_process_thread_cleanup(), misdn_cfg_destroy(), misdn_jb_destroy(), mixmonitor_free(), read_agent_config(), release_chan(), release_chan_early(), sched_context_destroy(), setup_mixmonitor_ds(), sip_alloc(), sla_destroy(), sla_handle_dial_state_event(), sla_station_exec(), timing_read(), and unload_module().
00766 { 00767 return pthread_mutex_destroy(pmutex); 00768 }
static int ast_mutex_init | ( | ast_mutex_t * | pmutex | ) | [inline, static] |
Definition at line 745 of file lock.h.
References AST_MUTEX_KIND, and pthread_mutex_init.
Referenced by accept_thread(), add_agent(), alloc_profile(), alloc_smdi_interface(), ao2_alloc(), ast_audiohook_init(), ast_dial_create(), ast_dnsmgr_get(), ast_odbc_request_obj(), ast_rtp_new_init(), ast_speech_new(), build_conf(), build_device(), build_gateway(), chandup(), common_exec(), conf_run(), crypto_init(), dahdi_restart(), features_alloc(), find_idle_thread(), gtalk_alloc(), load_module(), misdn_cfg_init(), misdn_jb_init(), mkintf(), oh323_alloc(), read_config(), rpt_master(), sched_context_create(), setup_mixmonitor_ds(), sip_alloc(), skinny_new(), sla_handle_dial_state_event(), sla_load_config(), sla_station_exec(), and start_network_thread().
00746 { 00747 int res; 00748 pthread_mutexattr_t attr; 00749 00750 pthread_mutexattr_init(&attr); 00751 pthread_mutexattr_settype(&attr, AST_MUTEX_KIND); 00752 00753 res = pthread_mutex_init(pmutex, &attr); 00754 pthread_mutexattr_destroy(&attr); 00755 return res; 00756 }
static int ast_mutex_lock | ( | ast_mutex_t * | pmutex | ) | [inline, static] |
Definition at line 770 of file lock.h.
References __MTX_PROF.
Referenced by __action_showchannels(), __ao2_lock(), __ast_context_destroy(), __ast_key_get(), __attempt_transmit(), __auth_reject(), __auto_congest(), __auto_hangup(), __find_callno(), __get_from_jb(), __iax2_poke_noanswer(), __login_exec(), __oh323_new(), __send_lagrq(), __send_ping(), __sip_autodestruct(), __sip_destroy(), __sip_show_channels(), __unload_module(), accept_thread(), action_agent_callback_login(), action_agents(), action_waitevent(), agent_ack_sleep(), agent_call(), agent_cleanup(), agent_cont_sleep(), agent_devicestate(), agent_devicestate_cb(), agent_digit_begin(), agent_digit_end(), agent_fixup(), agent_hangup(), agent_indicate(), agent_logoff(), agent_read(), agent_request(), agent_sendhtml(), agent_sendtext(), agent_write(), agents_show(), agents_show_online(), alsa_answer(), alsa_call(), alsa_digit(), alsa_fixup(), alsa_hangup(), alsa_indicate(), alsa_read(), alsa_request(), alsa_text(), alsa_write(), announce_thread(), answer_exec_run(), ao2_lock(), app_exec(), append_mailbox_mapping(), ast_add_extension2(), ast_atomic_fetchadd_int_slow(), ast_cdr_detach(), ast_cdr_engine_init(), ast_cdr_submit_batch(), ast_cli_netstats(), ast_config_engine_deregister(), ast_config_engine_register(), ast_context_add_ignorepat2(), ast_context_add_include2(), ast_context_add_switch2(), ast_context_lockmacro(), ast_context_remove_extension_callerid2(), ast_context_remove_ignorepat2(), ast_context_remove_include2(), ast_context_remove_switch2(), ast_db_del(), ast_db_deltree(), ast_db_get(), ast_db_gettree(), ast_db_put(), ast_dial_join(), ast_dnsmgr_changed(), ast_enum_init(), ast_get_enum(), ast_get_indication_tone(), ast_get_indication_zone(), ast_get_txt(), ast_iax2_new(), ast_lock_context(), ast_lock_contexts(), ast_monitor_start(), ast_odbc_smart_execute(), ast_random(), ast_rdlock_contexts(), ast_register_indication(), ast_register_indication_country(), ast_replace_sigchld(), ast_rtp_get_bridged(), ast_rtp_get_current_formats(), ast_rtp_lookup_code(), ast_rtp_lookup_pt(), ast_rtp_pt_clear(), ast_rtp_pt_copy(), ast_rtp_pt_default(), ast_rtp_set_m_type(), ast_rtp_set_rtpmap_type(), ast_rtp_unset_m_type(), ast_sched_add_variable(), ast_sched_del(), ast_sched_runq(), ast_sched_wait(), ast_sched_when(), ast_search_dns(), ast_smdi_md_message_push(), ast_smdi_md_message_putback(), ast_smdi_mwi_message_push(), ast_smdi_mwi_message_putback(), ast_unregister_indication(), ast_unregister_indication_country(), ast_unreplace_sigchld(), ast_walk_indications(), ast_wrlock_contexts(), astman_append(), astman_verify_session_readpermissions(), astman_verify_session_writepermissions(), auth_reject(), authenticate_reply(), auto_congest(), auto_hangup(), cb_events(), channel_spy(), chanspy_ds_chan_fixup(), chanspy_ds_destroy(), chanspy_ds_free(), check_availability(), check_beep(), cl_dequeue_chan(), cl_queue_chan(), clear_config_maps(), common_exec(), complete_dpreply(), complete_sipch(), conf_free(), conf_run(), config_command(), config_pgsql(), console_answer(), console_answer_deprecated(), console_autoanswer(), console_autoanswer_deprecated(), console_dial(), console_dial_deprecated(), console_hangup(), console_hangup_deprecated(), console_sendtext(), console_sendtext_deprecated(), crypto_load(), csv_log(), custom_log(), dahdi_answer(), dahdi_bridge(), dahdi_call(), dahdi_destroy_channel_bynum(), dahdi_digit_begin(), dahdi_digit_end(), dahdi_exception(), dahdi_fixup(), dahdi_func_read(), dahdi_handle_dtmf(), dahdi_hangup(), dahdi_indicate(), dahdi_pri_error(), dahdi_pri_message(), dahdi_r2_disconnect_call(), dahdi_r2_on_call_disconnect(), dahdi_r2_on_call_end(), dahdi_r2_on_call_init(), dahdi_r2_on_call_offered(), dahdi_r2_on_hardware_alarm(), dahdi_r2_on_line_blocked(), dahdi_r2_on_line_idle(), dahdi_r2_on_protocol_error(), dahdi_request(), dahdi_restart(), dahdi_show_channel(), dahdi_show_channels(), dahdi_softhangup_all(), dahdi_unlink(), database_show(), database_showkey(), decrease_call_count(), defer_full_frame(), delete_devices(), delete_users(), destroy_all_channels(), destroy_all_mailbox_mappings(), destroy_endpoint(), destroy_monitor_audiohook(), destroy_session(), device_state_thread(), dial_trunk(), dnsmgr_refresh(), do_cdr(), do_monitor(), do_parking_thread(), do_reload(), donodelog(), dp_lookup(), dump_cmd_queues(), dump_queue(), features_answer(), features_call(), features_digit_begin(), features_digit_end(), features_fixup(), features_hangup(), features_indicate(), features_read(), features_show(), features_write(), find_cache(), find_call(), find_call_locked(), find_command(), find_engine(), find_line_by_name(), find_session(), find_subchannel_and_lock(), find_tpeer(), function_remote(), get_input(), get_sip_pvt_byid_locked(), gtalk_alloc(), gtalk_answer(), gtalk_digit(), gtalk_fixup(), gtalk_get_rtp_peer(), gtalk_hangup(), gtalk_newcall(), gtalk_read(), gtalk_set_rtp_peer(), gtalk_show_channels(), gtalk_write(), h323_reload(), handle_capabilities_res_message(), handle_deferred_full_frames(), handle_invite_replaces(), handle_line_state_req_message(), handle_mfcr2_call_files(), handle_mfcr2_set_blocked(), handle_mfcr2_set_debug(), handle_mfcr2_set_idle(), handle_mfcr2_show_channels(), handle_modlist(), handle_parkedcalls(), handle_pri_set_debug_file(), handle_pri_show_debug(), handle_pri_show_span(), handle_request(), handle_request_invite(), handle_response_invite(), handle_save_dialplan(), handle_show_globals(), iax2_bridge(), iax2_call(), iax2_canmatch(), iax2_do_register(), iax2_exec(), iax2_exists(), iax2_fixup(), iax2_hangup(), iax2_indicate(), iax2_matchmore(), iax2_poke_peer(), iax2_process_thread(), iax2_sched_add(), iax2_setoption(), iax2_show_cache(), iax2_show_channels(), iax2_show_firmware(), iax2_write(), iax_check_version(), iax_firmware_append(), iax_process_template(), iax_prov_complete_template(), iax_provision_build(), iax_provision_reload(), iax_provision_version(), iax_show_provisioning(), iax_template_parse(), increase_call_count(), load_config(), load_module(), load_rpt_vars(), lock_both(), lock_msg_q(), make_trunk(), manager_event(), manager_parking_status(), mfcr2_monitor(), mgcp_answer(), mgcp_audit_endpoint(), mgcp_call(), mgcp_devicestate(), mgcp_fixup(), mgcp_hangup(), mgcp_indicate(), mgcp_postrequest(), mgcp_read(), mgcp_reload(), mgcp_senddigit_begin(), mgcp_senddigit_end(), mgcp_show_endpoints(), mgcp_write(), mgcpsock_read(), misdn_cfg_lock(), misdn_jb_empty(), misdn_jb_fill(), misdn_overlap_dial_task(), mixmonitor_ds_chan_fixup(), mixmonitor_ds_destroy(), mixmonitor_thread(), mwi_monitor_handler(), node_lookup(), notify_extenstate_update(), odbc_load_module(), odbc_log(), odbc_obj_connect(), odbc_obj_disconnect(), odbc_unload_module(), oh323_alloc(), oh323_answer(), oh323_call(), oh323_destroy(), oh323_digit_begin(), oh323_digit_end(), oh323_fixup(), oh323_get_rtp_peer(), oh323_hangup(), oh323_indicate(), oh323_read(), oh323_request(), oh323_simulate_dtmf_end(), oh323_update_info(), oh323_write(), osp_create_transaction(), osp_get_policy(), osp_show(), osp_unload(), p2p_set_bridge(), park_exec(), park_space_reserve(), pbx_builtin_clear_globals(), pbx_builtin_getvar_helper(), pbx_builtin_pushvar_helper(), pbx_builtin_setvar_helper(), pbx_retrieve_variable(), peer_destructor(), pgsql_log(), phone_request(), pri_dchannel(), pri_fixup_principle(), pri_hangup_all(), process_events(), prune_gateways(), queue_ringing_trunk(), realtime_multi_pgsql(), realtime_pgsql(), recordthread(), register_verify(), registry_authrequest(), release_chan(), release_chan_early(), reload(), reload_agents(), reload_config(), reload_firmware(), reload_followme(), restart_monitor(), retrans_pkt(), rpt_master(), rpt_tele_thread(), run_station(), save_to_folder(), sched_context_destroy(), sched_thread(), scheduled_destroy(), scheduler_process_request_queue(), send_command_locked(), send_keypad_facility_exec(), send_provisional_keepalive_full(), send_request(), set_eventmask(), setup_chanspy_ds(), setup_dahdi(), show_keys(), sig_pri_available(), sig_pri_kill_call(), signal_condition(), sip_alloc(), sip_answer(), sip_destroy(), sip_dtmfmode(), sip_fixup(), sip_get_rtp_peer(), sip_get_udptl_peer(), sip_get_vrtp_peer(), sip_handle_t38_reinvite(), sip_hangup(), sip_indicate(), sip_new(), sip_read(), sip_reg_timeout(), sip_reinvite_retry(), sip_reload(), sip_request_call(), sip_senddigit_begin(), sip_senddigit_end(), sip_set_rtp_peer(), sip_set_udptl_peer(), sip_show_channel(), sip_show_history(), sip_transfer(), sip_write(), sipsock_read(), skinny_hangup(), skinny_read(), skinny_register(), skinny_req_parse(), skinny_reset_device(), skinny_show_devices(), skinny_show_lines(), skinny_write(), sla_destroy(), sla_handle_dial_state_event(), sla_handle_ringing_trunk_event(), sla_hangup_stations(), sla_queue_event_full(), sla_station_exec(), sla_thread(), sla_trunk_exec(), socket_process(), speech_background(), sqlite_log(), ss_thread(), ssl_lock(), start_rtp(), statechange_queue(), stop_mixmonitor_exec(), submit_unscheduled_batch(), tds_log(), timing_read(), transmit_response(), try_load_key(), unload_module(), update_pgsql(), update_registry(), verboser(), vm_execmain(), wakeup_sub(), and writefile().
00771 { 00772 __MTX_PROF(pmutex); 00773 }
static int ast_mutex_trylock | ( | ast_mutex_t * | pmutex | ) | [inline, static] |
Definition at line 775 of file lock.h.
References pthread_mutex_trylock.
Referenced by __ao2_trylock(), ao2_trylock(), ast_module_reload(), cache_get_callno_locked(), check_bridge(), dahdi_bridge(), dahdi_lock_sub_owner(), dahdi_queue_frame(), dahdi_read(), dahdi_unlink(), do_monitor(), grab_owner(), iax2_destroy(), iax2_lock_owner(), lock_both(), mgcp_queue_frame(), mgcp_queue_hangup(), network_thread(), pri_grab(), pri_hangup_all(), refresh_list(), and unload_module().
00776 { 00777 return pthread_mutex_trylock(pmutex); 00778 }
static int ast_mutex_unlock | ( | ast_mutex_t * | pmutex | ) | [inline, static] |
Definition at line 760 of file lock.h.
References pthread_mutex_unlock.
Referenced by __action_showchannels(), __ao2_unlock(), __ast_context_destroy(), __ast_key_get(), __attempt_transmit(), __auth_reject(), __auto_congest(), __auto_hangup(), __find_callno(), __get_from_jb(), __iax2_poke_noanswer(), __login_exec(), __oh323_destroy(), __oh323_new(), __oh323_rtp_create(), __send_lagrq(), __send_ping(), __sip_autodestruct(), __sip_destroy(), __unload_module(), accept_thread(), action_agent_callback_login(), action_agents(), action_setcdruserfield(), action_waitevent(), agent_ack_sleep(), agent_call(), agent_cleanup(), agent_cont_sleep(), agent_devicestate(), agent_devicestate_cb(), agent_digit_begin(), agent_digit_end(), agent_fixup(), agent_hangup(), agent_indicate(), agent_logoff(), agent_read(), agent_request(), agent_sendhtml(), agent_sendtext(), agent_write(), agents_show(), agents_show_online(), alsa_answer(), alsa_call(), alsa_digit(), alsa_fixup(), alsa_hangup(), alsa_indicate(), alsa_read(), alsa_request(), alsa_text(), alsa_write(), announce_thread(), answer_call(), answer_exec_run(), ao2_unlock(), app_exec(), append_mailbox_mapping(), ast_add_extension2(), ast_atomic_fetchadd_int_slow(), ast_cdr_detach(), ast_cdr_engine_init(), ast_cdr_submit_batch(), ast_cli_netstats(), ast_config_engine_deregister(), ast_config_engine_register(), ast_context_add_ignorepat2(), ast_context_add_include2(), ast_context_add_switch2(), ast_context_remove_extension_callerid2(), ast_context_remove_ignorepat2(), ast_context_remove_include2(), ast_context_remove_switch2(), ast_context_unlockmacro(), ast_db_del(), ast_db_deltree(), ast_db_get(), ast_db_gettree(), ast_db_put(), ast_dial_join(), ast_dnsmgr_changed(), ast_enum_init(), ast_get_enum(), ast_get_indication_tone(), ast_get_indication_zone(), ast_get_txt(), ast_iax2_new(), ast_module_reload(), ast_monitor_start(), ast_odbc_smart_execute(), ast_random(), ast_register_indication(), ast_register_indication_country(), ast_replace_sigchld(), ast_rtp_get_bridged(), ast_rtp_lookup_code(), ast_rtp_lookup_pt(), ast_rtp_pt_clear(), ast_rtp_pt_copy(), ast_rtp_pt_default(), ast_rtp_set_m_type(), ast_rtp_set_rtpmap_type(), ast_rtp_unset_m_type(), ast_sched_add_variable(), ast_sched_del(), ast_sched_runq(), ast_sched_wait(), ast_sched_when(), ast_search_dns(), ast_smdi_md_message_push(), ast_smdi_md_message_putback(), ast_smdi_mwi_message_push(), ast_smdi_mwi_message_putback(), ast_unlock_context(), ast_unlock_contexts(), ast_unregister_indication(), ast_unregister_indication_country(), ast_unreplace_sigchld(), ast_walk_indications(), astman_append(), astman_verify_session_readpermissions(), astman_verify_session_writepermissions(), asyncgoto_exec(), attempt_transfer(), auth_reject(), authenticate_reply(), auto_congest(), auto_hangup(), cache_get_callno_locked(), cb_events(), chan_ringing(), channel_spy(), chanspy_ds_chan_fixup(), chanspy_ds_destroy(), chanspy_ds_free(), check_availability(), check_beep(), check_bridge(), cl_dequeue_chan(), cl_queue_chan(), cleanup_connection(), clear_config_maps(), common_exec(), complete_ch_helper(), complete_dpreply(), conf_exec(), conf_free(), conf_run(), config_pgsql(), connection_made(), console_answer(), console_answer_deprecated(), console_autoanswer(), console_autoanswer_deprecated(), console_dial(), console_dial_deprecated(), console_hangup(), console_hangup_deprecated(), console_sendtext(), console_sendtext_deprecated(), crypto_load(), csv_log(), custom_log(), dahdi_answer(), dahdi_bridge(), dahdi_call(), dahdi_destroy_channel_bynum(), dahdi_digit_begin(), dahdi_digit_end(), dahdi_exception(), dahdi_func_read(), dahdi_handle_dtmf(), dahdi_handle_event(), dahdi_hangup(), dahdi_indicate(), dahdi_pri_error(), dahdi_pri_message(), dahdi_queue_frame(), dahdi_r2_disconnect_call(), dahdi_r2_on_call_disconnect(), dahdi_r2_on_call_end(), dahdi_r2_on_call_init(), dahdi_r2_on_call_offered(), dahdi_r2_on_hardware_alarm(), dahdi_r2_on_line_blocked(), dahdi_r2_on_line_idle(), dahdi_r2_on_protocol_error(), dahdi_read(), dahdi_request(), dahdi_restart(), dahdi_show_channel(), dahdi_show_channels(), dahdi_softhangup_all(), database_show(), database_showkey(), decrease_call_count(), defer_full_frame(), delete_users(), destroy_all_channels(), destroy_all_mailbox_mappings(), destroy_monitor_audiohook(), destroy_session(), device_state_thread(), dial_trunk(), dnsmgr_refresh(), do_cdr(), do_monitor(), do_reload(), donodelog(), dp_lookup(), dump_cmd_queues(), dump_queue(), external_rtp_create(), features_answer(), features_call(), features_digit_begin(), features_digit_end(), features_fixup(), features_hangup(), features_indicate(), features_read(), features_show(), features_write(), find_cache(), find_call_locked(), find_line_by_name(), find_session(), find_subchannel_and_lock(), function_remote(), get_input(), get_sip_pvt_byid_locked(), gtalk_alloc(), gtalk_answer(), gtalk_digit(), gtalk_fixup(), gtalk_get_rtp_peer(), gtalk_hangup(), gtalk_newcall(), gtalk_read(), gtalk_set_rtp_peer(), gtalk_show_channels(), gtalk_write(), h323_reload(), handle_capabilities_res_message(), handle_deferred_full_frames(), handle_invite_replaces(), handle_line_state_req_message(), handle_mfcr2_call_files(), handle_mfcr2_set_blocked(), handle_mfcr2_set_debug(), handle_mfcr2_set_idle(), handle_mfcr2_show_channels(), handle_modlist(), handle_parkedcalls(), handle_pri_set_debug_file(), handle_pri_show_debug(), handle_pri_show_span(), handle_request(), handle_request_invite(), handle_response_invite(), handle_save_dialplan(), handle_show_globals(), hangup_connection(), iax2_bridge(), iax2_call(), iax2_canmatch(), iax2_destroy(), iax2_do_register(), iax2_exec(), iax2_exists(), iax2_fixup(), iax2_hangup(), iax2_indicate(), iax2_matchmore(), iax2_poke_peer(), iax2_process_thread(), iax2_provision(), iax2_queue_control_data(), iax2_queue_frame(), iax2_queue_hangup(), iax2_request(), iax2_sched_add(), iax2_setoption(), iax2_show_cache(), iax2_show_channels(), iax2_show_firmware(), iax2_trunk_queue(), iax2_write(), iax_check_version(), iax_firmware_append(), iax_process_template(), iax_provision_build(), iax_provision_reload(), iax_provision_version(), iax_template_parse(), increase_call_count(), load_config(), load_module(), load_rpt_vars(), local_attended_transfer(), make_trunk(), manager_event(), manager_parking_status(), manager_play_dtmf(), mfcr2_monitor(), mgcp_answer(), mgcp_audit_endpoint(), mgcp_call(), mgcp_devicestate(), mgcp_fixup(), mgcp_hangup(), mgcp_indicate(), mgcp_postrequest(), mgcp_queue_frame(), mgcp_queue_hangup(), mgcp_read(), mgcp_reload(), mgcp_request(), mgcp_senddigit_begin(), mgcp_senddigit_end(), mgcp_show_endpoints(), mgcp_write(), mgcpsock_read(), misdn_cfg_unlock(), misdn_jb_empty(), misdn_jb_fill(), misdn_overlap_dial_task(), mixmonitor_ds_chan_fixup(), mixmonitor_ds_destroy(), mixmonitor_thread(), mwi_monitor_handler(), network_thread(), node_lookup(), notify_extenstate_update(), odbc_load_module(), odbc_log(), odbc_obj_connect(), odbc_obj_disconnect(), odbc_unload_module(), oh323_alloc(), oh323_answer(), oh323_call(), oh323_destroy(), oh323_digit_begin(), oh323_digit_end(), oh323_fixup(), oh323_get_rtp_peer(), oh323_hangup(), oh323_indicate(), oh323_read(), oh323_request(), oh323_simulate_dtmf_end(), oh323_update_info(), oh323_write(), osp_create_transaction(), osp_get_policy(), osp_show(), osp_unload(), p2p_set_bridge(), park_exec(), park_space_reserve(), pbx_builtin_clear_globals(), pbx_builtin_getvar_helper(), pbx_builtin_pushvar_helper(), pbx_builtin_setvar_helper(), pbx_retrieve_variable(), peer_destructor(), pgsql_log(), phone_request(), pri_dchannel(), pri_fixup_principle(), pri_hangup_all(), pri_rel(), process_events(), progress(), queue_ringing_trunk(), realtime_multi_pgsql(), realtime_pgsql(), receive_digit(), recordthread(), refresh_list(), register_verify(), registry_authrequest(), release_chan(), release_chan_early(), reload(), reload_agents(), reload_config(), reload_firmware(), reload_followme(), restart_monitor(), retrans_pkt(), rpt_master(), rpt_tele_thread(), run_station(), save_to_folder(), sched_context_destroy(), sched_thread(), schedule_delivery(), scheduled_destroy(), scheduler_process_request_queue(), send_command_locked(), send_keypad_facility_exec(), send_provisional_keepalive_full(), send_request(), set_dtmf_payload(), set_eventmask(), set_local_capabilities(), setup_chanspy_ds(), setup_dahdi(), setup_rtp_connection(), show_keys(), sig_pri_available(), sig_pri_kill_call(), signal_condition(), sip_alloc(), sip_answer(), sip_destroy(), sip_dtmfmode(), sip_fixup(), sip_get_rtp_peer(), sip_get_udptl_peer(), sip_get_vrtp_peer(), sip_handle_t38_reinvite(), sip_hangup(), sip_indicate(), sip_new(), sip_read(), sip_reg_timeout(), sip_reinvite_retry(), sip_reload(), sip_request_call(), sip_senddigit_begin(), sip_senddigit_end(), sip_set_rtp_peer(), sip_set_udptl_peer(), sip_transfer(), sip_write(), sipsock_read(), skinny_hangup(), skinny_read(), skinny_req_parse(), skinny_reset_device(), skinny_write(), sla_destroy(), sla_handle_dial_state_event(), sla_handle_ringing_trunk_event(), sla_hangup_stations(), sla_queue_event_full(), sla_station_exec(), sla_thread(), sla_trunk_exec(), socket_process(), softhangup_exec(), speech_background(), sqlite_log(), ss_thread(), ssl_lock(), start_rtp(), statechange_queue(), stop_mixmonitor_exec(), submit_unscheduled_batch(), tds_log(), timing_read(), transmit_response(), try_load_key(), unload_module(), unlock_both(), unlock_msg_q(), update_pgsql(), update_registry(), verboser(), vm_execmain(), wakeup_sub(), and writefile().
00761 { 00762 return pthread_mutex_unlock(pmutex); 00763 }
static int ast_rwlock_destroy | ( | ast_rwlock_t * | prwlock | ) | [inline, static] |
static int ast_rwlock_init | ( | ast_rwlock_t * | prwlock | ) | [inline, static] |
Definition at line 1179 of file lock.h.
01180 { 01181 int res; 01182 pthread_rwlockattr_t attr; 01183 01184 pthread_rwlockattr_init(&attr); 01185 01186 #ifdef HAVE_PTHREAD_RWLOCK_PREFER_WRITER_NP 01187 pthread_rwlockattr_setkind_np(&attr, PTHREAD_RWLOCK_PREFER_WRITER_NP); 01188 #endif 01189 01190 res = pthread_rwlock_init(prwlock, &attr); 01191 pthread_rwlockattr_destroy(&attr); 01192 return res; 01193 }
static int ast_rwlock_rdlock | ( | ast_rwlock_t * | prwlock | ) | [inline, static] |
Definition at line 1205 of file lock.h.
Referenced by complete_show_mancmd(), feature_interpret_helper(), feature_request_and_dial(), handle_show_http(), handle_showfeatures(), handle_showmancmd(), handle_showmancmds(), handle_uri(), process_message(), and set_config_flags().
static int ast_rwlock_timedrdlock | ( | ast_rwlock_t * | prwlock, | |
const struct timespec * | abs_timeout | |||
) | [inline, static] |
Definition at line 1210 of file lock.h.
References ast_tvnow(), and ast_tvsub().
01211 { 01212 int res; 01213 #ifdef HAVE_PTHREAD_RWLOCK_TIMEDWRLOCK 01214 res = pthread_rwlock_timedrdlock(prwlock, abs_timeout); 01215 #else 01216 struct timeval _start = ast_tvnow(), _diff; 01217 for (;;) { 01218 if (!(res = pthread_rwlock_tryrdlock(prwlock))) { 01219 break; 01220 } 01221 _diff = ast_tvsub(ast_tvnow(), _start); 01222 if (_diff.tv_sec > abs_timeout->tv_sec || (_diff.tv_sec == abs_timeout->tv_sec && _diff.tv_usec * 1000 > abs_timeout->tv_nsec)) { 01223 break; 01224 } 01225 usleep(1); 01226 } 01227 #endif 01228 return res; 01229 }
static int ast_rwlock_timedwrlock | ( | ast_rwlock_t * | prwlock, | |
const struct timespec * | abs_timeout | |||
) | [inline, static] |
Definition at line 1241 of file lock.h.
References ast_tvnow(), and ast_tvsub().
Referenced by ast_manager_register_struct(), and ast_manager_unregister().
01242 { 01243 int res; 01244 #ifdef HAVE_PTHREAD_RWLOCK_TIMEDWRLOCK 01245 res = pthread_rwlock_timedwrlock(prwlock, abs_timeout); 01246 #else 01247 do { 01248 struct timeval _start = ast_tvnow(), _diff; 01249 for (;;) { 01250 if (!(res = pthread_rwlock_trywrlock(prwlock))) { 01251 break; 01252 } 01253 _diff = ast_tvsub(ast_tvnow(), _start); 01254 if (_diff.tv_sec > abs_timeout->tv_sec || (_diff.tv_sec == abs_timeout->tv_sec && _diff.tv_usec * 1000 > abs_timeout->tv_nsec)) { 01255 break; 01256 } 01257 usleep(1); 01258 } 01259 } while (0); 01260 #endif 01261 return res; 01262 }
static int ast_rwlock_tryrdlock | ( | ast_rwlock_t * | prwlock | ) | [inline, static] |
static int ast_rwlock_trywrlock | ( | ast_rwlock_t * | prwlock | ) | [inline, static] |
static int ast_rwlock_unlock | ( | ast_rwlock_t * | prwlock | ) | [inline, static] |
Definition at line 1200 of file lock.h.
Referenced by ast_http_uri_link(), ast_http_uri_unlink(), ast_manager_register_struct(), ast_manager_unregister(), complete_show_mancmd(), feature_interpret_helper(), feature_request_and_dial(), handle_show_http(), handle_showfeatures(), handle_showmancmds(), handle_uri(), process_message(), remap_feature(), set_config_flags(), and unmap_features().
static int ast_rwlock_wrlock | ( | ast_rwlock_t * | prwlock | ) | [inline, static] |
Definition at line 1236 of file lock.h.
Referenced by ast_http_uri_link(), ast_http_uri_unlink(), remap_feature(), and unmap_features().