Loading thirdparty/EVPath/EVPath/cm.c +1 −0 Original line number Diff line number Diff line Loading @@ -85,6 +85,7 @@ struct CMtrans_services_s CMstatic_trans_svcs = {INT_CMmalloc, INT_CMrealloc, IN CM_fd_write_select, CM_fd_remove_select, CMtransport_trace, CMtransport_verbose, CMConnection_create, INT_CMadd_shutdown_task, INT_CMadd_periodic_task, Loading thirdparty/EVPath/EVPath/cm_internal.h +1 −5 Original line number Diff line number Diff line Loading @@ -315,11 +315,6 @@ extern void IntCMConn_write_unlock(CMConnection cl, char *file, int line); extern int CMConn_write_locked(CMConnection cl); typedef enum _CMTraceType { CMAlwaysTrace, CMControlVerbose, CMConnectionVerbose, CMLowLevelVerbose, CMDataVerbose, CMTransportVerbose, CMFormatVerbose, CMFreeVerbose, CMAttrVerbose, CMBufferVerbose, EVerbose, EVWarning, CMIBTransportVerbose, EVdfgVerbose, CMLastTraceType /* add before this one */ } CMTraceType; extern void CMtrace_out(CManager cm, CMTraceType trace_type, char *format, ...); Loading @@ -336,6 +331,7 @@ extern CMincoming_format_list CMidentify_CMformat(CManager cm, FFSTypeHandle format); extern void CMtransport_trace(CManager cm, const char *format, ...); extern void CMtransport_verbose(CManager cm, CMTraceType trace, const char *format, ...); extern void CM_fd_add_select(CManager cm, int fd, select_list_func handler_func, Loading thirdparty/EVPath/EVPath/cm_transport.h +7 −0 Original line number Diff line number Diff line Loading @@ -23,6 +23,11 @@ typedef struct _CMbuffer { void *return_callback_data; } *CMbuffer; typedef enum _CMTraceType { CMAlwaysTrace, CMControlVerbose, CMConnectionVerbose, CMLowLevelVerbose, CMDataVerbose, CMTransportVerbose, CMFormatVerbose, CMFreeVerbose, CMAttrVerbose, CMBufferVerbose, EVerbose, EVWarning, CMSelectVerbose, EVdfgVerbose, CMLastTraceType /* add before this one */ } CMTraceType; typedef void *(*CMTransport_malloc_func)(int); typedef void *(*CMTransport_realloc_func)(void*, int); typedef void (*CMTransport_free_func)(void*); Loading @@ -38,6 +43,7 @@ typedef void (*CMTransport_fd_add_select)(CManager cm, int fd, select_list_func void *param1, void *param2); typedef void (*CMTransport_fd_remove_select)(CManager cm, int fd); typedef void (*CMTransport_trace)(CManager cm, const char *format, ...); typedef void (*CMTransport_verbose)(CManager cm, CMTraceType trace, const char *format, ...); typedef CMConnection (*CMTransport_conn_create)(transport_entry trans, void *transport_data, attr_list conn_attrs); Loading Loading @@ -68,6 +74,7 @@ typedef struct CMtrans_services_s { CMTransport_fd_add_select fd_write_select; CMTransport_fd_remove_select fd_remove_select; CMTransport_trace trace_out; CMTransport_verbose verbose; CMTransport_conn_create connection_create; CMTransport_add_shut_task add_shutdown_task; CMTransport_add_period_task add_periodic_task; Loading thirdparty/EVPath/EVPath/cm_util.c +29 −2 Original line number Diff line number Diff line Loading @@ -52,7 +52,7 @@ extern int CMtrace_init(CManager cm, CMTraceType trace_type) CMtrace_val[CMAttrVerbose] = (getenv("CMAttrVerbose") != NULL); CMtrace_val[CMBufferVerbose] = (getenv("CMBufferVerbose") != NULL); CMtrace_val[EVerbose] = (getenv("EVerbose") != NULL); CMtrace_val[CMIBTransportVerbose] = (getenv("CMIBTransportVerbose") != NULL); CMtrace_val[CMSelectVerbose] = (getenv("CMSelectVerbose") != NULL); CMtrace_val[EVdfgVerbose] = (getenv("EVdfgVerbose") != NULL); CMtrace_timing = (getenv("CMTraceTiming") != NULL); CMtrace_PID = (getenv("CMTracePID") != NULL); Loading Loading @@ -97,7 +97,7 @@ extern int CMtrace_init(CManager cm, CMTraceType trace_type) if (CMtrace_val[CMBufferVerbose]) fprintf(cm->CMTrace_file, "CMBufferVerbose, "); if (CMtrace_val[EVerbose]) fprintf(cm->CMTrace_file, "EVerbose, "); if (CMtrace_val[EVWarning]) fprintf(cm->CMTrace_file, "EVWarning, "); if (CMtrace_val[CMIBTransportVerbose]) fprintf(cm->CMTrace_file, "CMIBTransportVerbose, "); if (CMtrace_val[CMSelectVerbose]) fprintf(cm->CMTrace_file, "CMSelectVerbose, "); if (CMtrace_val[EVdfgVerbose]) fprintf(cm->CMTrace_file, "EVdfgVerbose, "); fprintf(cm->CMTrace_file, "\n"); } Loading Loading @@ -150,6 +150,33 @@ CMtrace_out(CManager cm, CMTraceType trace_type, char *format, ...) #endif } */ extern void CMtransport_verbose(CManager cm, CMTraceType trace, const char *format, ...) { #ifndef MODULE va_list ap; if (CMtrace_on(cm, trace)) { if (CMtrace_PID) { fprintf(cm->CMTrace_file, "P%lxT%lx - ", (long) getpid(), (long)thr_thread_self()); } if (CMtrace_timing) { TRACE_TIME_DECL; TRACE_TIME_GET; fprintf(cm->CMTrace_file, TRACE_TIME_PRINTDETAILS); } #ifdef STDC_HEADERS va_start(ap, format); #else va_start(ap); #endif vfprintf(cm->CMTrace_file, format, ap); va_end(ap); (void)cm; fprintf(cm->CMTrace_file, "\n"); } #endif } extern void CMtransport_trace(CManager cm, const char *format, ...) { Loading thirdparty/EVPath/EVPath/cmenet.c +1 −1 Original line number Diff line number Diff line Loading @@ -821,7 +821,7 @@ libcmenet_LTX_non_blocking_listen(CManager cm, CMtrans_services svc, svc->fd_add_select(cm, enet_host_get_sock_fd (server), (select_list_func) enet_service_network, (void*)cm, (void*)trans); svc->add_periodic_task(cm, 1, 0, (CMPollFunc) enet_service_network_lock, (void*)trans); svc->add_periodic_task(cm, 0, 100, (CMPollFunc) enet_service_network_lock, (void*)trans); svc->trace_out(enet_data->cm, "CMENET Adding read_wake_fd as action on fd %d", enet_data->wake_read_fd); Loading Loading
thirdparty/EVPath/EVPath/cm.c +1 −0 Original line number Diff line number Diff line Loading @@ -85,6 +85,7 @@ struct CMtrans_services_s CMstatic_trans_svcs = {INT_CMmalloc, INT_CMrealloc, IN CM_fd_write_select, CM_fd_remove_select, CMtransport_trace, CMtransport_verbose, CMConnection_create, INT_CMadd_shutdown_task, INT_CMadd_periodic_task, Loading
thirdparty/EVPath/EVPath/cm_internal.h +1 −5 Original line number Diff line number Diff line Loading @@ -315,11 +315,6 @@ extern void IntCMConn_write_unlock(CMConnection cl, char *file, int line); extern int CMConn_write_locked(CMConnection cl); typedef enum _CMTraceType { CMAlwaysTrace, CMControlVerbose, CMConnectionVerbose, CMLowLevelVerbose, CMDataVerbose, CMTransportVerbose, CMFormatVerbose, CMFreeVerbose, CMAttrVerbose, CMBufferVerbose, EVerbose, EVWarning, CMIBTransportVerbose, EVdfgVerbose, CMLastTraceType /* add before this one */ } CMTraceType; extern void CMtrace_out(CManager cm, CMTraceType trace_type, char *format, ...); Loading @@ -336,6 +331,7 @@ extern CMincoming_format_list CMidentify_CMformat(CManager cm, FFSTypeHandle format); extern void CMtransport_trace(CManager cm, const char *format, ...); extern void CMtransport_verbose(CManager cm, CMTraceType trace, const char *format, ...); extern void CM_fd_add_select(CManager cm, int fd, select_list_func handler_func, Loading
thirdparty/EVPath/EVPath/cm_transport.h +7 −0 Original line number Diff line number Diff line Loading @@ -23,6 +23,11 @@ typedef struct _CMbuffer { void *return_callback_data; } *CMbuffer; typedef enum _CMTraceType { CMAlwaysTrace, CMControlVerbose, CMConnectionVerbose, CMLowLevelVerbose, CMDataVerbose, CMTransportVerbose, CMFormatVerbose, CMFreeVerbose, CMAttrVerbose, CMBufferVerbose, EVerbose, EVWarning, CMSelectVerbose, EVdfgVerbose, CMLastTraceType /* add before this one */ } CMTraceType; typedef void *(*CMTransport_malloc_func)(int); typedef void *(*CMTransport_realloc_func)(void*, int); typedef void (*CMTransport_free_func)(void*); Loading @@ -38,6 +43,7 @@ typedef void (*CMTransport_fd_add_select)(CManager cm, int fd, select_list_func void *param1, void *param2); typedef void (*CMTransport_fd_remove_select)(CManager cm, int fd); typedef void (*CMTransport_trace)(CManager cm, const char *format, ...); typedef void (*CMTransport_verbose)(CManager cm, CMTraceType trace, const char *format, ...); typedef CMConnection (*CMTransport_conn_create)(transport_entry trans, void *transport_data, attr_list conn_attrs); Loading Loading @@ -68,6 +74,7 @@ typedef struct CMtrans_services_s { CMTransport_fd_add_select fd_write_select; CMTransport_fd_remove_select fd_remove_select; CMTransport_trace trace_out; CMTransport_verbose verbose; CMTransport_conn_create connection_create; CMTransport_add_shut_task add_shutdown_task; CMTransport_add_period_task add_periodic_task; Loading
thirdparty/EVPath/EVPath/cm_util.c +29 −2 Original line number Diff line number Diff line Loading @@ -52,7 +52,7 @@ extern int CMtrace_init(CManager cm, CMTraceType trace_type) CMtrace_val[CMAttrVerbose] = (getenv("CMAttrVerbose") != NULL); CMtrace_val[CMBufferVerbose] = (getenv("CMBufferVerbose") != NULL); CMtrace_val[EVerbose] = (getenv("EVerbose") != NULL); CMtrace_val[CMIBTransportVerbose] = (getenv("CMIBTransportVerbose") != NULL); CMtrace_val[CMSelectVerbose] = (getenv("CMSelectVerbose") != NULL); CMtrace_val[EVdfgVerbose] = (getenv("EVdfgVerbose") != NULL); CMtrace_timing = (getenv("CMTraceTiming") != NULL); CMtrace_PID = (getenv("CMTracePID") != NULL); Loading Loading @@ -97,7 +97,7 @@ extern int CMtrace_init(CManager cm, CMTraceType trace_type) if (CMtrace_val[CMBufferVerbose]) fprintf(cm->CMTrace_file, "CMBufferVerbose, "); if (CMtrace_val[EVerbose]) fprintf(cm->CMTrace_file, "EVerbose, "); if (CMtrace_val[EVWarning]) fprintf(cm->CMTrace_file, "EVWarning, "); if (CMtrace_val[CMIBTransportVerbose]) fprintf(cm->CMTrace_file, "CMIBTransportVerbose, "); if (CMtrace_val[CMSelectVerbose]) fprintf(cm->CMTrace_file, "CMSelectVerbose, "); if (CMtrace_val[EVdfgVerbose]) fprintf(cm->CMTrace_file, "EVdfgVerbose, "); fprintf(cm->CMTrace_file, "\n"); } Loading Loading @@ -150,6 +150,33 @@ CMtrace_out(CManager cm, CMTraceType trace_type, char *format, ...) #endif } */ extern void CMtransport_verbose(CManager cm, CMTraceType trace, const char *format, ...) { #ifndef MODULE va_list ap; if (CMtrace_on(cm, trace)) { if (CMtrace_PID) { fprintf(cm->CMTrace_file, "P%lxT%lx - ", (long) getpid(), (long)thr_thread_self()); } if (CMtrace_timing) { TRACE_TIME_DECL; TRACE_TIME_GET; fprintf(cm->CMTrace_file, TRACE_TIME_PRINTDETAILS); } #ifdef STDC_HEADERS va_start(ap, format); #else va_start(ap); #endif vfprintf(cm->CMTrace_file, format, ap); va_end(ap); (void)cm; fprintf(cm->CMTrace_file, "\n"); } #endif } extern void CMtransport_trace(CManager cm, const char *format, ...) { Loading
thirdparty/EVPath/EVPath/cmenet.c +1 −1 Original line number Diff line number Diff line Loading @@ -821,7 +821,7 @@ libcmenet_LTX_non_blocking_listen(CManager cm, CMtrans_services svc, svc->fd_add_select(cm, enet_host_get_sock_fd (server), (select_list_func) enet_service_network, (void*)cm, (void*)trans); svc->add_periodic_task(cm, 1, 0, (CMPollFunc) enet_service_network_lock, (void*)trans); svc->add_periodic_task(cm, 0, 100, (CMPollFunc) enet_service_network_lock, (void*)trans); svc->trace_out(enet_data->cm, "CMENET Adding read_wake_fd as action on fd %d", enet_data->wake_read_fd); Loading