#include <pthread.h>
#include <time.h>
#include <sys/param.h>
#include "asterisk/logger.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, init_val, track) scope ast_rwlock_t rwlock = init_val |
| #define | __MTX_PROF(a) return pthread_mutex_lock((a)) |
| #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, AST_RWLOCK_INIT_VALUE, 1) |
| #define | AST_RWLOCK_DEFINE_STATIC_NOTRACKING(rwlock) __AST_RWLOCK_DEFINE(static, rwlock, AST_RWLOCK_INIT_VALUE_NOTRACKING, 0) |
| #define | ast_rwlock_init_notracking(a) ast_rwlock_init(a) |
| #define | AST_RWLOCK_INIT_VALUE { 0 } |
| #define | CHANNEL_DEADLOCK_AVOIDANCE(chan) |
| #define | DEADLOCK_AVOIDANCE(lock) |
| #define | DLA_LOCK(lock) ast_mutex_lock(lock) |
| #define | DLA_UNLOCK(lock) ast_mutex_unlock(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, | |||||
| init_val, | |||||
| track | ) | scope ast_rwlock_t rwlock = init_val |
| #define __MTX_PROF | ( | a | ) | return pthread_mutex_lock((a)) |
| #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 83 of file lock.h.
Referenced by __ast_verbose_ap(), __manager_event(), __unload_module(), action_waitevent(), add_notify(), ast_autoservice_start(), ast_autoservice_stop(), ast_bridge_new(), ast_cdr_submit_batch(), ast_dial_create(), ast_dial_join(), ast_log(), ast_sched_thread_create(), ast_sched_thread_destroy(), ast_smdi_interface_destroy(), ast_taskprocessor_get(), ast_tcptls_server_start(), ast_tcptls_server_stop(), bridge_channel_join(), bridge_poke(), bridge_thread(), build_calendar(), build_conf(), build_mansession(), calendar_event_notify(), close_logger(), conf_free(), conf_run(), console_verboser(), dahdi_restart(), do_reload(), generic_http_callback(), get_input(), init_pvt(), load_config(), load_module(), load_rpt_vars(), moh_class_destructor(), multiplexed_add_or_remove(), multiplexed_bridge_create(), multiplexed_nudge(), multiplexed_thread_function(), network_thread(), notify_daemon(), process_clearcache(), process_precache(), quit_handler(), restart_monitor(), rpt_master(), sla_destroy(), sla_queue_event_full(), smart_bridge_operation(), smdi_load(), stop_poll_thread(), stop_stream(), tps_taskprocessor_destroy(), and unload_module().
| #define AST_PTHREADT_STOP (pthread_t) -2 |
Definition at line 84 of file lock.h.
Referenced by __unload_module(), answer_exec_run(), ast_bridge_merge(), ast_dial_join(), ast_smdi_interface_destroy(), bridge_poke(), dahdi_restart(), monitor_dial(), multiplexed_add_or_remove(), multiplexed_thread_function(), restart_monitor(), rpt(), rpt_master(), and unload_module().
| #define AST_RWLOCK_DEFINE_STATIC | ( | rwlock | ) | __AST_RWLOCK_DEFINE(static, rwlock, AST_RWLOCK_INIT_VALUE, 1) |
| #define AST_RWLOCK_DEFINE_STATIC_NOTRACKING | ( | rwlock | ) | __AST_RWLOCK_DEFINE(static, rwlock, AST_RWLOCK_INIT_VALUE_NOTRACKING, 0) |
| #define CHANNEL_DEADLOCK_AVOIDANCE | ( | chan | ) |
Value:
ast_channel_unlock(chan); \ usleep(1); \ ast_channel_lock(chan);
Definition at line 1671 of file lock.h.
Referenced by __analog_handle_event(), ast_call_forward(), ast_do_masquerade(), bridge_queue_hangup(), bridge_write(), dahdi_bridge(), dahdi_handle_event(), dahdi_read(), dial_exec_full(), do_forward(), local_queue_frame(), manager_park(), ring_entry(), sip_hangup(), and wait_for_answer().
| #define DEADLOCK_AVOIDANCE | ( | lock | ) |
Value:
ast_mutex_unlock(lock); \ usleep(1); \ ast_mutex_lock(lock);
Definition at line 1676 of file lock.h.
Referenced by agent_logoff(), dahdi_queue_frame(), dahdi_unlink(), grab_owner(), iax2_destroy(), iax2_queue_control_data(), iax2_queue_frame(), iax2_queue_hangup(), local_hangup(), lock_both(), mgcp_queue_frame(), mgcp_queue_hangup(), oh323_simulate_dtmf_end(), set_hangup_source_and_cause(), socket_process(), wait_for_peercallno(), and wakeup_sub().
| #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 1910 of file lock.h.
Referenced by ast_pthread_create_stack(), misdn_lib_init(), 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 1893 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 1890 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 1891 of file lock.h.
Referenced by ast_mutex_unlock(), 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_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 2025 of file lock.h.
Referenced by dispose_conf(), iax2_process_thread_cleanup(), run_station(), and sla_station_exec().
| 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 2000 of file lock.h.
Referenced by __ast_channel_alloc_ap(), __ast_module_user_add(), __ast_module_user_hangup_all(), __ast_module_user_remove(), __manager_event(), acf_odbc_read(), add_subscribe_event(), admin_exec(), ao2_lock(), ao2_trylock(), ao2_unlock(), append_event(), ast_cli_command_full(), ast_dial_append(), ast_event_subscribe_new(), ast_module_ref(), ast_module_unref(), ast_odbc_request_obj2(), ast_wrlock_contexts(), authenticate_verify(), build_conf(), build_peer(), container_destruct(), container_destruct_debug(), dahdi_destroy(), dahdi_translate(), dundi_query_read(), enum_query_read(), find_idle_thread(), find_session(), find_transcoders(), grab_last(), iax2_destroy_helper(), iax2_process_thread(), iax_frame_free(), iax_frame_new(), internal_ao2_alloc(), internal_ao2_callback(), internal_ao2_container_alloc(), internal_ao2_iterator_next(), internal_ao2_link(), internal_ao2_ref(), load_realtime_queue(), ref_event(), reload_single_queue(), run_station(), sip_destroy_peer(), sip_peer_hold(), sip_register(), sip_registry_destroy(), sla_add_trunk_to_station(), sla_handle_hold_event(), sla_station_exec(), sla_trunk_exec(), smdi_msg_retrieve_read(), temp_peer(), and unref_event().
| int ast_atomic_fetchadd_int_slow | ( | volatile int * | p, | |
| int | v | |||
| ) |
Definition at line 1802 of file utils.c.
References ast_mutex_lock(), ast_mutex_unlock(), and fetchadd_m.
01803 { 01804 int ret; 01805 ast_mutex_lock(&fetchadd_m); 01806 ret = *p; 01807 *p += v; 01808 ast_mutex_unlock(&fetchadd_m); 01809 return ret; 01810 }
| static int ast_cond_broadcast | ( | ast_cond_t * | cond | ) | [inline, static] |
Definition at line 1739 of file lock.h.
References pthread_cond_broadcast.
Referenced by aji_handle_message(), ast_smdi_md_message_push(), ast_smdi_md_message_putback(), ast_smdi_mwi_message_push(), and ast_smdi_mwi_message_putback().
01740 { 01741 return pthread_cond_broadcast(cond); 01742 }
| static int ast_cond_destroy | ( | ast_cond_t * | cond | ) | [inline, static] |
Definition at line 1744 of file lock.h.
References pthread_cond_destroy.
Referenced by __unload_module(), agent_cleanup(), agent_hangup(), ast_audiohook_destroy(), ast_bridge_impart(), ast_bridge_join(), ast_sched_thread_destroy(), ast_smdi_interface_destroy(), bridge_channel_thread(), do_reload(), find_idle_thread(), get_lock(), iax2_process_thread_cleanup(), init_logger(), login_exec(), mixmonitor_free(), read_agent_config(), setup_mixmonitor_ds(), sla_destroy(), sla_handle_dial_state_event(), sla_station_exec(), tps_taskprocessor_destroy(), and unload_module().
01745 { 01746 return pthread_cond_destroy(cond); 01747 }
| static int ast_cond_init | ( | ast_cond_t * | cond, | |
| pthread_condattr_t * | cond_attr | |||
| ) | [inline, static] |
Definition at line 1729 of file lock.h.
References pthread_cond_init.
Referenced by add_agent(), add_notify(), alloc_smdi_interface(), ast_audiohook_init(), ast_autoservice_init(), ast_bridge_impart(), ast_bridge_join(), ast_device_state_engine_init(), ast_enable_distributed_devstate(), ast_sched_thread_create(), ast_taskprocessor_get(), ast_tps_init(), build_calendar(), do_reload(), find_idle_thread(), get_lock(), init_logger(), init_timing_thread(), load_module(), setup_mixmonitor_ds(), sla_handle_dial_state_event(), sla_load_config(), sla_station_exec(), and start_network_thread().
01730 { 01731 return pthread_cond_init(cond, cond_attr); 01732 }
| static int ast_cond_signal | ( | ast_cond_t * | cond | ) | [inline, static] |
Definition at line 1734 of file lock.h.
References pthread_cond_signal.
Referenced by __ast_verbose_ap(), agent_cleanup(), agent_hangup(), agent_new(), analog_ss_thread(), ast_audiohook_detach_list(), ast_audiohook_remove(), ast_audiohook_write_frame(), ast_autoservice_start(), ast_bridge_change_state(), ast_bridge_merge(), ast_devstate_changed_literal(), ast_log(), ast_sched_thread_add(), ast_sched_thread_add_variable(), ast_sched_thread_destroy(), ast_sched_thread_poke(), ast_taskprocessor_push(), audio_audiohook_write_list(), calendar_destructor(), close_logger(), conf_free(), conf_run(), devstate_change_collector_cb(), dial_trunk(), lock_broker(), mixmonitor_ds_destroy(), my_decrease_ss_count(), notify_daemon(), pthread_timer_open(), run_station(), schedule_calendar_event(), signal_condition(), sla_destroy(), sla_queue_event_full(), smart_bridge_operation(), stop_poll_thread(), submit_unscheduled_batch(), tps_ping_handler(), tps_taskprocessor_destroy(), and unload_module().
01735 { 01736 return pthread_cond_signal(cond); 01737 }
| static int ast_cond_timedwait | ( | ast_cond_t * | cond, | |
| ast_mutex_t * | t, | |||
| const struct timespec * | abstime | |||
| ) | [inline, static] |
Definition at line 1754 of file lock.h.
References pthread_cond_timedwait.
Referenced by acf_jabberreceive_read(), ast_audiohook_trigger_wait(), caldav_load_calendar(), cli_tps_ping(), do_cdr(), do_refresh(), do_timing(), exchangecal_load_calendar(), get_lock(), iax2_process_thread(), ical_load_calendar(), mb_poll_thread(), mwi_monitor_handler(), sched_run(), sla_thread(), and smdi_message_wait().
01755 { 01756 return pthread_cond_timedwait(cond, t, abstime); 01757 }
| static int ast_cond_wait | ( | ast_cond_t * | cond, | |
| ast_mutex_t * | t | |||
| ) | [inline, static] |
Definition at line 1749 of file lock.h.
References pthread_cond_wait.
Referenced by add_notify(), announce_thread(), autoservice_run(), bridge_channel_join_multithreaded(), bridge_channel_join_singlethreaded(), dahdi_restart(), do_devstate_changes(), do_timing(), find_idle_thread(), iax2_process_thread(), logger_thread(), login_exec(), mixmonitor_thread(), run_devstate_collector(), sched_run(), sla_handle_dial_state_event(), sla_station_exec(), sla_thread(), and tps_processing_function().
01750 { 01751 return pthread_cond_wait(cond, t); 01752 }
| static int ast_mutex_destroy | ( | ast_mutex_t * | pmutex | ) | [inline, static] |
Definition at line 1712 of file lock.h.
References pthread_mutex_destroy.
Referenced by __oh323_destroy(), __unload_module(), agent_cleanup(), agent_hangup(), ast_audiohook_destroy(), ast_bridge_impart(), ast_bridge_join(), ast_dial_destroy(), ast_dnsmgr_release(), ast_sched_thread_destroy(), ast_smdi_interface_destroy(), ast_speech_destroy(), ast_speech_new(), auth_http_callback(), bridge_channel_thread(), bridge_hangup(), build_device(), build_gateway(), close_client(), conf_free(), destroy_conference_bridge(), destroy_dahdi_pvt(), destroy_endpoint(), destroy_session(), find_idle_thread(), find_realtime(), free_config(), generic_http_callback(), get_lock(), iax2_process_thread_cleanup(), internal_ao2_ref(), local_pvt_destroy(), login_exec(), misdn_cfg_destroy(), misdn_jb_destroy(), mixmonitor_free(), odbc_obj_destructor(), read_agent_config(), release_chan(), release_chan_early(), reload_config(), sched_context_destroy(), session_do(), session_instance_destructor(), setup_mixmonitor_ds(), sla_destroy(), sla_handle_dial_state_event(), sla_station_exec(), softmix_bridge_leave(), timing_read(), tps_taskprocessor_destroy(), unalloc_sub(), and unload_module().
01713 { 01714 return pthread_mutex_destroy(pmutex); 01715 }
| static int ast_mutex_init | ( | ast_mutex_t * | pmutex | ) | [inline, static] |
Definition at line 1692 of file lock.h.
References AST_MUTEX_KIND, and pthread_mutex_init.
Referenced by accept_thread(), add_agent(), add_notify(), alloc_profile(), alloc_smdi_interface(), alloc_sub(), ast_audiohook_init(), ast_bridge_impart(), ast_bridge_join(), ast_context_find_or_create(), ast_dial_create(), ast_dnsmgr_get(), ast_enable_distributed_devstate(), ast_odbc_request_obj2(), ast_sched_thread_create(), ast_speech_new(), ast_ssl_init(), ast_taskprocessor_get(), ast_tcptls_client_create(), ast_tcptls_server_root(), auth_http_callback(), bridge_request(), build_conf(), build_device(), build_gateway(), caldav_load_calendar(), conf_run(), config_device(), config_line(), config_parse_variables(), create_client(), dahdi_restart(), duplicate_pseudo(), exchangecal_load_calendar(), find_idle_thread(), find_tpeer(), generic_http_callback(), get_lock(), gtalk_alloc(), ical_load_calendar(), init_timing_thread(), internal_ao2_alloc(), jingle_alloc(), join_conference_bridge(), load_config(), load_module(), local_alloc(), misdn_cfg_init(), misdn_jb_init(), mkintf(), oh323_alloc(), read_config(), rpt_master(), sched_context_create(), session_do(), setup_mixmonitor_ds(), skinny_new(), sla_handle_dial_state_event(), sla_load_config(), sla_station_exec(), softmix_bridge_join(), start_network_thread(), and store_config().
01693 { 01694 int res; 01695 pthread_mutexattr_t attr; 01696 01697 pthread_mutexattr_init(&attr); 01698 pthread_mutexattr_settype(&attr, AST_MUTEX_KIND); 01699 01700 res = pthread_mutex_init(pmutex, &attr); 01701 pthread_mutexattr_destroy(&attr); 01702 return res; 01703 }
| static int ast_mutex_lock | ( | ast_mutex_t * | pmutex | ) | [inline, static] |
Definition at line 1717 of file lock.h.
References __MTX_PROF.
Referenced by __attempt_transmit(), __auth_reject(), __auto_congest(), __auto_hangup(), __find_callno(), __get_from_jb(), __iax2_poke_noanswer(), __oh323_new(), __send_lagrq(), __send_ping(), __unload_module(), _sip_tcp_helper_thread(), acf_channel_read(), acf_channel_write(), acf_jabberreceive_read(), action_agents(), action_dahdishowchannels(), add_notify(), agent_ack_sleep(), agent_call(), agent_cont_sleep(), agent_devicestate(), agent_digit_begin(), agent_digit_end(), agent_fixup(), agent_hangup(), agent_indicate(), agent_logoff(), agent_new(), agent_read(), agent_request(), agent_sendhtml(), agent_sendtext(), agent_write(), agents_show(), agents_show_online(), aji_handle_message(), alsa_answer(), alsa_call(), alsa_digit(), alsa_fixup(), alsa_hangup(), alsa_indicate(), alsa_read(), alsa_request(), alsa_text(), alsa_write(), analog_ss_thread(), announce_thread(), answer_exec_run(), ao2_lock(), aoro2_obj_cb(), app_exec(), append_mailbox_mapping(), ast_atomic_fetchadd_int_slow(), ast_bridge_change_state(), ast_bridge_merge(), ast_cdr_detach(), ast_cdr_engine_init(), ast_cdr_submit_batch(), ast_cel_report_event(), ast_cli_netstats(), ast_config_engine_deregister(), ast_config_engine_register(), ast_context_lockmacro(), ast_db_del(), ast_db_deltree(), ast_db_get(), ast_db_gettree(), ast_db_put(), ast_dial_join(), ast_dnsmgr_changed(), ast_get_enum(), ast_iax2_new(), ast_monitor_start(), ast_random(), ast_replace_sigchld(), ast_sched_add_variable(), ast_sched_del(), ast_sched_dump(), ast_sched_report(), ast_sched_runq(), ast_sched_thread_add(), ast_sched_thread_add_variable(), ast_sched_thread_destroy(), ast_sched_thread_poke(), 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_taskprocessor_push(), ast_unreplace_sigchld(), auth_reject(), authenticate_reply(), auto_hangup(), blr_ebl(), blr_txt(), bridge_channel_join_multithreaded(), bridge_channel_join_singlethreaded(), bridge_hangup(), bridge_write(), build_device(), build_profile(), caldav_load_calendar(), cb_events(), cdr_handler(), check_availability(), check_beep(), cl_dequeue_chan(), cl_queue_chan(), clear_config_maps(), cli_tps_ping(), close_client(), conf_free(), conf_run(), config_device(), config_handler(), config_line(), config_load(), config_pgsql(), console_answer(), console_autoanswer(), console_dial(), console_hangup(), console_sendtext(), create_client(), csv_log(), custom_log(), dahdi_answer(), dahdi_call(), dahdi_destroy_channel_bynum(), dahdi_digit_begin(), dahdi_digit_end(), dahdi_exception(), dahdi_fixup(), dahdi_func_read(), dahdi_func_write(), dahdi_handle_dtmfup(), dahdi_hangup(), dahdi_indicate(), dahdi_new(), dahdi_queue_frame(), dahdi_request(), dahdi_restart(), dahdi_set_dnd(), dahdi_set_hwgain(), dahdi_set_swgain(), dahdi_show_channel(), dahdi_show_channels(), dahdi_softhangup_all(), dahdi_unlink(), decrease_call_count(), defer_full_frame(), delete_users(), destroy_all_channels(), destroy_all_mailbox_mappings(), destroy_endpoint(), destroy_pgsql(), devstate_change_collector_cb(), dial_trunk(), dnsmgr_refresh(), do_cdr(), do_monitor(), do_refresh(), do_reload(), do_timing(), donodelog(), dp_lookup(), dump_cmd_queues(), dump_queue(), exchangecal_load_calendar(), find_call_locked(), find_channel(), find_command(), find_engine(), find_idle_thread(), find_subchannel_and_lock(), find_subchannel_by_name(), find_table(), find_tpeer(), function_remote(), get_input(), get_lock(), gethostbyname_r(), 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_cli_core_show_config_mappings(), handle_cli_database_show(), handle_cli_database_showkey(), handle_cli_dialplan_save(), handle_cli_iax2_show_channels(), handle_cli_iax2_show_stats(), handle_cli_odbc_show(), handle_cli_osp_show(), handle_deferred_full_frames(), handle_mgcp_audit_endpoint(), handle_mgcp_show_endpoints(), handle_modlist(), handle_register_message(), handle_request(), handle_request_do(), handle_speechrecognize(), hidthread(), iax2_answer(), iax2_bridge(), iax2_call(), iax2_do_register(), iax2_fixup(), iax2_hangup(), iax2_indicate(), iax2_key_rotate(), iax2_poke_peer(), iax2_process_thread(), iax2_setoption(), iax2_write(), iax_process_template(), iax_prov_complete_template(), iax_provision_build(), iax_provision_free_templates(), iax_provision_version(), iax_show_provisioning(), iax_template_parse(), ical_load_calendar(), increase_call_count(), jingle_alloc(), jingle_answer(), jingle_digit(), jingle_fixup(), jingle_get_rtp_peer(), jingle_hangup(), jingle_newcall(), jingle_read(), jingle_set_rtp_peer(), jingle_show_channels(), jingle_write(), key_main_page(), key_select_extension(), leave_voicemail(), load_config(), load_module(), load_rpt_vars(), local_answer(), local_bridgedchannel(), local_digit_begin(), local_digit_end(), local_fixup(), local_hangup(), local_indicate(), local_queue_frame(), local_sendhtml(), local_sendtext(), local_write(), locals_show(), lock_both(), lock_broker(), lock_msg_q(), log_jitterstats(), login_exec(), lua_free_extensions(), lua_load_extensions(), lua_reload_extensions(), make_trunk(), mansession_lock(), mb_poll_thread(), mgcp_answer(), mgcp_call(), mgcp_devicestate(), mgcp_fixup(), mgcp_hangup(), mgcp_indicate(), mgcp_postrequest(), mgcp_read(), mgcp_reload(), mgcp_senddigit_begin(), mgcp_senddigit_end(), mgcp_write(), mgcpsock_read(), misdn_cfg_lock(), misdn_jb_empty(), misdn_jb_fill(), misdn_overlap_dial_task(), mixmonitor_ds_close_fs(), mixmonitor_ds_destroy(), mixmonitor_thread(), mwi_monitor_handler(), my_decrease_ss_count(), my_handle_dtmfup(), my_increase_ss_count(), my_lock_private(), node_lookup(), notify_daemon(), odbc_obj_connect(), odbc_obj_disconnect(), 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_provider(), osp_create_transaction(), osp_get_provider(), osp_unload(), parse_config(), parsing(), peer_destructor(), pgsql_log(), phone_request(), play_sound_file(), private_enum_init(), prune_gateways(), pthread_timer_open(), pvt_destructor(), queue_ringing_trunk(), radio_tune(), rcv_mac_addr(), realtime_destroy_handler(), realtime_handler(), realtime_ldap_base_ap(), realtime_multi_handler(), realtime_multi_pgsql(), realtime_pgsql(), realtime_store_handler(), realtime_update2_handler(), realtime_update_handler(), recordthread(), register_verify(), registry_authrequest(), release_chan(), release_chan_early(), reload(), reload_config(), reload_followme(), require_pgsql(), restart_monitor(), retrans_pkt(), rpt_master(), rpt_tele_thread(), run_devstate_collector(), run_station(), save_to_folder(), sched_context_destroy(), sched_run(), schedule_calendar_event(), scheduled_destroy(), send_client(), send_command_locked(), send_request(), send_retransmit(), set_config(), set_pvt_defaults(), setup_dahdi(), signal_condition(), sip_reload(), sip_tcptls_write(), skinny_get_rtp_peer(), skinny_hangup(), skinny_read(), skinny_req_parse(), skinny_write(), sla_check_reload(), 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(), smart_bridge_operation(), socket_process(), softmix_bridge_poke(), softmix_bridge_thread(), softmix_bridge_write(), speech_background(), sqlite3_log(), sqlite_log(), start_rtp(), statpost(), stop_poll_thread(), store_config(), store_pgsql(), submit_unscheduled_batch(), syslog_log(), tds_load_module(), tds_log(), tds_unload_module(), timing_read(), tps_ping_handler(), tps_processing_function(), tps_taskprocessor_destroy(), tps_taskprocessor_pop(), transmit_frame(), transmit_response(), tune_write(), unistim_fixup(), unistim_hangup(), unistim_info(), unistim_new(), unistim_read(), unistim_register(), unistim_reload(), unistim_write(), unistimsock_read(), unload_module(), update2_ldap(), update2_pgsql(), update_ldap(), update_pgsql(), update_registry(), verboser(), vm_execmain(), and writefile().
01718 { 01719 __MTX_PROF(pmutex); 01720 }
| static int ast_mutex_trylock | ( | ast_mutex_t * | pmutex | ) | [inline, static] |
Definition at line 1722 of file lock.h.
References pthread_mutex_trylock.
Referenced by ao2_trylock(), ast_cli_perms_init(), ast_module_reload(), bridge_queue_hangup(), bridge_write(), cache_get_callno_locked(), check_bridge(), dahdi_bridge(), dahdi_read(), dahdi_unlink(), do_monitor(), local_call(), local_queue_frame(), lock_both(), refresh_list(), and unload_module().
01723 { 01724 return pthread_mutex_trylock(pmutex); 01725 }
| static int ast_mutex_unlock | ( | ast_mutex_t * | pmutex | ) | [inline, static] |
Definition at line 1707 of file lock.h.
References pthread_mutex_unlock.
Referenced by __attempt_transmit(), __auth_reject(), __auto_congest(), __auto_hangup(), __find_callno(), __get_from_jb(), __iax2_poke_noanswer(), __oh323_destroy(), __oh323_new(), __oh323_rtp_create(), __send_lagrq(), __send_ping(), __unload_module(), _sip_tcp_helper_thread(), acf_channel_read(), acf_channel_write(), acf_jabberreceive_read(), action_agents(), action_dahdishowchannels(), add_notify(), agent_ack_sleep(), agent_call(), agent_cont_sleep(), agent_devicestate(), agent_digit_begin(), agent_digit_end(), agent_fixup(), agent_hangup(), agent_indicate(), agent_logoff(), agent_new(), agent_read(), agent_request(), agent_sendhtml(), agent_sendtext(), agent_write(), agents_show(), agents_show_online(), aji_handle_message(), alsa_answer(), alsa_call(), alsa_digit(), alsa_fixup(), alsa_hangup(), alsa_indicate(), alsa_read(), alsa_request(), alsa_text(), alsa_write(), analog_ss_thread(), announce_thread(), answer_call(), answer_exec_run(), ao2_unlock(), aoro2_obj_cb(), app_exec(), append_mailbox_mapping(), ast_atomic_fetchadd_int_slow(), ast_bridge_change_state(), ast_bridge_merge(), ast_cdr_detach(), ast_cdr_engine_init(), ast_cdr_submit_batch(), ast_cel_report_event(), ast_cli_netstats(), ast_cli_perms_init(), ast_config_engine_deregister(), ast_config_engine_register(), 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_get_enum(), ast_iax2_new(), ast_module_reload(), ast_monitor_start(), ast_random(), ast_replace_sigchld(), ast_sched_add_variable(), ast_sched_del(), ast_sched_dump(), ast_sched_report(), ast_sched_runq(), ast_sched_thread_add(), ast_sched_thread_add_variable(), ast_sched_thread_destroy(), ast_sched_thread_poke(), 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_taskprocessor_push(), ast_unreplace_sigchld(), auth_reject(), authenticate_reply(), auto_hangup(), blr_ebl(), blr_txt(), bridge_channel_join_multithreaded(), bridge_channel_join_singlethreaded(), bridge_hangup(), bridge_queue_hangup(), bridge_write(), build_device(), build_profile(), cache_get_callno_locked(), caldav_load_calendar(), cb_events(), cdr_handler(), chan_ringing(), check_availability(), check_beep(), check_bridge(), cl_dequeue_chan(), cl_queue_chan(), cleanup_connection(), clear_config_maps(), cli_tps_ping(), close_client(), conf_free(), conf_run(), config_device(), config_handler(), config_line(), config_load(), config_pgsql(), connection_made(), console_answer(), console_autoanswer(), console_dial(), console_hangup(), console_sendtext(), create_client(), 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_func_write(), dahdi_handle_dtmfup(), dahdi_hangup(), dahdi_indicate(), dahdi_new(), dahdi_queue_frame(), dahdi_read(), dahdi_request(), dahdi_restart(), dahdi_set_dnd(), dahdi_set_hwgain(), dahdi_set_swgain(), dahdi_show_channel(), dahdi_show_channels(), dahdi_softhangup_all(), dahdi_unlink(), decrease_call_count(), defer_full_frame(), delete_users(), destroy_all_channels(), destroy_all_mailbox_mappings(), destroy_endpoint(), destroy_pgsql(), devstate_change_collector_cb(), dial_trunk(), dnsmgr_refresh(), do_cdr(), do_monitor(), do_refresh(), do_reload(), do_timing(), donodelog(), dp_lookup(), dump_cmd_queues(), dump_queue(), exchangecal_load_calendar(), external_rtp_create(), find_cache(), find_call_locked(), find_channel(), find_command(), find_engine(), find_idle_thread(), find_subchannel_and_lock(), find_subchannel_by_name(), find_table(), function_remote(), get_input(), get_lock(), gethostbyname_r(), 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_cli_core_show_config_mappings(), handle_cli_database_show(), handle_cli_database_showkey(), handle_cli_dialplan_save(), handle_cli_iax2_show_channels(), handle_cli_iax2_show_stats(), handle_cli_odbc_show(), handle_cli_osp_show(), handle_deferred_full_frames(), handle_mgcp_audit_endpoint(), handle_mgcp_show_endpoints(), handle_modlist(), handle_register_message(), handle_request(), handle_request_do(), handle_speechrecognize(), hangup_connection(), hidthread(), iax2_answer(), iax2_bridge(), iax2_call(), iax2_do_register(), iax2_fixup(), iax2_hangup(), iax2_indicate(), iax2_key_rotate(), iax2_poke_peer(), iax2_process_thread(), iax2_provision(), iax2_request(), iax2_setoption(), iax2_trunk_queue(), iax2_write(), iax_process_template(), iax_prov_complete_template(), iax_provision_build(), iax_provision_free_templates(), iax_provision_version(), iax_show_provisioning(), iax_template_parse(), ical_load_calendar(), increase_call_count(), jingle_alloc(), jingle_answer(), jingle_digit(), jingle_fixup(), jingle_get_rtp_peer(), jingle_hangup(), jingle_newcall(), jingle_read(), jingle_set_rtp_peer(), jingle_show_channels(), jingle_write(), key_main_page(), key_select_extension(), ldap_loadentry(), leave_voicemail(), load_config(), load_module(), load_rpt_vars(), local_answer(), local_bridgedchannel(), local_call(), local_digit_begin(), local_digit_end(), local_fixup(), local_hangup(), local_indicate(), local_queue_frame(), local_sendhtml(), local_sendtext(), local_write(), locals_show(), lock_broker(), log_jitterstats(), login_exec(), lua_free_extensions(), lua_load_extensions(), lua_reload_extensions(), make_trunk(), mansession_unlock(), mb_poll_thread(), mgcp_answer(), mgcp_call(), mgcp_devicestate(), mgcp_fixup(), mgcp_hangup(), mgcp_indicate(), mgcp_postrequest(), mgcp_read(), mgcp_reload(), mgcp_request(), mgcp_senddigit_begin(), mgcp_senddigit_end(), mgcp_write(), mgcpsock_read(), misdn_cfg_unlock(), misdn_jb_empty(), misdn_jb_fill(), misdn_overlap_dial_task(), mixmonitor_ds_close_fs(), mixmonitor_ds_destroy(), mixmonitor_thread(), mwi_monitor_handler(), my_decrease_ss_count(), my_handle_dtmfup(), my_increase_ss_count(), my_unlock_private(), node_lookup(), notify_daemon(), odbc_obj_connect(), odbc_obj_disconnect(), 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_provider(), osp_create_transaction(), osp_get_provider(), osp_unload(), parse_config(), parsing(), peer_destructor(), pgsql_log(), phone_request(), play_sound_file(), private_enum_init(), progress(), prune_gateways(), pthread_timer_open(), pvt_destructor(), queue_ringing_trunk(), radio_tune(), rcv_mac_addr(), realtime_destroy_handler(), realtime_handler(), realtime_ldap_base_ap(), realtime_multi_handler(), realtime_multi_pgsql(), realtime_pgsql(), realtime_store_handler(), realtime_update2_handler(), realtime_update_handler(), receive_digit(), recordthread(), refresh_list(), register_verify(), registry_authrequest(), release_chan(), release_chan_early(), reload(), reload_config(), reload_followme(), remote_hold(), require_pgsql(), restart_monitor(), retrans_pkt(), rpt_master(), rpt_tele_thread(), run_devstate_collector(), run_station(), save_to_folder(), sched_context_destroy(), sched_run(), schedule_calendar_event(), scheduled_destroy(), send_client(), send_command_locked(), send_request(), send_retransmit(), set_config(), set_dtmf_payload(), set_local_capabilities(), set_peer_capabilities(), set_pvt_defaults(), setup_dahdi(), setup_rtp_connection(), signal_condition(), sip_reload(), sip_tcptls_write(), skinny_get_rtp_peer(), skinny_hangup(), skinny_read(), skinny_req_parse(), skinny_write(), sla_check_reload(), 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(), smart_bridge_operation(), socket_process(), socket_process_meta(), softmix_bridge_poke(), softmix_bridge_thread(), softmix_bridge_write(), speech_background(), sqlite3_log(), sqlite_log(), start_rtp(), statpost(), stop_poll_thread(), store_config(), store_pgsql(), submit_unscheduled_batch(), syslog_log(), tds_load_module(), tds_log(), tds_unload_module(), timing_read(), tps_ping_handler(), tps_processing_function(), tps_taskprocessor_destroy(), tps_taskprocessor_pop(), transmit_frame(), transmit_response(), tune_write(), unistim_fixup(), unistim_hangup(), unistim_info(), unistim_new(), unistim_read(), unistim_register(), unistim_reload(), unistim_write(), unistimsock_read(), unload_module(), unlock_both(), unlock_msg_q(), update2_ldap(), update2_pgsql(), update_ldap(), update_pgsql(), update_registry(), verboser(), vm_execmain(), and writefile().
01708 { 01709 return pthread_mutex_unlock(pmutex); 01710 }
| static int ast_rwlock_destroy | ( | ast_rwlock_t * | prwlock | ) | [inline, static] |
Definition at line 1786 of file lock.h.
Referenced by __ast_internal_context_destroy(), ast_hashtab_destroy(), ast_hashtab_destroylock(), ast_heap_destroy(), and destroy_table().
| static int ast_rwlock_init | ( | ast_rwlock_t * | prwlock | ) | [inline, static] |
Definition at line 1770 of file lock.h.
Referenced by ast_context_find_or_create(), ast_hashtab_create(), ast_hashtab_dup(), ast_hashtab_initlock(), ast_heap_create(), and find_table().
01771 { 01772 int res; 01773 pthread_rwlockattr_t attr; 01774 01775 pthread_rwlockattr_init(&attr); 01776 01777 #ifdef HAVE_PTHREAD_RWLOCK_PREFER_WRITER_NP 01778 pthread_rwlockattr_setkind_np(&attr, PTHREAD_RWLOCK_PREFER_WRITER_NP); 01779 #endif 01780 01781 res = pthread_rwlock_init(prwlock, &attr); 01782 pthread_rwlockattr_destroy(&attr); 01783 return res; 01784 }
| static int ast_rwlock_rdlock | ( | ast_rwlock_t * | prwlock | ) | [inline, static] |
Definition at line 1796 of file lock.h.
Referenced by ast_calendar_config_acquire(), ast_hashtab_get_stats(), ast_hashtab_lookup(), ast_hashtab_lookup_with_hash(), ast_hashtab_rdlock(), ast_hashtab_start_traversal(), ast_heap_rdlock(), ast_rdlock_call_features(), ast_rdlock_context(), ast_rdlock_contexts(), ast_str_retrieve_variable(), feature_interpret_helper(), feature_request_and_dial(), find_table(), get_active_pvt(), handle_feature_show(), handle_show_globals(), manager_log(), pbx_builtin_getvar_helper(), and set_config_flags().
| static int ast_rwlock_timedrdlock | ( | ast_rwlock_t * | prwlock, | |
| const struct timespec * | abs_timeout | |||
| ) | [inline, static] |
Definition at line 1801 of file lock.h.
References ast_tvnow(), and ast_tvsub().
01802 { 01803 int res; 01804 #ifdef HAVE_PTHREAD_RWLOCK_TIMEDWRLOCK 01805 res = pthread_rwlock_timedrdlock(prwlock, abs_timeout); 01806 #else 01807 struct timeval _start = ast_tvnow(), _diff; 01808 for (;;) { 01809 if (!(res = pthread_rwlock_tryrdlock(prwlock))) { 01810 break; 01811 } 01812 _diff = ast_tvsub(ast_tvnow(), _start); 01813 if (_diff.tv_sec > abs_timeout->tv_sec || (_diff.tv_sec == abs_timeout->tv_sec && _diff.tv_usec * 1000 > abs_timeout->tv_nsec)) { 01814 break; 01815 } 01816 usleep(1); 01817 } 01818 #endif 01819 return res; 01820 }
| static int ast_rwlock_timedwrlock | ( | ast_rwlock_t * | prwlock, | |
| const struct timespec * | abs_timeout | |||
| ) | [inline, static] |
Definition at line 1832 of file lock.h.
References ast_tvnow(), and ast_tvsub().
01833 { 01834 int res; 01835 #ifdef HAVE_PTHREAD_RWLOCK_TIMEDWRLOCK 01836 res = pthread_rwlock_timedwrlock(prwlock, abs_timeout); 01837 #else 01838 do { 01839 struct timeval _start = ast_tvnow(), _diff; 01840 for (;;) { 01841 if (!(res = pthread_rwlock_trywrlock(prwlock))) { 01842 break; 01843 } 01844 _diff = ast_tvsub(ast_tvnow(), _start); 01845 if (_diff.tv_sec > abs_timeout->tv_sec || (_diff.tv_sec == abs_timeout->tv_sec && _diff.tv_usec * 1000 > abs_timeout->tv_nsec)) { 01846 break; 01847 } 01848 usleep(1); 01849 } 01850 } while (0); 01851 #endif 01852 return res; 01853 }
| 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 1791 of file lock.h.
Referenced by ast_calendar_config_acquire(), ast_calendar_config_release(), ast_hashtab_destroy(), ast_hashtab_end_traversal(), ast_hashtab_get_stats(), ast_hashtab_insert_immediate(), ast_hashtab_insert_safe(), ast_hashtab_lookup(), ast_hashtab_lookup_with_hash(), ast_hashtab_remove_object_via_lookup(), ast_hashtab_remove_this_object(), ast_hashtab_unlock(), ast_heap_unlock(), ast_str_retrieve_variable(), ast_unlock_call_features(), ast_unlock_context(), ast_unlock_contexts(), destroy_pvts(), destroy_table(), feature_interpret_helper(), feature_request_and_dial(), get_active_pvt(), handle_feature_show(), handle_show_globals(), load_config(), load_tech_calendars(), manager_log(), pbx_builtin_clear_globals(), pbx_builtin_getvar_helper(), pbx_builtin_pushvar_helper(), pbx_builtin_setvar_helper(), remap_feature(), set_active(), set_config_flags(), and unmap_features().
| static int ast_rwlock_wrlock | ( | ast_rwlock_t * | prwlock | ) | [inline, static] |
Definition at line 1827 of file lock.h.
Referenced by ast_hashtab_destroy(), ast_hashtab_insert_immediate(), ast_hashtab_insert_safe(), ast_hashtab_remove_object_via_lookup(), ast_hashtab_remove_this_object(), ast_hashtab_start_write_traversal(), ast_hashtab_wrlock(), ast_heap_wrlock(), ast_wrlock_context(), ast_wrlock_contexts(), destroy_pvts(), destroy_table(), load_config(), load_tech_calendars(), pbx_builtin_clear_globals(), pbx_builtin_pushvar_helper(), pbx_builtin_setvar_helper(), remap_feature(), set_active(), and unmap_features().
1.5.6