Wed Oct 28 15:49:04 2009

Asterisk developer's documentation


lock.h File Reference

General Asterisk channel locking definitions. More...

#include <pthread.h>
#include <netdb.h>
#include <time.h>
#include <sys/param.h>
#include "asterisk/logger.h"
#include "asterisk/inline_api.h"

Include dependency graph for lock.h:

Go to the source code of this file.

Defines

#define __AST_MUTEX_DEFINE(scope, mutex)   scope ast_mutex_t mutex = AST_MUTEX_INIT_VALUE
#define AST_MUTEX_DEFINE_EXPORTED(mutex)   __AST_MUTEX_DEFINE(/**/,mutex)
#define AST_MUTEX_DEFINE_STATIC(mutex)   __AST_MUTEX_DEFINE(static,mutex)
#define AST_MUTEX_INIT_VALUE   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 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_wait_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

Functions

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)
 AST_INLINE_API (int ast_atomic_fetchadd_int(volatile int *p, int v),{return ast_atomic_fetchadd_int_slow(p, v);}) AST_INLINE_API(int ast_atomic_dec_and_test(volatile int *p)
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)


Detailed Description

General Asterisk channel locking definitions.

Definition in file lock.h.


Define Documentation

#define __AST_MUTEX_DEFINE ( scope,
mutex   )     scope ast_mutex_t mutex = AST_MUTEX_INIT_VALUE

Definition at line 596 of file lock.h.

#define AST_MUTEX_DEFINE_EXPORTED ( mutex   )     __AST_MUTEX_DEFINE(/**/,mutex)

Definition at line 660 of file lock.h.

#define AST_MUTEX_DEFINE_STATIC ( mutex   )     __AST_MUTEX_DEFINE(static,mutex)

Definition at line 659 of file lock.h.

#define AST_MUTEX_INIT_VALUE   PTHREAD_MUTEX_INIT_VALUE

Definition at line 525 of file lock.h.

#define AST_MUTEX_INITIALIZER   __use_AST_MUTEX_DEFINE_STATIC_rather_than_AST_MUTEX_INITIALIZER__

Definition at line 662 of file lock.h.

#define AST_MUTEX_KIND   PTHREAD_MUTEX_RECURSIVE

Definition at line 63 of file lock.h.

Referenced by ast_mutex_init().

#define ast_pthread_mutex_init ( pmutex,
 )     pthread_mutex_init(pmutex,a)

Definition at line 538 of file lock.h.

#define AST_PTHREADT_NULL   (pthread_t) -1

#define AST_PTHREADT_STOP   (pthread_t) -2

Definition at line 34 of file lock.h.

Referenced by __unload_module(), restart_monitor(), rpt(), rpt_master(), and unload_module().

#define gethostbyname   __gethostbyname__is__not__reentrant__use__ast_gethostbyname__instead__

Definition at line 664 of file lock.h.

Referenced by connect_asterisk().

#define pthread_cond_broadcast   use_ast_cond_broadcast_instead_of_pthread_cond_broadcast

Definition at line 655 of file lock.h.

Referenced by ast_cond_broadcast().

#define pthread_cond_destroy   use_ast_cond_destroy_instead_of_pthread_cond_destroy

Definition at line 653 of file lock.h.

Referenced by ast_cond_destroy().

#define pthread_cond_init   use_ast_cond_init_instead_of_pthread_cond_init

Definition at line 652 of file lock.h.

Referenced by ast_cond_init().

#define pthread_cond_signal   use_ast_cond_signal_instead_of_pthread_cond_signal

Definition at line 654 of file lock.h.

Referenced by ast_cond_signal().

#define pthread_cond_t   use_ast_cond_t_instead_of_pthread_cond_t

Definition at line 651 of file lock.h.

#define pthread_cond_timedwait   use_ast_cond_wait_instead_of_pthread_cond_timedwait

Definition at line 657 of file lock.h.

Referenced by ast_cond_timedwait().

#define pthread_cond_wait   use_ast_cond_wait_instead_of_pthread_cond_wait

Definition at line 656 of file lock.h.

Referenced by ast_cond_wait().

#define pthread_create   __use_ast_pthread_create_instead__

Definition at line 666 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

Definition at line 650 of file lock.h.

Referenced by ast_mutex_destroy(), and dlcompat_cleanup().

#define pthread_mutex_init   use_ast_mutex_init_instead_of_pthread_mutex_init

Definition at line 649 of file lock.h.

Referenced by ast_mutex_init(), and dlcompat_init_func().

#define PTHREAD_MUTEX_INIT_VALUE   PTHREAD_MUTEX_INITIALIZER

Definition at line 62 of file lock.h.

