/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-/* Create a log channel to have nice outputs. */
-#include "xbt/log.h"
-#include "xbt/asserts.h"
-XBT_LOG_NEW_DEFAULT_CATEGORY(msg_test,
- "Messages specific for this msg example");
+XBT_LOG_NEW_DEFAULT_CATEGORY(msg_test, "Messages specific for this msg example");
sprintf(mailbox, "slave-%ld", i % number_of_slaves);
sprintf(sprintf_buffer, "Task_%d", i);
task = MSG_task_create(sprintf_buffer, task_comp_size, task_comm_size, NULL);
sprintf(mailbox, "slave-%ld", i % number_of_slaves);
sprintf(sprintf_buffer, "Task_%d", i);
task = MSG_task_create(sprintf_buffer, task_comp_size, task_comm_size, NULL);
- XBT_DEBUG("Sending \"%s\" (of %ld) to mailbox \"%s\"", task->name,
- number_of_jobs, mailbox);
+ XBT_DEBUG("Sending \"%s\" (of %ld) to mailbox \"%s\"", task->name, number_of_jobs, mailbox);
int main(int argc, char *argv[])
{
msg_error_t res = MSG_OK;
int main(int argc, char *argv[])
{
msg_error_t res = MSG_OK;
MSG_function_register("master", master);
MSG_function_register("slave", slave);
MSG_function_register("master", master);
MSG_function_register("slave", slave);
- MSG_process_create( "master", master,
- NULL,
- host_table[my_random(number_max)]
- );
+ MSG_process_create("master", master, NULL, host_table[my_random(number_max)]);
for(i = 0 ; i<number_of_slaves; i++) {
char* name_host = bprintf("slave-%ld",i);
for(i = 0 ; i<number_of_slaves; i++) {
char* name_host = bprintf("slave-%ld",i);
- MSG_process_create( name_host, slave,
- NULL,
- host_table[my_random(number_max)]
- );
+ MSG_process_create( name_host, slave, NULL, host_table[my_random(number_max)]);