From ec353ddb75a8fc57fb3b1243fed37e0df06f7305 Mon Sep 17 00:00:00 2001 From: Frederic Suter Date: Tue, 6 Jun 2017 03:02:02 +0200 Subject: [PATCH] tiny stuff --- examples/msg/app-chainsend/peer.c | 3 +-- examples/smpi/replay_multiple/replay_multiple.c | 3 +-- src/s4u/s4u_actor.cpp | 1 + src/simix/ActorImpl.cpp | 5 ++--- 4 files changed, 5 insertions(+), 7 deletions(-) diff --git a/examples/msg/app-chainsend/peer.c b/examples/msg/app-chainsend/peer.c index f0f6fb1501..63fa465069 100644 --- a/examples/msg/app-chainsend/peer.c +++ b/examples/msg/app-chainsend/peer.c @@ -19,9 +19,8 @@ void peer_init_chain(peer_t peer, message_t msg) static void peer_forward_msg(peer_t peer, message_t msg) { msg_task_t task = task_message_data_new(NULL, msg->data_length); - msg_comm_t comm = NULL; XBT_DEBUG("Sending (isend) from %s into mailbox %s", peer->me, peer->next); - comm = MSG_task_isend(task, peer->next); + msg_comm_t comm = MSG_task_isend(task, peer->next); queue_pending_connection(comm, peer->pending_sends); } diff --git a/examples/smpi/replay_multiple/replay_multiple.c b/examples/smpi/replay_multiple/replay_multiple.c index 4c064df958..a7cfeb5a96 100644 --- a/examples/smpi/replay_multiple/replay_multiple.c +++ b/examples/smpi/replay_multiple/replay_multiple.c @@ -31,7 +31,6 @@ int main(int argc, char *argv[]){ xbt_die("Cannot open %s", argv[1]); char *line = NULL; size_t n = 0; - int instance_size = 0; const char* instance_id = NULL; while (xbt_getline(&line, &n, fp) != -1 ){ xbt_dynar_t elems = xbt_str_split_quoted_in_place(line); @@ -41,7 +40,7 @@ int main(int argc, char *argv[]){ const char** line_char= xbt_dynar_to_array(elems); instance_id = line_char[0]; - instance_size = xbt_str_parse_int(line_char[2], "Invalid size: %s"); + int instance_size = xbt_str_parse_int(line_char[2], "Invalid size: %s"); XBT_INFO("Initializing instance %s of size %d", instance_id, instance_size); SMPI_app_instance_register(instance_id, smpi_replay,instance_size); diff --git a/src/s4u/s4u_actor.cpp b/src/s4u/s4u_actor.cpp index 010a9d801d..37d935fbff 100644 --- a/src/s4u/s4u_actor.cpp +++ b/src/s4u/s4u_actor.cpp @@ -215,6 +215,7 @@ CommPtr isend(MailboxPtr chan, void* payload, double simulatedSize) { return Comm::send_async(chan, payload, simulatedSize); } + void dsend(MailboxPtr chan, void* payload, double simulatedSize) { Comm::send_detached(chan, payload, simulatedSize); diff --git a/src/simix/ActorImpl.cpp b/src/simix/ActorImpl.cpp index ad1998e5af..f725f86c22 100644 --- a/src/simix/ActorImpl.cpp +++ b/src/simix/ActorImpl.cpp @@ -81,15 +81,14 @@ int SIMIX_process_has_pending_comms(smx_actor_t process) { */ void SIMIX_process_cleanup(smx_actor_t process) { - XBT_DEBUG("Cleanup process %s (%p), waiting synchro %p", - process->name.c_str(), process, process->waiting_synchro); + XBT_DEBUG("Cleanup process %s (%p), waiting synchro %p", process->name.c_str(), process, process->waiting_synchro); process->finished = true; SIMIX_process_on_exit_runall(process); /* Unregister from the kill timer if any */ if (process->kill_timer != nullptr) - SIMIX_timer_remove(process->kill_timer); + SIMIX_timer_remove(process->kill_timer); xbt_os_mutex_acquire(simix_global->mutex); -- 2.20.1