#define pthread_mutex_lock   use_ast_mutex_lock_instead_of_pthread_mutex_lock

Definition at line 646 of file lock.h.

Referenced by ast_mutex_lock(), and dolock().

#define pthread_mutex_t   use_ast_mutex_t_instead_of_pthread_mutex_t

Definition at line 645 of file lock.h.

#define pthread_mutex_trylock   use_ast_mutex_trylock_instead_of_pthread_mutex_trylock

Definition at line 648 of file lock.h.

Referenced by ast_mutex_trylock().

#define pthread_mutex_unlock   use_ast_mutex_unlock_instead_of_pthread_mutex_unlock

Definition at line 647 of file lock.h.

Referenced by ast_mutex_unlock(), and dounlock().


Typedef Documentation

typedef pthread_cond_t ast_cond_t

Definition at line 611 of file lock.h.

typedef pthread_mutex_t ast_mutex_t

Definition at line 528 of file lock.h.


Function Documentation

int ast_atomic_fetchadd_int_slow ( volatile int *  p,
int  v 
)

Definition at line 933 of file utils.c.

References ast_mutex_lock(), and ast_mutex_unlock().

00934 {
00935         int ret;
00936         ast_mutex_lock(&fetchadd_m);
00937         ret = *p;
00938         *p += v;
00939         ast_mutex_unlock(&fetchadd_m);
00940         return ret;
00941 }

static int ast_cond_broadcast ( ast_cond_t cond  )  [inline, static]

Definition at line 623 of file lock.h.

References pthread_cond_broadcast.

00624 {
00625    return pthread_cond_broadcast(cond);
00626 }

static int ast_cond_destroy ( ast_cond_t cond  )  [inline, static]

Definition at line 628 of file lock.h.

References pthread_cond_destroy.

Referenced by ast_channel_spy_free(), do_reload(), and unload_module().

00629 {
00630    return pthread_cond_destroy(cond);
00631 }

static int ast_cond_init ( ast_cond_t cond,
pthread_condattr_t *  cond_attr 
) [inline, static]

Definition at line 613 of file lock.h.

References pthread_cond_init.

Referenced by ast_channel_spy_add(), ast_device_state_engine_init(), do_reload(), and mkbrd().

00614 {
00615    return pthread_cond_init(cond, cond_attr);
00616 }

static int ast_cond_signal ( ast_cond_t cond  )  [inline, static]

static int ast_cond_timedwait ( ast_cond_t cond,
ast_mutex_t t,
const struct timespec *  abstime 
) [inline, static]

Definition at line 638 of file lock.h.

References pthread_cond_timedwait.

Referenced by ast_channel_spy_trigger_wait(), and do_cdr().

00639 {
00640    return pthread_cond_timedwait(cond, t, abstime);
00641 }

static int ast_cond_wait ( ast_cond_t cond,
ast_mutex_t t 
) [inline, static]

Definition at line 633 of file lock.h.

References pthread_cond_wait.

Referenced by do_devstate_changes().

00634 {
00635    return pthread_cond_wait(cond, t);
00636 }

AST_INLINE_API ( int   ast_atomic_fetchadd_intvolatile int *p, int v  )  volatile

static int ast_mutex_destroy ( ast_mutex_t pmutex  )  [inline, static]

static int ast_mutex_init ( ast_mutex_t pmutex  )  [inline, static]

Definition at line 530 of file lock.h.

References AST_MUTEX_KIND, and pthread_mutex_init.

Referenced by accept_thread(), add_agent(), alloc_queue(), ao2_alloc(), ast_channel_alloc(), ast_context_create(), build_device(), build_gateway(), chandup(), channel_spy(), features_alloc(), find_tpeer(), launch_monitor_thread(), load_module(), local_alloc(), misdn_jb_init(), mkbrd(), mkif(), mkintf(), new_odbc_obj(), oh323_alloc(), read_config(), rpt_master(), sched_context_create(), and sip_alloc().

00531 {
00532    pthread_mutexattr_t attr;
00533    pthread_mutexattr_init(&attr);
00534    pthread_mutexattr_settype(&attr, AST_MUTEX_KIND);
00535    return pthread_mutex_init(pmutex, &attr);
00536 }

static int ast_mutex_lock ( ast_mutex_t pmutex  )  [inline, static]

Definition at line 599 of file lock.h.

References pthread_mutex_lock.

