action->latency_limited = SIMIX_comm_is_latency_bounded( action ) ;
#endif
-#ifdef HAVE_TRACING
- TRACE_smx_action_destroy(action);
-#endif
-
xbt_free(action->name);
SIMIX_comm_destroy_internal_actions(action);
action->state = SIMIX_RUNNING;
-#ifdef HAVE_TRACING
- TRACE_smx_action_communicate(action, action->comm.src_proc);
-#endif
-
/* If a link is failed, detect it immediately */
if (surf_workstation_model->action_state_get(action->comm.surf_comm) == SURF_ACTION_FAILED) {
XBT_DEBUG("Communication from '%s' to '%s' failed to start because of a link failure",
case SIMIX_SRC_TIMEOUT:
TRY {
- THROW0(timeout_error, 0, "Communication timeouted because of sender");
+ THROWF(timeout_error, 0, "Communication timeouted because of sender");
}
CATCH(req->issuer->running_ctx->exception) {
req->issuer->doexception = 1;
case SIMIX_DST_TIMEOUT:
TRY {
- THROW0(timeout_error, 0, "Communication timeouted because of receiver");
+ THROWF(timeout_error, 0, "Communication timeouted because of receiver");
}
CATCH(req->issuer->running_ctx->exception) {
req->issuer->doexception = 1;
case SIMIX_SRC_HOST_FAILURE:
TRY {
if (req->issuer == action->comm.src_proc)
- THROW0(host_error, 0, "Host failed");
+ THROWF(host_error, 0, "Host failed");
else
- THROW0(network_error, 0, "Remote peer failed");
+ THROWF(network_error, 0, "Remote peer failed");
}
CATCH(req->issuer->running_ctx->exception) {
req->issuer->doexception = 1;
case SIMIX_DST_HOST_FAILURE:
TRY {
if (req->issuer == action->comm.dst_proc)
- THROW0(host_error, 0, "Host failed");
+ THROWF(host_error, 0, "Host failed");
else
- THROW0(network_error, 0, "Remote peer failed");
+ THROWF(network_error, 0, "Remote peer failed");
}
CATCH(req->issuer->running_ctx->exception) {
req->issuer->doexception = 1;
XBT_DEBUG("Link failure in action %p between '%s' and '%s': posting an exception to the issuer: %s (%p)",
action, action->comm.src_proc->smx_host->name, action->comm.dst_proc->smx_host->name,
req->issuer->name, req->issuer);
- THROW0(network_error, 0, "Link failure");
+ THROWF(network_error, 0, "Link failure");
}
CATCH(req->issuer->running_ctx->exception) {
req->issuer->doexception = 1;
{
double remains;
+ if(!action){
+ return 0;
+ }
+
switch (action->state) {
case SIMIX_RUNNING:
*/
XBT_INLINE int SIMIX_comm_is_latency_bounded(smx_action_t action)
{
+ if(!action){
+ return 0;
+ }
if (action->comm.surf_comm){
XBT_DEBUG("Getting latency limited for surf_action (%p)", action->comm.surf_comm);
action->latency_limited = surf_workstation_model->get_latency_limited(action->comm.surf_comm);
void SIMIX_comm_copy_pointer_callback(smx_action_t comm, size_t buff_size)
{
- xbt_assert1((buff_size == sizeof(void *)),
+ xbt_assert((buff_size == sizeof(void *)),
"Cannot copy %zu bytes: must be sizeof(void*)", buff_size);
*(void **) (comm->comm.dst_buff) = comm->comm.src_buff;
}