XBT_LOG_NEW_DEFAULT_CATEGORY(async_waitany, "Messages specific for this example");
-static int sender(int argc, char* argv[])
+static void sender(int argc, char* argv[])
{
xbt_assert(argc == 4, "Expecting 3 parameters from the XML deployment file but got %d", argc);
long messages_count = xbt_str_parse_int(argv[1], "Invalid amount of tasks: %s");
* Even in this simple example, the pending comms do not terminate in the exact same order of creation.
*/
while (pending_comms_count != 0) {
- int changed_pos = sg_comm_wait_any_for(pending_comms, pending_comms_count, -1);
+ int changed_pos = sg_comm_wait_any(pending_comms, pending_comms_count);
memmove(pending_comms + changed_pos, pending_comms + changed_pos + 1,
sizeof(sg_comm_t) * (pending_comms_count - changed_pos - 1));
pending_comms_count--;
free(mboxes);
XBT_INFO("Goodbye now!");
- return 0;
}
-static int receiver(int argc, char* argv[])
+static void receiver(int argc, char* argv[])
{
xbt_assert(argc == 2, "Expecting one parameter from the XML deployment file but got %d", argc);
int id = xbt_str_parse_int(argv[1], "ID should be numerical, not %s");
}
XBT_INFO("I'm done. See you!");
- return 0;
}
int main(int argc, char* argv[])