Referenced by __ast_cli_generator(), __ast_context_destroy(), __ast_key_get(), __iax2_show_peers(), __load_resource(), __login_exec(), __oh323_destroy(), __oh323_new(), __queues_show(), __sip_ack(), __sip_destroy(), __sip_show_channels(), __unload_module(), abort_request(), accept_thread(), action_agent_callback_login(), action_agents(), action_listcommands(), action_zapshowchannels(), add_to_queue(), agent_ack_sleep(), agent_call(), agent_cont_sleep(), agent_devicestate(), agent_digit(), agent_fixup(), agent_hangup(), agent_indicate(), agent_new(), agent_read(), agent_request(), agent_sendhtml(), agent_sendtext(), agent_write(), agentmonitoroutgoing_exec(), agents_show(), alsa_answer(), alsa_call(), alsa_digit(), alsa_fixup(), alsa_hangup(), alsa_indicate(), alsa_new(), alsa_read(), alsa_request(), alsa_text(), alsa_write(), ao2_lock(), aopen_decusecnt(), aopen_incusecnt(), ast_activate_generator(), ast_active_channels(), ast_add_extension2(), ast_add_hint(), ast_answer(), ast_async_goto(), ast_atomic_fetchadd_int_slow(), ast_autoservice_start(), ast_autoservice_stop(), ast_begin_shutdown(), ast_call(), ast_cdr_detach(), ast_cdr_engine_init(), ast_cdr_submit_batch(), ast_change_hint(), ast_channel_alloc(), ast_channel_free(), ast_channel_masquerade(), ast_channel_register(), ast_channel_unregister(), ast_check_hangup_locked(), ast_cli_command(), ast_cli_netstats(), ast_cli_register(), ast_cli_unregister(), ast_config_engine_deregister(), ast_config_engine_register(), ast_context_add_ignorepat2(), ast_context_add_include2(), ast_context_add_switch2(), ast_context_create(), ast_context_find(), ast_context_remove_extension2(), ast_context_remove_ignorepat2(), ast_context_remove_include2(), ast_context_remove_switch2(), ast_custom_function_find(), ast_custom_function_register(), ast_custom_function_unregister(), ast_db_del(), ast_db_deltree(), ast_db_get(), ast_db_gettree(), ast_db_put(), ast_deactivate_generator(), ast_do_masquerade(), ast_enum_init(), ast_extension_state_add(), ast_extension_state_del(), ast_filehelper(), ast_format_register(), ast_format_unregister(), ast_frame_header_new(), ast_frfree(), ast_get_channel_tech(), ast_get_enum(), ast_get_indication_tone(), ast_get_indication_zone(), ast_get_txt(), ast_hangup(), ast_hint_extension(), ast_hint_state_changed(), ast_iax2_new(), ast_image_register(), ast_image_unregister(), ast_indicate(), ast_loader_register(), ast_loader_unregister(), ast_localtime(), ast_lock_context(), ast_lock_contexts(), ast_log(), ast_manager_register_struct(), ast_manager_unregister(), ast_merge_contexts_and_delete(), ast_mktime(), ast_modem_new(), ast_module_helper(), ast_module_reload(), ast_moh_destroy(), ast_monitor_change_fname(), ast_monitor_start(), ast_monitor_stop(), ast_osp_lookup(), ast_osp_validate(), ast_park_call(), ast_pbx_outgoing_app(), ast_pbx_outgoing_exten(), ast_queue_frame(), ast_queue_log(), ast_read(), ast_read_image(), ast_readfile(), ast_register_application(), ast_register_atexit(), ast_register_indication(), ast_register_indication_country(), ast_register_switch(), ast_register_translator(), ast_register_verbose(), ast_remove_hint(), ast_request(), ast_resource_exists(), ast_rtp_bridge(), ast_run_atexits(), ast_safe_system(), ast_sched_add_variable(), ast_sched_del(), ast_sched_runq(), ast_sched_wait(), ast_sched_when(), ast_search_dns(), ast_softhangup(), ast_transfer(), ast_translator_best_choice(), ast_unload_resource(), ast_unregister_application(), ast_unregister_atexit(), ast_unregister_indication(), ast_unregister_indication_country(), ast_unregister_switch(), ast_unregister_translator(), ast_unregister_verbose(), ast_update_use_count(), ast_verbose(), ast_verbose_dmesg(), ast_waitfor_nandfds(), ast_write(), ast_writefile(), attempt_reconnect(), attempt_transmit(), au_close(), au_open(), au_rewrite(), auth_fail(), auth_reject(), authenticate_reply(), authenticate_request(), authenticate_verify(), auto_congest(), auto_hangup(), autoservice_run(), bestdata_decusecnt(), bestdata_incusecnt(), build_peer(), build_transactions(), build_user(), cache_get_callno_locked(), cancel_request(), cb_events(), cb_extensionstate(), changethread(), channel_find_locked(), channel_spy(), check_access(), check_availability(), check_beep(), check_request(), cl_dequeue_chan(), cl_queue_chan(), clear_config_maps(), cli_files_show(), close_logger(), compare_weight(), complete_dpreply(), complete_iax2_show_peer(), complete_peer_helper(), complete_queue(), complete_remove_queue_member(), complete_show_application(), complete_show_function(), complete_show_mancmd(), complete_sipch(), complete_transfer(), config_command(), config_load(), console_answer(), console_autoanswer(), console_dial(), console_hangup(), console_sendtext(), create_addr(), crypto_load(), database_show(), database_showkey(), decrease_call_count(), delete_aliases(), delete_devices(), delete_users(), destroy_endpoint(), destroy_odbc_obj(), destroy_peer(), destroy_session(), discover_transactions(), do_cdr(), do_chanreads(), do_monitor(), do_parking_thread(), do_reload(), dp_lookup(), dump_cmd_queues(), dump_queue(), 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_answer(), features_call(), features_digit(), features_fixup(), features_hangup(), features_indicate(), features_new(), features_read(), features_show(), features_write(), find_cache(), find_call(), find_call_locked(), find_callno(), find_command(), find_engine(), find_peer(), find_queue_by_name_rt(), find_subchannel_and_lock(), find_subchannel_by_name(), find_tpeer(), find_transcoders(), find_user(), func_header_read(), function_autopatchdn(), function_autopatchup(), function_ilink(), function_sipchaninfo_read(), g723_close(), g723_open(), g723_rewrite(), g726_16_open(), g726_16_rewrite(), g726_24_open(), g726_24_rewrite(), g726_32_open(), g726_32_rewrite(), g726_40_open(), g726_40_rewrite(), g726_close(), g729_close(), g729_open(), g729_rewrite(), get_from_jb(), get_input(), get_member_status(), get_sip_pvt_byid_locked(), gmtsub(), grab_owner(), gsm_close(), gsm_open(), gsm_rewrite(), h263_close(), h263_open(), h263_rewrite(), h323_reload(), handle_link_data(), handle_link_phone_dtmf(), handle_logger_show_channels(), handle_message(), handle_modlist(), handle_parkedcalls(), handle_request(), handle_request_invite(), handle_request_subscribe(), handle_save_dialplan(), handle_show_application(), handle_show_applications(), handle_show_functions(), handle_show_hints(), handle_show_indications(), handle_show_switches(), handle_showmancmd(), handle_showmancmds(), handle_showmanconn(), i4l_decusecnt(), i4l_incusecnt(), iax2_bridge(), iax2_call(), iax2_canmatch(), iax2_destroy(), iax2_destroy_helper(), iax2_destroy_nolock(), iax2_exec(), iax2_exists(), iax2_fixup(), iax2_getpeername(), iax2_getpeertrunk(), iax2_hangup(), iax2_indicate(), iax2_matchmore(), iax2_poke_peer(), iax2_predestroy(), iax2_predestroy_nolock(), iax2_provision(), iax2_queue_frame(), iax2_register(), iax2_request(), iax2_show_cache(), iax2_show_channels(), iax2_show_firmware(), iax2_show_registry(), iax2_show_users(), iax2_transmit(), 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(), ilbc_close(), ilbc_open(), ilbc_rewrite(), increase_call_count(), init_logger_chain(), interface_exists_global(), join_queue(), leave_queue(), load_config(), load_module(), load_realtime_queue(), local_alloc(), local_answer(), local_ast_moh_start(), local_call(), local_channel_walk(), local_digit(), local_fixup(), local_get_channel_begin_name(), local_hangup(), local_indicate(), local_new(), local_queue_frame(), local_sendhtml(), local_write(), locals_show(), lock_both(), make_trunk(), manager_event(), manager_parking_status(), manager_queues_status(), mark_mappings(), mark_peers(), mgcp_answer(), mgcp_audit_endpoint(), mgcp_call(), mgcp_fixup(), mgcp_hangup(), mgcp_indicate(), mgcp_new(), mgcp_postrequest(), mgcp_queue_frame(), mgcp_queue_hangup(), mgcp_read(), mgcp_reload(), mgcp_senddigit(), mgcp_show_endpoints(), mgcp_write(), mgcpsock_read(), misdn_cfg_lock(), misdn_jb_empty(), misdn_jb_fill(), misdn_overlap_dial_task(), mixmonitor_thread(), modem_hangup(), modem_request(), moh_classes_show(), moh_register(), moh_release(), mohalloc(), monitor_handle_owned(), monmp3thread(), nbs_new(), network_thread(), odbc_load_module(), odbc_log(), odbc_obj_connect(), odbc_obj_disconnect(), odbc_prepare_and_execute(), odbc_sanity_check(), odbc_smart_direct_execute(), odbc_unload_module(), ogg_vorbis_close(), ogg_vorbis_open(), ogg_vorbis_rewrite(), oh323_alloc(), oh323_answer(), oh323_call(), oh323_destroy(), oh323_digit(), oh323_fixup(), oh323_hangup(), oh323_indicate(), oh323_read(), oh323_request(), oh323_update_info(), oh323_write(), optimize_transactions(), osp_build(), oss_hangup(), oss_new(), park_exec(), parse_config(), pbx_builtin_clear_globals(), pbx_builtin_getvar_helper(), pbx_builtin_pushvar_helper(), pbx_builtin_setvar_helper(), pbx_extension_helper(), pbx_findapp(), pbx_findswitch(), pbx_retrieve_variable(), pcm_close(), pcm_open(), pcm_rewrite(), pgsql_log(), phone_check_exception(), phone_hangup(), phone_new(), phone_request(), precache_transactions(), process_message(), process_precache(), prune_gateways(), prune_mappings(), prune_peers(), prune_users(), query_transactions(), queue_frame_to_spies(), queue_function_qac(), read_agent_config(), realtime_peer(), realtime_user(), recalc_holdtime(), record_abandoned(), register_request(), register_verify(), release_chan(), reload_agents(), reload_config(), reload_firmware(), reload_logger(), reload_queue_members(), reload_queues(), remove_from_queue(), remove_queue(), reschedule_precache(), resend_with_token(), reset_user_pw(), restart_monitor(), retrans_pkt(), ring_entry(), rpt(), rpt_call(), rpt_exec(), rpt_tele_thread(), rpt_telemetry(), sched_context_destroy(), send_command_locked(), send_lagrq(), send_ping(), send_request(), sendtext_exec(), session_do(), set_config(), set_eventmask(), set_format(), set_member_paused(), setrdnis_exec(), setup_zap(), show_channeltypes(), show_file_formats(), show_keys(), show_osp(), show_transcoder(), show_translation(), sip_addheader(), sip_alloc(), sip_answer(), sip_destroy(), sip_dtmfmode(), sip_fixup(), sip_get_rtp_peer(), sip_get_vrtp_peer(), sip_getheader(), sip_hangup(), sip_indicate(), sip_new(), sip_park(), sip_park_thread(), sip_read(), sip_reload(), sip_request_call(), sip_senddigit(), sip_set_rtp_peer(), sip_show_channel(), sip_show_history(), sip_transfer(), sip_write(), sipsock_read(), skinny_hangup(), skinny_new(), skinny_read(), skinny_register(), skinny_show_devices(), skinny_show_lines(), skinny_write(), slinear_close(), slinear_open(), slinear_rewrite(), socket_read(), spy_detach(), spy_generate(), sqlite_log(), start_rtp(), start_spying(), startmon(), submit_unscheduled_batch(), tds_log(), test_for_thread_safety(), test_thread_body(), thread_safe_rand(), timing_read(), transmit_response(), try_calling(), try_load_key(), unload_module(), unregister_request(), update_queue(), update_status(), usecount(), verboser(), vnak_retransmit(), vox_close(), vox_open(), vox_rewrite(), vpb_answer(), vpb_bridge(), vpb_call(), vpb_digit(), vpb_fixup(), vpb_hangup(), vpb_indicate(), vpb_new(), vpb_request(), vpb_write(), wakeup_sub(), wav_close(), wav_open(), wav_rewrite(), zap_destroy(), zap_framein(), zap_queue_frame(), zap_show_channel(), zap_show_channels(), zt_answer(), zt_bridge(), zt_call(), zt_digit(), zt_exception(), zt_fixup(), zt_handle_event(), zt_hangup(), zt_indicate(), zt_new(), zt_read(), zt_request(), zt_unlink(), and zt_write().

