/*
 *  This file is automatically generated by gen_interface.pl from evpath.h.
 *
 *  DO NOT EDIT
 *
 */
#include "config.h"
#include "stdio.h"
#include "string.h"
#include "stdlib.h"
#include "ffs.h"
#ifdef HAVE_COD_H
#include "cod.h"
#endif
#include "atl.h"
#include "evpath.h"
#include "cm_internal.h"
#include "ev_dfg.h"
#include "ev_dfg_internal.h"
#ifdef  __cplusplus
extern "C" {
#endif

extern int
CMCondition_get ( CManager cm, CMConnection dep )
{
	int ret;
	CManager_lock(cm);
	ret = INT_CMCondition_get(cm, dep);
	CManager_unlock(cm);
	return ret;
}

extern void*
CMCondition_get_client_data ( CManager cm, int condition )
{
	void* ret;
	CManager_lock(cm);
	ret = INT_CMCondition_get_client_data(cm, condition);
	CManager_unlock(cm);
	return ret;
}

extern int
CMCondition_has_failed ( CManager cm, int condition )
{
	int ret;
	CManager_lock(cm);
	ret = INT_CMCondition_has_failed(cm, condition);
	CManager_unlock(cm);
	return ret;
}

extern int
CMCondition_has_signaled ( CManager cm, int condition )
{
	int ret;
	CManager_lock(cm);
	ret = INT_CMCondition_has_signaled(cm, condition);
	CManager_unlock(cm);
	return ret;
}

extern void
CMCondition_set_client_data ( CManager cm, int condition, void *client_data )
{
	CManager_lock(cm);
	INT_CMCondition_set_client_data(cm, condition, client_data);
	CManager_unlock(cm);
}

extern void
CMCondition_signal ( CManager cm, int condition )
{
	CManager_lock(cm);
	INT_CMCondition_signal(cm, condition);
	CManager_unlock(cm);
}

extern int
CMCondition_wait ( CManager cm, int condition )
{
	int ret;
	CManager_lock(cm);
	ret = INT_CMCondition_wait(cm, condition);
	CManager_unlock(cm);
	return ret;
}

extern void
CMConnection_add_reference ( CMConnection conn )
{
	CManager cm = conn->cm;
	CManager_lock(cm);
	INT_CMConnection_add_reference(conn);
	CManager_unlock(cm);
}

extern void
CMConnection_close ( CMConnection conn )
{
	CManager cm = conn->cm;
	CManager_lock(cm);
	INT_CMConnection_close(conn);
	CManager_unlock(cm);
}

extern void
CMConnection_dereference ( CMConnection conn )
{
	CManager cm = conn->cm;
	CManager_lock(cm);
	INT_CMConnection_dereference(conn);
	CManager_unlock(cm);
}

extern attr_list
CMConnection_get_attrs ( CMConnection conn )
{
	attr_list ret;
	CManager cm = conn->cm;
	CManager_lock(cm);
	ret = INT_CMConnection_get_attrs(conn);
	CManager_unlock(cm);
	return ret;
}

extern int
CMConnection_set_character ( CMConnection conn, attr_list attrs )
{
	int ret;
	CManager cm = conn->cm;
	CManager_lock(cm);
	ret = INT_CMConnection_set_character(conn, attrs);
	CManager_unlock(cm);
	return ret;
}

extern int
CMConnection_write_would_block ( CMConnection conn )
{
	int ret;
	CManager cm = conn->cm;
	CManager_lock(cm);
	ret = INT_CMConnection_write_would_block(conn);
	CManager_unlock(cm);
	return ret;
}

extern void
CMTrace_file_id ( int ID )
{
	INT_CMTrace_file_id(ID);
}

extern void
CM_fd_add_select ( CManager cm, SOCKET fd, select_func handler_func, void *param1, void *param2 )
{
	CManager_lock(cm);
	INT_CM_fd_add_select(cm, fd, handler_func, param1, param2);
	CManager_unlock(cm);
}

extern void
CM_insert_contact_info ( CManager cm, attr_list attrs )
{
	CManager_lock(cm);
	INT_CM_insert_contact_info(cm, attrs);
	CManager_unlock(cm);
}

extern CMTaskHandle
CMadd_delayed_task ( CManager cm, int secs, int usecs, CMPollFunc func, void *client_data )
{
	CMTaskHandle ret;
	CManager_lock(cm);
	ret = INT_CMadd_delayed_task(cm, secs, usecs, func, client_data);
	CManager_unlock(cm);
	return ret;
}

extern CMTaskHandle
CMadd_periodic ( CManager cm, long period, CMPollFunc func, void *client_data )
{
	CMTaskHandle ret;
	CManager_lock(cm);
	ret = INT_CMadd_periodic(cm, period, func, client_data);
	CManager_unlock(cm);
	return ret;
}

extern CMTaskHandle
CMadd_periodic_task ( CManager cm, int period_sec, int period_usec, CMPollFunc func, void *client_data )
{
	CMTaskHandle ret;
	CManager_lock(cm);
	ret = INT_CMadd_periodic_task(cm, period_sec, period_usec, func, client_data);
	CManager_unlock(cm);
	return ret;
}

extern void
CMadd_poll ( CManager cm, CMPollFunc func, void *client_data )
{
	CManager_lock(cm);
	INT_CMadd_poll(cm, func, client_data);
	CManager_unlock(cm);
}

extern void
CMadd_shutdown_task ( CManager cm, CMPollFunc func, void *client_data, int task_type )
{
	CManager_lock(cm);
	INT_CMadd_shutdown_task(cm, func, client_data, task_type);
	CManager_unlock(cm);
}

extern void
CMadd_stone_to_global_lookup ( CManager cm, int stone_num, int global_stone_num )
{
	CManager_lock(cm);
	INT_CMadd_stone_to_global_lookup(cm, stone_num, global_stone_num);
	CManager_unlock(cm);
}

extern void
CManager_close ( CManager cm )
{
	CManager_lock(cm);
	INT_CManager_close(cm);
}

extern CManager
CManager_create (  )
{
	CManager ret;
	ret = INT_CManager_create();
	return ret;
}

extern CManager
CManager_create_control ( char *control_module )
{
	CManager ret;
	ret = INT_CManager_create_control(control_module);
	return ret;
}

extern void
CMconn_register_close_handler ( CMConnection conn, CMCloseHandlerFunc func, void *client_data )
{
	CManager cm = conn->cm;
	CManager_lock(cm);
	INT_CMconn_register_close_handler(conn, func, client_data);
	CManager_unlock(cm);
}

extern int
CMcontact_self_check ( CManager cm, attr_list attrs )
{
	int ret;
	CManager_lock(cm);
	ret = INT_CMcontact_self_check(cm, attrs);
	CManager_unlock(cm);
	return ret;
}

extern attr_list
CMderef_and_copy_list ( CManager cm, attr_list attrs )
{
	attr_list ret;
	CManager_lock(cm);
	ret = INT_CMderef_and_copy_list(cm, attrs);
	CManager_unlock(cm);
	return ret;
}

extern int
CMfork_comm_thread ( CManager cm )
{
	int ret;
	CManager_lock(cm);
	ret = INT_CMfork_comm_thread(cm);
	CManager_unlock(cm);
	return ret;
}

extern void
CMfree ( void *ptr )
{
	INT_CMfree(ptr);
}

extern FMContext
CMget_FMcontext ( CManager cm )
{
	FMContext ret;
	ret = INT_CMget_FMcontext(cm);
	return ret;
}

extern CMConnection
CMget_conn ( CManager cm, attr_list contact_list )
{
	CMConnection ret;
	CManager_lock(cm);
	ret = INT_CMget_conn(cm, contact_list);
	CManager_unlock(cm);
	return ret;
}

extern attr_list
CMget_contact_list ( CManager cm )
{
	attr_list ret;
	CManager_lock(cm);
	ret = INT_CMget_contact_list(cm);
	CManager_unlock(cm);
	return ret;
}

extern CMConnection
CMget_indexed_conn ( CManager cm, int i )
{
	CMConnection ret;
	CManager_lock(cm);
	ret = INT_CMget_indexed_conn(cm, i);
	CManager_unlock(cm);
	return ret;
}

extern char*
CMget_ip_config_diagnostics ( CManager cm )
{
	char* ret;
	ret = INT_CMget_ip_config_diagnostics(cm);
	return ret;
}

extern void
CMget_port_range ( CManager cm, int *high_bound, int *low_bound )
{
	INT_CMget_port_range(cm, high_bound, low_bound);
}

extern void
CMget_qual_hostname ( CManager cm, char *buf, int len )
{
	INT_CMget_qual_hostname(cm, buf, len);
}

extern int
CMget_self_ip_addr ( CManager cm )
{
	int ret;
	ret = INT_CMget_self_ip_addr(cm);
	return ret;
}

extern attr_list
CMget_specific_contact_list ( CManager cm, attr_list attrs )
{
	attr_list ret;
	CManager_lock(cm);
	ret = INT_CMget_specific_contact_list(cm, attrs);
	CManager_unlock(cm);
	return ret;
}

extern CMtrans_services
CMget_static_trans_services (  )
{
	CMtrans_services ret;
	ret = INT_CMget_static_trans_services();
	return ret;
}

extern void*
CMget_transport_data ( CMConnection conn )
{
	void* ret;
	CManager cm = conn->cm;
	CManager_lock(cm);
	ret = INT_CMget_transport_data(conn);
	CManager_unlock(cm);
	return ret;
}

extern CMConnection
CMinitiate_conn ( CManager cm, attr_list contact_list )
{
	CMConnection ret;
	CManager_lock(cm);
	ret = INT_CMinitiate_conn(cm, contact_list);
	CManager_unlock(cm);
	return ret;
}

extern void
CMinstall_perf_upcall ( CManager cm, CMperf_upcall upcall )
{
	CManager_lock(cm);
	INT_CMinstall_perf_upcall(cm, upcall);
	CManager_unlock(cm);
}

extern int
CMinstall_pull_schedule ( CManager cm, struct timeval *base_time, struct timeval *period, CMavail_period_ptr avail )
{
	int ret;
	CManager_lock(cm);
	ret = INT_CMinstall_pull_schedule(cm, base_time, period, avail);
	CManager_unlock(cm);
	return ret;
}

extern int
CMlisten ( CManager cm )
{
	int ret;
	CManager_lock(cm);
	ret = INT_CMlisten(cm);
	CManager_unlock(cm);
	return ret;
}

extern int
CMlisten_specific ( CManager cm, attr_list listen_info )
{
	int ret;
	CManager_lock(cm);
	ret = INT_CMlisten_specific(cm, listen_info);
	CManager_unlock(cm);
	return ret;
}

extern CMFormat
CMlookup_format ( CManager cm, FMStructDescList format_list )
{
	CMFormat ret;
	CManager_lock(cm);
	ret = INT_CMlookup_format(cm, format_list);
	CManager_unlock(cm);
	return ret;
}

extern void*
CMmalloc ( long size )
{
	void* ret;
	ret = INT_CMmalloc(size);
	return ret;
}

extern void
CMpoll_network ( CManager cm )
{
	CManager_lock(cm);
	INT_CMpoll_network(cm);
	CManager_unlock(cm);
}

extern double
CMprobe_bandwidth ( CMConnection conn, long size, attr_list attrs )
{
	double ret;
	CManager cm = conn->cm;
	CManager_lock(cm);
	ret = INT_CMprobe_bandwidth(conn, size, attrs);
	CManager_unlock(cm);
	return ret;
}

extern long
CMprobe_latency ( CMConnection conn, long msg_size, attr_list attrs )
{
	long ret;
	CManager cm = conn->cm;
	CManager_lock(cm);
	ret = INT_CMprobe_latency(conn, msg_size, attrs);
	CManager_unlock(cm);
	return ret;
}

extern void*
CMrealloc ( void *ptr, long size )
{
	void* ret;
	ret = INT_CMrealloc(ptr, size);
	return ret;
}

extern CMFormat
CMregister_format ( CManager cm, FMStructDescList format_list )
{
	CMFormat ret;
	CManager_lock(cm);
	ret = INT_CMregister_format(cm, format_list);
	CManager_unlock(cm);
	return ret;
}

extern void
CMregister_handler ( CMFormat format, CMHandlerFunc handler, void *client_data )
{
	CManager cm = format->cm;
	CManager_lock(cm);
	INT_CMregister_handler(format, handler, client_data);
	CManager_unlock(cm);
}

extern void
CMregister_invalid_message_handler ( CManager cm, CMUnregCMHandler handler )
{
	INT_CMregister_invalid_message_handler(cm, handler);
}

extern void
CMregister_non_CM_message_handler ( int header, CMNonCMHandler handler )
{
	INT_CMregister_non_CM_message_handler(header, handler);
}

extern CMFormat
CMregister_simple_format ( CManager cm, char *format_name, FMFieldList field_list, int struct_size )
{
	CMFormat ret;
	CManager_lock(cm);
	ret = INT_CMregister_simple_format(cm, format_name, field_list, struct_size);
	CManager_unlock(cm);
	return ret;
}

extern void
CMregister_write_callback ( CMConnection conn, CMWriteCallbackFunc handler, void *client_data )
{
	CManager cm = conn->cm;
	CManager_lock(cm);
	INT_CMregister_write_callback(conn, handler, client_data);
	CManager_unlock(cm);
}

extern double
CMregressive_probe_bandwidth ( CMConnection conn, long size, attr_list attrs )
{
	double ret;
	CManager cm = conn->cm;
	CManager_lock(cm);
	ret = INT_CMregressive_probe_bandwidth(conn, size, attrs);
	CManager_unlock(cm);
	return ret;
}

extern void
CMremove_periodic ( CMTaskHandle handle )
{
	CManager cm = handle->cm;
	CManager_lock(cm);
	INT_CMremove_periodic(handle);
	CManager_unlock(cm);
}

extern void
CMremove_task ( CMTaskHandle handle )
{
	CManager cm = handle->cm;
	CManager_lock(cm);
	INT_CMremove_task(handle);
	CManager_unlock(cm);
}

extern void
CMreturn_buffer ( CManager cm, void *data )
{
	CManager_lock(cm);
	INT_CMreturn_buffer(cm, data);
	CManager_unlock(cm);
}

extern void
CMrun_network ( CManager cm )
{
	CManager_lock(cm);
	INT_CMrun_network(cm);
	CManager_unlock(cm);
}

extern void
CMsleep ( CManager cm, int secs )
{
	CManager_lock(cm);
	INT_CMsleep(cm, secs);
	CManager_unlock(cm);
}

extern void*
CMtake_buffer ( CManager cm, void *data )
{
	void* ret;
	CManager_lock(cm);
	ret = INT_CMtake_buffer(cm, data);
	CManager_unlock(cm);
	return ret;
}

extern attr_list
CMtest_transport ( CMConnection conn, attr_list how )
{
	attr_list ret;
	CManager cm = conn->cm;
	CManager_lock(cm);
	ret = INT_CMtest_transport(conn, how);
	CManager_unlock(cm);
	return ret;
}

extern void
CMusleep ( CManager cm, int usecs )
{
	CManager_lock(cm);
	INT_CMusleep(cm, usecs);
	CManager_unlock(cm);
}

extern int
CMwrite ( CMConnection conn, CMFormat format, void *data )
{
	int ret;
	CManager cm = conn->cm;
	CManager_lock(cm);
	ret = INT_CMwrite(conn, format, data);
	CManager_unlock(cm);
	return ret;
}

extern int
CMwrite_attr ( CMConnection conn, CMFormat format, void *data, attr_list attrs )
{
	int ret;
	CManager cm = conn->cm;
	CManager_lock(cm);
	ret = INT_CMwrite_attr(conn, format, data, attrs);
	CManager_unlock(cm);
	return ret;
}

extern int
EVaction_add_split_target ( CManager cm, EVstone stone, EVaction action, EVstone target_stone )
{
	int ret;
	CManager_lock(cm);
	ret = INT_EVaction_add_split_target(cm, stone, action, target_stone);
	CManager_unlock(cm);
	return ret;
}

extern void
EVaction_remove_split_target ( CManager cm, EVstone stone, EVaction action, EVstone target_stone )
{
	CManager_lock(cm);
	INT_EVaction_remove_split_target(cm, stone, action, target_stone);
	CManager_unlock(cm);
}

extern int
EVaction_set_output ( CManager cm, EVstone stone, EVaction action, int output_index, EVstone target_stone )
{
	int ret;
	CManager_lock(cm);
	ret = INT_EVaction_set_output(cm, stone, action, output_index, target_stone);
	CManager_unlock(cm);
	return ret;
}

extern void
EVadd_dll_search_dir ( char *path_string )
{
	INT_EVadd_dll_search_dir(path_string);
}

extern void
EVadd_standard_routines ( CManager cm, char *extern_string, cod_extern_entry *externs )
{
	CManager_lock(cm);
	INT_EVadd_standard_routines(cm, extern_string, externs);
	CManager_unlock(cm);
}

extern void
EVadd_standard_structs ( CManager cm, FMStructDescList *lists )
{
	CManager_lock(cm);
	INT_EVadd_standard_structs(cm, lists);
	CManager_unlock(cm);
}

extern EVstone
EValloc_stone ( CManager cm )
{
	EVstone ret;
	CManager_lock(cm);
	ret = INT_EValloc_stone(cm);
	CManager_unlock(cm);
	return ret;
}

extern EVaction
EVassoc_bridge_action ( CManager cm, EVstone stone, attr_list contact_list, EVstone remote_stone )
{
	EVaction ret;
	CManager_lock(cm);
	ret = INT_EVassoc_bridge_action(cm, stone, contact_list, remote_stone);
	CManager_unlock(cm);
	return ret;
}

extern EVaction
EVassoc_congestion_action ( CManager cm, EVstone stone, char *action_spec, void* client_data )
{
	EVaction ret;
	CManager_lock(cm);
	ret = INT_EVassoc_congestion_action(cm, stone, action_spec, client_data);
	CManager_unlock(cm);
	return ret;
}

extern void
EVassoc_conversion_action ( CManager cm, int stone_id, int stage, FMFormat target_format, FMFormat incoming_format )
{
	CManager_lock(cm);
	INT_EVassoc_conversion_action(cm, stone_id, stage, target_format, incoming_format);
	CManager_unlock(cm);
}

extern EVaction
EVassoc_filter_action ( CManager cm, EVstone stone, FMStructDescList incoming_format_list, EVSimpleHandlerFunc handler, EVstone out_stone, void* client_data )
{
	EVaction ret;
	CManager_lock(cm);
	ret = INT_EVassoc_filter_action(cm, stone, incoming_format_list, handler, out_stone, client_data);
	CManager_unlock(cm);
	return ret;
}

extern EVaction
EVassoc_immediate_action ( CManager cm, EVstone stone, char *action_spec, void *client_data )
{
	EVaction ret;
	CManager_lock(cm);
	ret = INT_EVassoc_immediate_action(cm, stone, action_spec, client_data);
	CManager_unlock(cm);
	return ret;
}

extern EVaction
EVassoc_multi_action ( CManager cm, EVstone stone, char *action_spec, void *client_data )
{
	EVaction ret;
	CManager_lock(cm);
	ret = INT_EVassoc_multi_action(cm, stone, action_spec, client_data);
	CManager_unlock(cm);
	return ret;
}

extern EVaction
EVassoc_raw_terminal_action ( CManager cm, EVstone stone, EVRawHandlerFunc handler, void* client_data )
{
	EVaction ret;
	CManager_lock(cm);
	ret = INT_EVassoc_raw_terminal_action(cm, stone, handler, client_data);
	CManager_unlock(cm);
	return ret;
}

extern EVaction
EVassoc_split_action ( CManager cm, EVstone stone, EVstone *target_list )
{
	EVaction ret;
	CManager_lock(cm);
	ret = INT_EVassoc_split_action(cm, stone, target_list);
	CManager_unlock(cm);
	return ret;
}

extern EVaction
EVassoc_store_action ( CManager cm, EVstone stone_num, EVstone out_stone, int store_limit )
{
	EVaction ret;
	CManager_lock(cm);
	ret = INT_EVassoc_store_action(cm, stone_num, out_stone, store_limit);
	CManager_unlock(cm);
	return ret;
}

extern EVaction
EVassoc_terminal_action ( CManager cm, EVstone stone, FMStructDescList format_list, EVSimpleHandlerFunc handler, void* client_data )
{
	EVaction ret;
	CManager_lock(cm);
	ret = INT_EVassoc_terminal_action(cm, stone, format_list, handler, client_data);
	CManager_unlock(cm);
	return ret;
}

extern EVaction
EVassoc_thread_bridge_action ( CManager cm, EVstone stone, CManager target_cm, EVstone target_stone )
{
	EVaction ret;
	CManager_lock(target_cm);
	ret = INT_EVassoc_thread_bridge_action(cm, stone, target_cm, target_stone);
	CManager_unlock(target_cm);
	return ret;
}

extern void
EVclear_stored ( CManager cm, EVstone stone_num, EVaction action_num )
{
	CManager_lock(cm);
	INT_EVclear_stored(cm, stone_num, action_num);
	CManager_unlock(cm);
}

extern unsigned int
EVclient_active_sink_count ( EVclient client )
{
	unsigned int ret;
	CManager_lock(client->cm);
	ret = INT_EVclient_active_sink_count(client);
	CManager_unlock(client->cm);
	return ret;
}

extern EVclient
EVclient_assoc ( CManager cm, char *node_name, char *master_contact, EVclient_sources source_capabilities, EVclient_sinks sink_capabilities )
{
	EVclient ret;
	CManager_lock(cm);
	ret = INT_EVclient_assoc(cm, node_name, master_contact, source_capabilities, sink_capabilities);
	CManager_unlock(cm);
	return ret;
}

extern EVclient
EVclient_assoc_local ( CManager cm, char *node_name, EVmaster master, EVclient_sources source_capabilities, EVclient_sinks sink_capabilities )
{
	EVclient ret;
	CManager_lock(master->cm);
	ret = INT_EVclient_assoc_local(cm, node_name, master, source_capabilities, sink_capabilities);
	CManager_unlock(master->cm);
	return ret;
}

extern int
EVclient_force_shutdown ( EVclient client, int result )
{
	int ret;
	CManager_lock(client->cm);
	ret = INT_EVclient_force_shutdown(client, result);
	CManager_unlock(client->cm);
	return ret;
}

extern void
EVclient_ready_for_shutdown ( EVclient client )
{
	CManager_lock(client->cm);
	INT_EVclient_ready_for_shutdown(client);
	CManager_unlock(client->cm);
}

extern int
EVclient_ready_wait ( EVclient client )
{
	int ret;
	CManager_lock(client->cm);
	ret = INT_EVclient_ready_wait(client);
	CManager_unlock(client->cm);
	return ret;
}

extern EVclient_sinks
EVclient_register_raw_sink_handler ( CManager cm, char *name, EVRawHandlerFunc handler, void *client_data )
{
	EVclient_sinks ret;
	CManager_lock(cm);
	ret = INT_EVclient_register_raw_sink_handler(cm, name, handler, client_data);
	CManager_unlock(cm);
	return ret;
}

extern EVclient_sinks
EVclient_register_sink_handler ( CManager cm, char *name, FMStructDescList list, EVSimpleHandlerFunc handler, void* client_data )
{
	EVclient_sinks ret;
	CManager_lock(cm);
	ret = INT_EVclient_register_sink_handler(cm, name, list, handler, client_data);
	CManager_unlock(cm);
	return ret;
}

extern EVclient_sources
EVclient_register_source ( char *name, EVsource src )
{
	EVclient_sources ret;
	CManager cm = src->cm;
	CManager_lock(cm);
	ret = INT_EVclient_register_source(name, src);
	CManager_unlock(cm);
	return ret;
}

extern int
EVclient_shutdown ( EVclient client, int result )
{
	int ret;
	CManager_lock(client->cm);
	ret = INT_EVclient_shutdown(client, result);
	CManager_unlock(client->cm);
	return ret;
}

extern int
EVclient_source_active ( EVsource src )
{
	int ret;
	CManager cm = src->cm;
	CManager_lock(cm);
	ret = INT_EVclient_source_active(src);
	CManager_unlock(cm);
	return ret;
}

extern int
EVclient_test_for_shutdown ( EVclient client )
{
	int ret;
	CManager_lock(client->cm);
	ret = INT_EVclient_test_for_shutdown(client);
	CManager_unlock(client->cm);
	return ret;
}

extern int
EVclient_wait_for_shutdown ( EVclient client )
{
	int ret;
	CManager_lock(client->cm);
	ret = INT_EVclient_wait_for_shutdown(client);
	CManager_unlock(client->cm);
	return ret;
}

extern EVstone
EVcreate_auto_stone ( CManager cm, int period_sec, int period_usec, char *action_spec, EVstone out_stone )
{
	EVstone ret;
	CManager_lock(cm);
	ret = INT_EVcreate_auto_stone(cm, period_sec, period_usec, action_spec, out_stone);
	CManager_unlock(cm);
	return ret;
}

extern EVstone
EVcreate_bridge_action ( CManager cm, attr_list contact_list, EVstone remote_stone )
{
	EVstone ret;
	CManager_lock(cm);
	ret = INT_EVcreate_bridge_action(cm, contact_list, remote_stone);
	CManager_unlock(cm);
	return ret;
}

extern EVstone
EVcreate_immediate_action ( CManager cm, char *action_spec, EVstone *target_list )
{
	EVstone ret;
	CManager_lock(cm);
	ret = INT_EVcreate_immediate_action(cm, action_spec, target_list);
	CManager_unlock(cm);
	return ret;
}

extern EVstone
EVcreate_split_action ( CManager cm, EVstone *target_list )
{
	EVstone ret;
	CManager_lock(cm);
	ret = INT_EVcreate_split_action(cm, target_list);
	CManager_unlock(cm);
	return ret;
}

extern EVstone
EVcreate_stone_action ( CManager cm, char *action_spec )
{
	EVstone ret;
	CManager_lock(cm);
	ret = INT_EVcreate_stone_action(cm, action_spec);
	CManager_unlock(cm);
	return ret;
}

extern EVstone
EVcreate_store_action ( CManager cm, EVstone out_stone, int store_limit )
{
	EVstone ret;
	CManager_lock(cm);
	ret = INT_EVcreate_store_action(cm, out_stone, store_limit);
	CManager_unlock(cm);
	return ret;
}

extern EVsource
EVcreate_submit_handle ( CManager cm, EVstone stone, FMStructDescList data_format )
{
	EVsource ret;
	CManager_lock(cm);
	ret = INT_EVcreate_submit_handle(cm, stone, data_format);
	CManager_unlock(cm);
	return ret;
}

extern EVsource
EVcreate_submit_handle_free ( CManager cm, EVstone stone, FMStructDescList data_format, EVFreeFunction free_func, void *client_data )
{
	EVsource ret;
	CManager_lock(cm);
	ret = INT_EVcreate_submit_handle_free(cm, stone, data_format, free_func, client_data);
	CManager_unlock(cm);
	return ret;
}

extern EVstone
EVcreate_terminal_action ( CManager cm, FMStructDescList format_list, EVSimpleHandlerFunc handler, void* client_data )
{
	EVstone ret;
	CManager_lock(cm);
	ret = INT_EVcreate_terminal_action(cm, format_list, handler, client_data);
	CManager_unlock(cm);
	return ret;
}

extern EVstone
EVcreate_thread_bridge_action ( CManager cm, CManager target_cm, EVstone target_stone )
{
	EVstone ret;
	CManager_lock(target_cm);
	ret = INT_EVcreate_thread_bridge_action(cm, target_cm, target_stone);
	CManager_unlock(target_cm);
	return ret;
}

extern int
EVdestroy_stone ( CManager cm, EVstone stone_id )
{
	int ret;
	CManager_lock(cm);
	ret = INT_EVdestroy_stone(cm, stone_id);
	CManager_unlock(cm);
	return ret;
}

extern void
EVdfg_add_action ( EVdfg_stone stone, char *action_spec )
{
	CManager cm = stone->dfg->master->cm;
	CManager_lock(cm);
	INT_EVdfg_add_action(stone, action_spec);
	CManager_unlock(cm);
}

extern void
EVdfg_add_sink_action ( EVdfg_stone stone, char *handler_name )
{
	CManager cm = stone->dfg->master->cm;
	CManager_lock(cm);
	INT_EVdfg_add_sink_action(stone, handler_name);
	CManager_unlock(cm);
}

extern int
EVdfg_assign_node ( EVdfg_stone stone, char *node )
{
	int ret;
	CManager cm = stone->dfg->master->cm;
	CManager_lock(cm);
	ret = INT_EVdfg_assign_node(stone, node);
	CManager_unlock(cm);
	return ret;
}

extern EVdfg
EVdfg_create ( EVmaster master )
{
	EVdfg ret;
	CManager_lock(master->cm);
	ret = INT_EVdfg_create(master);
	CManager_unlock(master->cm);
	return ret;
}

extern EVdfg_stone
EVdfg_create_sink_stone ( EVdfg dfg, char *handler_name )
{
	EVdfg_stone ret;
	CManager cm = dfg->master->cm;
	CManager_lock(cm);
	ret = INT_EVdfg_create_sink_stone(dfg, handler_name);
	CManager_unlock(cm);
	return ret;
}

extern EVdfg_stone
EVdfg_create_source_stone ( EVdfg dfg, char *source_name )
{
	EVdfg_stone ret;
	CManager cm = dfg->master->cm;
	CManager_lock(cm);
	ret = INT_EVdfg_create_source_stone(dfg, source_name);
	CManager_unlock(cm);
	return ret;
}

extern EVdfg_stone
EVdfg_create_stone ( EVdfg dfg, char *action_spec )
{
	EVdfg_stone ret;
	CManager cm = dfg->master->cm;
	CManager_lock(cm);
	ret = INT_EVdfg_create_stone(dfg, action_spec);
	CManager_unlock(cm);
	return ret;
}

extern void
EVdfg_dump_graph ( EVdfg_state_type which, EVdfg dfg )
{
	CManager cm = dfg->master->cm;
	CManager_lock(cm);
	INT_EVdfg_dump_graph(which, dfg);
	CManager_unlock(cm);
}

extern void
EVdfg_enable_auto_stone ( EVdfg_stone stone, int period_sec, int period_usec )
{
	CManager cm = stone->dfg->master->cm;
	CManager_lock(cm);
	INT_EVdfg_enable_auto_stone(stone, period_sec, period_usec);
	CManager_unlock(cm);
}

extern attr_list
EVdfg_get_attr_list ( EVdfg_stone stone )
{
	attr_list ret;
	CManager cm = stone->dfg->master->cm;
	CManager_lock(cm);
	ret = INT_EVdfg_get_attr_list(stone);
	CManager_unlock(cm);
	return ret;
}

extern void
EVdfg_link_dest ( EVdfg_stone source, EVdfg_stone destination )
{
	CManager cm = destination->dfg->master->cm;
	CManager_lock(cm);
	INT_EVdfg_link_dest(source, destination);
	CManager_unlock(cm);
}

extern void
EVdfg_link_port ( EVdfg_stone source, int output_index, EVdfg_stone destination )
{
	CManager cm = destination->dfg->master->cm;
	CManager_lock(cm);
	INT_EVdfg_link_port(source, output_index, destination);
	CManager_unlock(cm);
}

extern void
EVdfg_realize ( EVdfg dfg )
{
	CManager cm = dfg->master->cm;
	CManager_lock(cm);
	INT_EVdfg_realize(dfg);
	CManager_unlock(cm);
}

extern void
EVdfg_set_attr_list ( EVdfg_stone stone, attr_list attrs )
{
	CManager cm = stone->dfg->master->cm;
	CManager_lock(cm);
	INT_EVdfg_set_attr_list(stone, attrs);
	CManager_unlock(cm);
}

extern int
EVdfg_unlink_dest ( EVdfg_stone source, EVdfg_stone destination )
{
	int ret;
	CManager cm = destination->dfg->master->cm;
	CManager_lock(cm);
	ret = INT_EVdfg_unlink_dest(source, destination);
	CManager_unlock(cm);
	return ret;
}

extern int
EVdfg_unlink_port ( EVdfg_stone source, int output_index )
{
	int ret;
	CManager cm = source->dfg->master->cm;
	CManager_lock(cm);
	ret = INT_EVdfg_unlink_port(source, output_index);
	CManager_unlock(cm);
	return ret;
}

extern int
EVdrain_stone ( CManager cm, EVstone stone_id )
{
	int ret;
	CManager_lock(cm);
	ret = INT_EVdrain_stone(cm, stone_id);
	CManager_unlock(cm);
	return ret;
}

extern void
EVenable_auto_stone ( CManager cm, EVstone stone_num, int period_sec, int period_usec )
{
	CManager_lock(cm);
	INT_EVenable_auto_stone(cm, stone_num, period_sec, period_usec);
	CManager_unlock(cm);
}

extern EVstone
EVexecuting_stone ( CManager cm )
{
	EVstone ret;
	CManager_lock(cm);
	ret = INT_EVexecuting_stone(cm);
	CManager_unlock(cm);
	return ret;
}

extern attr_list
EVextract_attr_list ( CManager cm, EVstone stone_id )
{
	attr_list ret;
	CManager_lock(cm);
	ret = INT_EVextract_attr_list(cm, stone_id);
	CManager_unlock(cm);
	return ret;
}

extern EVevent_list
EVextract_stone_events ( CManager cm, EVstone stone_id )
{
	EVevent_list ret;
	CManager_lock(cm);
	ret = INT_EVextract_stone_events(cm, stone_id);
	CManager_unlock(cm);
	return ret;
}

extern void
EVfree_source ( EVsource source )
{
	CManager cm = source->cm;
	CManager_lock(cm);
	INT_EVfree_source(source);
	CManager_unlock(cm);
}

extern void
EVfree_stone ( CManager cm, EVstone stone )
{
	CManager_lock(cm);
	INT_EVfree_stone(cm, stone);
	CManager_unlock(cm);
}

extern int
EVfreeze_stone ( CManager cm, EVstone stone_id )
{
	int ret;
	CManager_lock(cm);
	ret = INT_EVfreeze_stone(cm, stone_id);
	CManager_unlock(cm);
	return ret;
}

extern FMFormat
EVget_src_ref_format ( EVsource source )
{
	FMFormat ret;
	CManager cm = source->cm;
	CManager_lock(cm);
	ret = INT_EVget_src_ref_format(source);
	CManager_unlock(cm);
	return ret;
}

extern int
EVmaster_assign_canonical_name ( EVmaster master, char *given_name, char *canonical_name )
{
	int ret;
	CManager_lock(master->cm);
	ret = INT_EVmaster_assign_canonical_name(master, given_name, canonical_name);
	CManager_unlock(master->cm);
	return ret;
}

extern EVmaster
EVmaster_create ( CManager cm )
{
	EVmaster ret;
	CManager_lock(cm);
	ret = INT_EVmaster_create(cm);
	CManager_unlock(cm);
	return ret;
}

extern char*
EVmaster_get_contact_list ( EVmaster master )
{
	char* ret;
	CManager_lock(master->cm);
	ret = INT_EVmaster_get_contact_list(master);
	CManager_unlock(master->cm);
	return ret;
}

extern void
EVmaster_node_fail_handler ( EVmaster master, EVmasterFailHandlerFunc func )
{
	CManager_lock(master->cm);
	INT_EVmaster_node_fail_handler(master, func);
	CManager_unlock(master->cm);
}

extern void
EVmaster_node_join_handler ( EVmaster master, EVmasterJoinHandlerFunc func )
{
	CManager_lock(master->cm);
	INT_EVmaster_node_join_handler(master, func);
	CManager_unlock(master->cm);
}

extern void
EVmaster_node_reconfig_handler ( EVmaster master, EVmasterReconfigHandlerFunc func )
{
	CManager_lock(master->cm);
	INT_EVmaster_node_reconfig_handler(master, func);
	CManager_unlock(master->cm);
}

extern void
EVmaster_register_node_list ( EVmaster master, char** list )
{
	CManager_lock(master->cm);
	INT_EVmaster_register_node_list(master, list);
	CManager_unlock(master->cm);
}

extern void
EVregister_close_handler ( CManager cm, EVStoneCloseHandlerFunc handler, void *client_data )
{
	CManager_lock(cm);
	INT_EVregister_close_handler(cm, handler, client_data);
	CManager_unlock(cm);
}

extern void
EVreturn_event_buffer ( CManager cm, void *event )
{
	CManager_lock(cm);
	INT_EVreturn_event_buffer(cm, event);
	CManager_unlock(cm);
}

extern void
EVsend_stored ( CManager cm, EVstone stone_num, EVaction action_num )
{
	CManager_lock(cm);
	INT_EVsend_stored(cm, stone_num, action_num);
	CManager_unlock(cm);
}

extern void
EVset_attr_list ( CManager cm, EVstone stone_id, attr_list list )
{
	CManager_lock(cm);
	INT_EVset_attr_list(cm, stone_id, list);
	CManager_unlock(cm);
}

extern void
EVset_store_limit ( CManager cm, EVstone stone_num, EVaction action_num, int store_limit )
{
	CManager_lock(cm);
	INT_EVset_store_limit(cm, stone_num, action_num, store_limit);
	CManager_unlock(cm);
}

extern void
EVstall_stone ( CManager cm, EVstone stone_id )
{
	CManager_lock(cm);
	INT_EVstall_stone(cm, stone_id);
	CManager_unlock(cm);
}

extern void
EVstone_add_split_target ( CManager cm, EVstone stone, EVstone target_stone )
{
	CManager_lock(cm);
	INT_EVstone_add_split_target(cm, stone, target_stone);
	CManager_unlock(cm);
}

extern void
EVstone_remove_split_target ( CManager cm, EVstone stone, EVstone target_stone )
{
	CManager_lock(cm);
	INT_EVstone_remove_split_target(cm, stone, target_stone);
	CManager_unlock(cm);
}

extern int
EVstone_set_output ( CManager cm, EVstone stone, int output_index, EVstone target_stone )
{
	int ret;
	CManager_lock(cm);
	ret = INT_EVstone_set_output(cm, stone, output_index, target_stone);
	CManager_unlock(cm);
	return ret;
}

extern int
EVstore_count ( CManager cm, EVstone stone_num, EVaction action_num )
{
	int ret;
	CManager_lock(cm);
	ret = INT_EVstore_count(cm, stone_num, action_num);
	CManager_unlock(cm);
	return ret;
}

extern int
EVstore_is_sending ( CManager cm, EVstone stone_num, EVaction action_num )
{
	int ret;
	CManager_lock(cm);
	ret = INT_EVstore_is_sending(cm, stone_num, action_num);
	CManager_unlock(cm);
	return ret;
}

extern void
EVstore_start_send ( CManager cm, EVstone stone_num, EVaction action_num )
{
	CManager_lock(cm);
	INT_EVstore_start_send(cm, stone_num, action_num);
	CManager_unlock(cm);
}

extern void
EVsubmit ( EVsource source, void *data, attr_list attrs )
{
	CManager cm = source->cm;
	CManager_lock(cm);
	INT_EVsubmit(source, data, attrs);
	CManager_unlock(cm);
}

extern void
EVsubmit_encoded ( CManager cm, EVstone stone, void *data, size_t data_len, attr_list attrs )
{
	CManager_lock(cm);
	INT_EVsubmit_encoded(cm, stone, data, data_len, attrs);
	CManager_unlock(cm);
}

extern int
EVsubmit_encoded_or_wait ( CManager cm, EVstone stone, void *data, int data_len, attr_list attrs, EVSubmitCallbackFunc cb, void *user_data )
{
	int ret;
	CManager_lock(cm);
	ret = INT_EVsubmit_encoded_or_wait(cm, stone, data, data_len, attrs, cb, user_data);
	CManager_unlock(cm);
	return ret;
}

extern void
EVsubmit_general ( EVsource source, void *data, EVFreeFunction free_func, attr_list attrs )
{
	CManager cm = source->cm;
	CManager_lock(cm);
	INT_EVsubmit_general(source, data, free_func, attrs);
	CManager_unlock(cm);
}

extern int
EVsubmit_or_wait ( EVsource source, void *data, attr_list attrs, EVSubmitCallbackFunc cb, void *user_data )
{
	int ret;
	CManager cm = source->cm;
	CManager_lock(cm);
	ret = INT_EVsubmit_or_wait(source, data, attrs, cb, user_data);
	CManager_unlock(cm);
	return ret;
}

extern int
EVtake_event_buffer ( CManager cm, void *event )
{
	int ret;
	CManager_lock(cm);
	ret = INT_EVtake_event_buffer(cm, event);
	CManager_unlock(cm);
	return ret;
}

extern int
EVtransfer_events ( CManager cm, EVstone src_stone, EVstone dest_stone )
{
	int ret;
	CManager_lock(cm);
	ret = INT_EVtransfer_events(cm, src_stone, dest_stone);
	CManager_unlock(cm);
	return ret;
}

extern int
EVunfreeze_stone ( CManager cm, EVstone stone_id )
{
	int ret;
	CManager_lock(cm);
	ret = INT_EVunfreeze_stone(cm, stone_id);
	CManager_unlock(cm);
	return ret;
}

extern void
EVunstall_stone ( CManager cm, EVstone stone_id )
{
	CManager_lock(cm);
	INT_EVunstall_stone(cm, stone_id);
	CManager_unlock(cm);
}

extern char*
create_filter_action_spec ( FMStructDescList format_list, char *function )
{
	char* ret;
	ret = INT_create_filter_action_spec(format_list, function);
	return ret;
}

extern char*
create_multityped_action_spec ( FMStructDescList *input_format_lists, char *function )
{
	char* ret;
	ret = INT_create_multityped_action_spec(input_format_lists, function);
	return ret;
}

extern char*
create_router_action_spec ( FMStructDescList format_list, char *function )
{
	char* ret;
	ret = INT_create_router_action_spec(format_list, function);
	return ret;
}

extern char*
create_transform_action_spec ( FMStructDescList format_list, FMStructDescList out_format_list, char *function )
{
	char* ret;
	ret = INT_create_transform_action_spec(format_list, out_format_list, function);
	return ret;
}
#ifdef  __cplusplus
}
#endif