00600 {
00601    return pthread_mutex_lock(pmutex);
00602 }

static int ast_mutex_trylock ( ast_mutex_t pmutex  )  [inline, static]

static int ast_mutex_unlock ( ast_mutex_t pmutex  )  [inline, static]

Definition at line 540 of file lock.h.

References pthread_mutex_unlock.

Referenced by __ast_cli_generator(), __ast_context_destroy(), __ast_key_get(), __iax2_show_peers(), __load_resource(), __login_exec(), __oh323_destroy(), __oh323_new(), __queues_show(), __sip_ack(), __sip_destroy(), __sip_show_channels(), __unload_module(), abort_request(), accept_thread(), action_agent_callback_login(), action_agents(), action_getvar(), action_hangup(), action_listcommands(), action_redirect(), action_setcdruserfield(), action_setvar(), action_status(), action_timeout(), action_zapshowchannels(), add_to_queue(), agent_ack_sleep(), agent_call(), agent_cleanup(), agent_cont_sleep(), agent_devicestate(), agent_digit(), agent_fixup(), agent_hangup(), agent_indicate(), agent_new(), agent_read(), agent_request(), agent_sendhtml(), agent_sendtext(), agent_write(), agentmonitoroutgoing_exec(), agents_show(), alsa_answer(), alsa_call(), alsa_digit(), alsa_fixup(), alsa_hangup(), alsa_indicate(), alsa_new(), alsa_read(), alsa_request(), alsa_text(), alsa_write(), answer_call(), ao2_unlock(), aopen_decusecnt(), aopen_incusecnt(), ast_activate_generator(), ast_active_channels(), ast_add_extension2(), ast_add_hint(), ast_answer(), ast_async_goto(), ast_async_goto_by_name(), ast_atomic_fetchadd_int_slow(), ast_autoservice_start(), ast_autoservice_stop(), ast_begin_shutdown(), ast_call(), ast_cdr_detach(), ast_cdr_engine_init(), ast_cdr_submit_batch(), ast_change_hint(), ast_channel_alloc(), ast_channel_free(), ast_channel_masquerade(), ast_channel_register(), ast_channel_unregister(), ast_check_hangup_locked(), ast_cli_command(), ast_cli_netstats(), ast_cli_register(), ast_cli_unregister(), ast_config_engine_deregister(), ast_config_engine_register(), ast_context_add_ignorepat2(), ast_context_add_include2(), ast_context_add_switch2(), ast_context_create(), ast_context_find(), ast_context_remove_extension2(), ast_context_remove_ignorepat2(), ast_context_remove_include2(), ast_context_remove_switch2(), ast_custom_function_find(), ast_custom_function_register(), ast_custom_function_unregister(), ast_db_del(), ast_db_deltree(), ast_db_get(), ast_db_gettree(), ast_db_put(), ast_deactivate_generator(), ast_do_masquerade(), ast_enum_init(), ast_extension_state_add(), ast_extension_state_del(), ast_filehelper(), ast_format_register(), ast_format_unregister(), ast_frame_header_new(), ast_frfree(), ast_get_channel_tech(), ast_get_enum(), ast_get_indication_tone(), ast_get_indication_zone(), ast_get_txt(), ast_hangup(), ast_hint_extension(), ast_hint_state_changed(), ast_iax2_new(), ast_image_register(), ast_image_unregister(), ast_indicate(), ast_loader_register(), ast_loader_unregister(), ast_localtime(), ast_log(), ast_manager_register_struct(), ast_manager_unregister(), ast_merge_contexts_and_delete(), ast_mktime(), ast_modem_new(), ast_module_helper(), ast_module_reload(), ast_moh_destroy(), ast_monitor_change_fname(), ast_monitor_start(), ast_monitor_stop(), ast_osp_lookup(), ast_osp_validate(), ast_park_call(), ast_parse_device_state(), ast_pbx_outgoing_app(), ast_pbx_outgoing_exten(), ast_pickup_call(), ast_queue_frame(), ast_queue_hangup(), ast_queue_log(), ast_read(), ast_read_image(), ast_readfile(), ast_register_application(), ast_register_atexit(), ast_register_indication(), ast_register_indication_country(), ast_register_switch(), ast_register_translator(), ast_register_verbose(), ast_remove_hint(), ast_request(), ast_resource_exists(), ast_rtp_bridge(), ast_run_atexits(), ast_safe_system(), ast_sched_add_variable(), ast_sched_del(), ast_sched_runq(), ast_sched_wait(), ast_sched_when(), ast_search_dns(), ast_softhangup(), ast_transfer(), ast_translator_best_choice(), ast_unload_resource(), ast_unlock_context(), ast_unlock_contexts(), ast_unregister_application(), ast_unregister_atexit(), ast_unregister_indication(), ast_unregister_indication_country(), ast_unregister_switch(), ast_unregister_translator(), ast_unregister_verbose(), ast_update_module_list(), ast_update_use_count(), ast_verbose(), ast_verbose_dmesg(), ast_waitfor_nandfds(), ast_write(), ast_writefile(), attempt_reconnect(), attempt_transfer(), attempt_transmit(), au_close(), au_open(), au_rewrite(), auth_fail(), auth_reject(), authenticate_reply(), authenticate_request(), authenticate_verify(), auto_congest(), auto_hangup(), autoservice_run(), bestdata_decusecnt(), bestdata_incusecnt(), build_peer(), build_transactions(), build_user(), cache_get_callno_locked(), cancel_request(), cb_events(), cb_extensionstate(), chan_ringing(), change_monitor_action(), changethread(), channel_find_locked(), channel_spy(), check_access(), check_availability(), check_beep(), check_bridge(), check_request(), cl_dequeue_chan(), cl_queue_chan(), cleanup_connection(), clear_config_maps(), cli_files_show(), close_logger(), compare_weight(), complete_ch_helper(), complete_dpreply(), complete_iax2_show_peer(), complete_peer_helper(), complete_queue(), complete_remove_queue_member(), complete_show_application(), complete_show_function(), complete_show_mancmd(), complete_sipch(), complete_transfer(), conf_exec(), config_command(), config_load(), connection_made(), console_answer(), console_autoanswer(), console_dial(), console_hangup(), console_sendtext(), create_addr(), crypto_load(), database_show(), database_showkey(), decrease_call_count(), delete_aliases(), delete_devices(), delete_users(), destroy_endpoint(), destroy_odbc_obj(), destroy_peer(), destroy_session(), discover_transactions(), do_cdr(), do_chanreads(), do_monitor(), do_parking_thread(), do_reload(), dp_lookup(), dump_cmd_queues(), dump_queue(), 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(), external_rtp_create(), fast_originate(), features_alloc(), features_answer(), features_call(), features_digit(), features_fixup(), features_hangup(), features_indicate(), features_new(), features_read(), features_show(), features_write(), find_cache(), find_call(), find_call_locked(), find_callno(), find_command(), find_engine(), find_peer(), find_queue_by_name_rt(), find_subchannel_and_lock(), find_subchannel_by_name(), find_tpeer(), find_transcoders(), find_user(), func_header_read(), function_autopatchdn(), function_autopatchup(), function_ilink(), function_sipchaninfo_read(), g723_close(), g723_open(), g723_rewrite(), g726_16_open(), g726_16_rewrite(), g726_24_open(), g726_24_rewrite(), g726_32_open(), g726_32_rewrite(), g726_40_open(), g726_40_rewrite(), g726_close(), g729_close(), g729_open(), g729_rewrite(), get_callerid(), get_from_jb(), get_input(), get_member_status(), get_sip_pvt_byid_locked(), gmtsub(), grab_owner(), gsm_close(), gsm_open(), gsm_rewrite(), h263_close(), h263_open(), h263_rewrite(), h323_reload(), handle_chanlist(), handle_channelstatus(), handle_debugchan(), handle_getvariablefull(), handle_hangup(), handle_link_data(), handle_link_phone_dtmf(), handle_logger_show_channels(), handle_message(), handle_modlist(), handle_nodebugchan(), handle_parkedcalls(), handle_request(), handle_request_invite(), handle_request_refer(), handle_request_subscribe(), handle_save_dialplan(), handle_show_application(), handle_show_applications(), handle_show_functions(), handle_show_hints(), handle_show_indications(), handle_show_switches(), handle_showchan(), handle_showmancmd(), handle_showmancmds(), handle_showmanconn(), handle_softhangup(), hangup_connection(), i4l_decusecnt(), i4l_incusecnt(), iax2_bridge(), iax2_call(), iax2_canmatch(), iax2_destroy(), iax2_destroy_helper(), iax2_destroy_nolock(), iax2_exec(), iax2_exists(), iax2_fixup(), iax2_getpeername(), iax2_getpeertrunk(), iax2_hangup(), iax2_indicate(), iax2_matchmore(), iax2_poke_peer(), iax2_predestroy(), iax2_predestroy_nolock(), iax2_provision(), iax2_queue_frame(), iax2_register(), iax2_request(), iax2_show_cache(), iax2_show_channels(), iax2_show_firmware(), iax2_show_registry(), iax2_show_users(), iax2_transmit(), iax2_trunk_queue(), 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(), ilbc_close(), ilbc_open(), ilbc_rewrite(), increase_call_count(), init_logger_chain(), interface_exists_global(), join_queue(), leave_queue(), load_config(), load_module(), load_realtime_queue(), local_alloc(), local_answer(), local_ast_moh_start(), local_call(), local_channel_walk(), local_digit(), local_fixup(), local_get_channel_begin_name(), local_hangup(), local_indicate(), local_new(), local_queue_frame(), local_sendhtml(), local_write(), locals_show(), lock_both(), make_trunk(), manager_event(), manager_parking_status(), manager_queues_status(), mark_mappings(), mark_peers(), mgcp_answer(), mgcp_audit_endpoint(), mgcp_call(), mgcp_fixup(), mgcp_hangup(), mgcp_indicate(), mgcp_new(), mgcp_postrequest(), mgcp_queue_frame(), mgcp_queue_hangup(), mgcp_read(), mgcp_reload(), mgcp_request(), mgcp_senddigit(), mgcp_show_endpoints(), mgcp_write(), mgcpsock_read(), misdn_cfg_unlock(), misdn_jb_empty(), misdn_jb_fill(), misdn_overlap_dial_task(), mixmonitor_cli(), mixmonitor_thread(), modem_hangup(), modem_request(), moh_classes_show(), moh_on_off(), moh_register(), moh_release(), mohalloc(), monitor_handle_owned(), monmp3thread(), nbs_new(), network_thread(), odbc_load_module(), odbc_log(), odbc_obj_connect(), odbc_obj_disconnect(), odbc_prepare_and_execute(), odbc_sanity_check(), odbc_smart_direct_execute(), odbc_unload_module(), ogg_vorbis_close(), ogg_vorbis_open(), ogg_vorbis_rewrite(), oh323_alloc(), oh323_answer(), oh323_call(), oh323_destroy(), oh323_digit(), oh323_fixup(), oh323_hangup(), oh323_indicate(), oh323_read(), oh323_request(), oh323_rtp_read(), oh323_update_info(), oh323_write(), optimize_transactions(), osp_build(), oss_hangup(), oss_new(), park_exec(), parse_config(), pbx_builtin_clear_globals(), pbx_builtin_getvar_helper(), pbx_builtin_importvar(), pbx_builtin_pushvar_helper(), pbx_builtin_setvar_helper(), pbx_extension_helper(), pbx_findapp(), pbx_findswitch(), pbx_retrieve_variable(), pcm_close(), pcm_open(), pcm_rewrite(), pgsql_log(), phone_check_exception(), phone_hangup(), phone_new(), phone_request(), pickup_exec(), precache_transactions(), process_message(), process_precache(), progress(), prune_gateways(), prune_mappings(), prune_peers(), prune_users(), query_transactions(), queue_frame_to_spies(), queue_function_qac(), read_agent_config(), realtime_peer(), realtime_user(), recalc_holdtime(), record_abandoned(), refresh_list(), register_request(), register_verify(), release_chan(), reload_agents(), reload_config(), reload_firmware(), reload_logger(), reload_queue_members(), reload_queues(), remove_from_queue(), remove_queue(), reschedule_precache(), resend_with_token(), reset_user_pw(), restart_monitor(), retrans_pkt(), ring_entry(), rpt(), rpt_call(), rpt_exec(), rpt_tele_thread(), rpt_telemetry(), sched_context_destroy(), send_command_locked(), send_digit(), send_lagrq(), send_ping(), send_request(), sendtext_exec(), session_do(), set_config(), set_dtmf_payload(), set_eventmask(), set_format(), set_local_capabilities(), set_member_paused(), setrdnis_exec(), setup_rtp_connection(), setup_zap(), show_channeltypes(), show_file_formats(), show_keys(), show_osp(), show_transcoder(), show_translation(), sip_addheader(), sip_alloc(), sip_answer(), sip_destroy(), sip_dtmfmode(), sip_fixup(), sip_get_rtp_peer(), sip_get_vrtp_peer(), sip_getheader(), sip_hangup(), sip_indicate(), sip_new(), sip_park(), sip_park_thread(), sip_read(), sip_reload(), sip_request_call(), sip_senddigit(), sip_set_rtp_peer(), sip_show_channel(), sip_show_history(), sip_transfer(), sip_write(), sipsock_read(), skinny_hangup(), skinny_new(), skinny_read(), skinny_register(), skinny_show_devices(), skinny_show_lines(), skinny_write(), slinear_close(), slinear_open(), slinear_rewrite(), socket_read(), softhangup_exec(), spy_detach(), spy_generate(), sqlite_log(), start_monitor_action(), start_rtp(), start_spying(), startmon(), stop_monitor_action(), submit_unscheduled_batch(), tds_log(), test_for_thread_safety(), test_thread_body(), thread_safe_rand(), timing_read(), transmit_response(), try_calling(), try_load_key(), unload_module(), unlock_both(), unregister_request(), update_queue(), update_status(), usecount(), verboser(), vnak_retransmit(), vox_close(), vox_open(), vox_rewrite(), vpb_answer(), vpb_bridge(), vpb_call(), vpb_digit(), vpb_fixup(), vpb_hangup(), vpb_indicate(), vpb_new(), vpb_request(), vpb_write(), wakeup_sub(), wav_close(), wav_open(), wav_rewrite(), zap_destroy(), zap_framein(), zap_queue_frame(), zap_show_channel(), zap_show_channels(), zt_answer(), zt_bridge(), zt_call(), zt_digit(), zt_exception(), zt_fixup(), zt_handle_event(), zt_hangup(), zt_indicate(), zt_new(), zt_read(), zt_request(), zt_unlink(), and zt_write().

00541 {
00542    return pthread_mutex_unlock(pmutex);
00543 }


Generated on Wed Oct 28 15:49:04 2009 for Asterisk - the Open Source PBX by  doxygen 1.5.6