From: Samuel Lepetit Date: Fri, 29 Jun 2012 10:01:07 +0000 (+0200) Subject: Use msg_error_t instead of MSG_error_t X-Git-Tag: v3_8~409 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/a34aa584ccd2bdb81659d0e5df22864cf999c0f4 Use msg_error_t instead of MSG_error_t --- diff --git a/examples/msg/actions/actions.c b/examples/msg/actions/actions.c index a0592eca11..4866c340a1 100644 --- a/examples/msg/actions/actions.c +++ b/examples/msg/actions/actions.c @@ -165,7 +165,7 @@ static void action_recv(const char *const *action) #endif XBT_DEBUG("Receiving: %s", name); - MSG_error_t res = MSG_task_receive(&task, mailbox_name); + msg_error_t res = MSG_task_receive(&task, mailbox_name); // MSG_task_receive(&task, MSG_process_get_name(MSG_process_self())); XBT_VERB("%s %f", name, MSG_get_clock() - clock); @@ -546,7 +546,7 @@ static void action_finalize(const char *const *action) /** Main function */ int main(int argc, char *argv[]) { - MSG_error_t res = MSG_OK; + msg_error_t res = MSG_OK; /* Check the given arguments */ MSG_init(&argc, argv); diff --git a/examples/msg/chord/chord.c b/examples/msg/chord/chord.c index 34488fe53c..8ee9d552bc 100644 --- a/examples/msg/chord/chord.c +++ b/examples/msg/chord/chord.c @@ -361,7 +361,7 @@ int node(int argc, char *argv[]) // a transfer has occured - MSG_error_t status = MSG_comm_get_status(node.comm_receive); + msg_error_t status = MSG_comm_get_status(node.comm_receive); if (status != MSG_OK) { XBT_DEBUG("Failed to receive a task. Nevermind."); @@ -613,7 +613,7 @@ static int remote_find_successor(node_t node, int ask_to, int id) // send a "Find Successor" request to ask_to_id msg_task_t task_sent = MSG_task_create(NULL, COMP_SIZE, COMM_SIZE, req_data); XBT_DEBUG("Sending a 'Find Successor' request (task %p) to %d for id %d", task_sent, ask_to, id); - MSG_error_t res = MSG_task_send_with_timeout(task_sent, mailbox, timeout); + msg_error_t res = MSG_task_send_with_timeout(task_sent, mailbox, timeout); if (res != MSG_OK) { XBT_DEBUG("Failed to send the 'Find Successor' request (task %p) to %d for id %d", @@ -694,7 +694,7 @@ static int remote_get_predecessor(node_t node, int ask_to) // send a "Get Predecessor" request to ask_to_id XBT_DEBUG("Sending a 'Get Predecessor' request to %d", ask_to); msg_task_t task_sent = MSG_task_create(NULL, COMP_SIZE, COMM_SIZE, req_data); - MSG_error_t res = MSG_task_send_with_timeout(task_sent, mailbox, timeout); + msg_error_t res = MSG_task_send_with_timeout(task_sent, mailbox, timeout); if (res != MSG_OK) { XBT_DEBUG("Failed to send the 'Get Predecessor' request (task %p) to %d", @@ -923,7 +923,7 @@ int main(int argc, char *argv[]) MSG_function_register("node", node); MSG_launch_application(application_file); - MSG_error_t res = MSG_main(); + msg_error_t res = MSG_main(); XBT_CRITICAL("Messages created: %ld", smx_total_comms); XBT_INFO("Simulated time: %g", MSG_get_clock()); diff --git a/examples/msg/cloud/masterslave_virtual_machines.c b/examples/msg/cloud/masterslave_virtual_machines.c index 428d40c5d6..4d6a84d794 100644 --- a/examples/msg/cloud/masterslave_virtual_machines.c +++ b/examples/msg/cloud/masterslave_virtual_machines.c @@ -168,7 +168,7 @@ int slave_fun(int argc, char *argv[]) /** Main function */ int main(int argc, char *argv[]) { - MSG_error_t res = MSG_OK; + msg_error_t res = MSG_OK; xbt_dynar_t hosts_dynar; msg_host_t*hosts= xbt_new(msg_host_t,10); char**hostnames= xbt_new(char*,10); diff --git a/examples/msg/gpu/test_MSG_gpu_task_create.c b/examples/msg/gpu/test_MSG_gpu_task_create.c index 88109c99c9..ad78f79191 100644 --- a/examples/msg/gpu/test_MSG_gpu_task_create.c +++ b/examples/msg/gpu/test_MSG_gpu_task_create.c @@ -22,7 +22,7 @@ XBT_LOG_NEW_DEFAULT_CATEGORY(msg_test, /** Main function */ int main(int argc, char *argv[]) { - MSG_error_t res = MSG_OK; + msg_error_t res = MSG_OK; MSG_init(&argc, argv); diff --git a/examples/msg/gtnets/gtnets.c b/examples/msg/gtnets/gtnets.c index b80ee635c1..defbc80d0d 100644 --- a/examples/msg/gtnets/gtnets.c +++ b/examples/msg/gtnets/gtnets.c @@ -21,7 +21,7 @@ XBT_LOG_NEW_DEFAULT_CATEGORY(msg_test, int master(int argc, char *argv[]); int slave(int argc, char *argv[]); int timer(int argc, char *argv[]); -MSG_error_t test_all(const char *platform_file, +msg_error_t test_all(const char *platform_file, const char *application_file); int timer_start = 1; @@ -201,10 +201,10 @@ int slave(int argc, char *argv[]) } /* end_of_slave */ /** Test function */ -MSG_error_t test_all(const char *platform_file, +msg_error_t test_all(const char *platform_file, const char *application_file) { - MSG_error_t res = MSG_OK; + msg_error_t res = MSG_OK; /* MSG_config("workstation/model", "GTNETS"); */ /* MSG_config("workstation/model","KCCFLN05"); */ @@ -228,7 +228,7 @@ MSG_error_t test_all(const char *platform_file, /** Main function */ int main(int argc, char *argv[]) { - MSG_error_t res = MSG_OK; + msg_error_t res = MSG_OK; bool_printed = 0; MSG_init(&argc, argv); diff --git a/examples/msg/icomms/peer.c b/examples/msg/icomms/peer.c index 2e5d8ed094..cfcfa8dfb7 100644 --- a/examples/msg/icomms/peer.c +++ b/examples/msg/icomms/peer.c @@ -28,7 +28,7 @@ XBT_LOG_NEW_DEFAULT_CATEGORY(msg_test, int sender(int argc, char *argv[]); int receiver(int argc, char *argv[]); -MSG_error_t test_all(const char *platform_file, +msg_error_t test_all(const char *platform_file, const char *application_file); /** Sender function */ @@ -97,7 +97,7 @@ int sender(int argc, char *argv[]) int receiver(int argc, char *argv[]) { msg_task_t task = NULL; - _XBT_GNUC_UNUSED MSG_error_t res; + _XBT_GNUC_UNUSED msg_error_t res; int id = -1; char mailbox[80]; msg_comm_t res_irecv; @@ -145,10 +145,10 @@ int receiver(int argc, char *argv[]) } /* end_of_receiver */ /** Test function */ -MSG_error_t test_all(const char *platform_file, +msg_error_t test_all(const char *platform_file, const char *application_file) { - MSG_error_t res = MSG_OK; + msg_error_t res = MSG_OK; /* MSG_config("workstation/model","KCCFLN05"); */ { /* Simulation setting */ @@ -169,7 +169,7 @@ MSG_error_t test_all(const char *platform_file, /** Main function */ int main(int argc, char *argv[]) { - MSG_error_t res = MSG_OK; + msg_error_t res = MSG_OK; MSG_init(&argc, argv); if (argc < 3) { diff --git a/examples/msg/icomms/peer2.c b/examples/msg/icomms/peer2.c index caff585f5a..ee1111f9f8 100644 --- a/examples/msg/icomms/peer2.c +++ b/examples/msg/icomms/peer2.c @@ -22,7 +22,7 @@ XBT_LOG_NEW_DEFAULT_CATEGORY(msg_test, int sender(int argc, char *argv[]); int receiver(int argc, char *argv[]); -MSG_error_t test_all(const char *platform_file, +msg_error_t test_all(const char *platform_file, const char *application_file); /** Sender function */ @@ -67,7 +67,7 @@ int sender(int argc, char *argv[]) int receiver(int argc, char *argv[]) { msg_task_t task = NULL; - _XBT_GNUC_UNUSED MSG_error_t res; + _XBT_GNUC_UNUSED msg_error_t res; int id = -1; char mailbox[80]; msg_comm_t res_irecv; @@ -98,10 +98,10 @@ int receiver(int argc, char *argv[]) } /* end_of_receiver */ /** Test function */ -MSG_error_t test_all(const char *platform_file, +msg_error_t test_all(const char *platform_file, const char *application_file) { - MSG_error_t res = MSG_OK; + msg_error_t res = MSG_OK; /* MSG_config("workstation/model","KCCFLN05"); */ { /* Simulation setting */ @@ -122,7 +122,7 @@ MSG_error_t test_all(const char *platform_file, /** Main function */ int main(int argc, char *argv[]) { - MSG_error_t res = MSG_OK; + msg_error_t res = MSG_OK; MSG_init(&argc, argv); if (argc < 3) { diff --git a/examples/msg/icomms/peer3.c b/examples/msg/icomms/peer3.c index 21a093fe53..ae82a7c44b 100644 --- a/examples/msg/icomms/peer3.c +++ b/examples/msg/icomms/peer3.c @@ -22,7 +22,7 @@ XBT_LOG_NEW_DEFAULT_CATEGORY(msg_test, int sender(int argc, char *argv[]); int receiver(int argc, char *argv[]); -MSG_error_t test_all(const char *platform_file, +msg_error_t test_all(const char *platform_file, const char *application_file); /** Sender function */ @@ -69,7 +69,7 @@ int sender(int argc, char *argv[]) sprintf(mailbox, "finalize"); msg_comm_t res_irecv; - _XBT_GNUC_UNUSED MSG_error_t res_wait; + _XBT_GNUC_UNUSED msg_error_t res_wait; for (i = 0; i < receivers_count; i++) { task = NULL; res_irecv = MSG_task_irecv(&(task), mailbox); @@ -109,7 +109,7 @@ int receiver(int argc, char *argv[]) /* Here we are waiting for the receiving of all communications */ msg_task_t task_com; while (!xbt_dynar_is_empty(comms)) { - _XBT_GNUC_UNUSED MSG_error_t err; + _XBT_GNUC_UNUSED msg_error_t err; xbt_dynar_remove_at(comms, MSG_comm_waitany(comms), &res_irecv); task_com = MSG_comm_get_task(res_irecv); MSG_comm_destroy(res_irecv); @@ -132,10 +132,10 @@ int receiver(int argc, char *argv[]) } /* end_of_receiver */ /** Test function */ -MSG_error_t test_all(const char *platform_file, +msg_error_t test_all(const char *platform_file, const char *application_file) { - MSG_error_t res = MSG_OK; + msg_error_t res = MSG_OK; /* MSG_config("workstation/model","KCCFLN05"); */ { /* Simulation setting */ @@ -156,7 +156,7 @@ MSG_error_t test_all(const char *platform_file, /** Main function */ int main(int argc, char *argv[]) { - MSG_error_t res = MSG_OK; + msg_error_t res = MSG_OK; MSG_init(&argc, argv); if (argc < 3) { diff --git a/examples/msg/masterslave/masterslave_arg.c b/examples/msg/masterslave/masterslave_arg.c index 002ecccc0c..ad3d593640 100644 --- a/examples/msg/masterslave/masterslave_arg.c +++ b/examples/msg/masterslave/masterslave_arg.c @@ -92,7 +92,7 @@ int slave(int argc, char *argv[]) /** Main function */ int main(int argc, char *argv[]) { - MSG_error_t res = MSG_OK; + msg_error_t res = MSG_OK; long i; MSG_init(&argc, argv); diff --git a/examples/msg/masterslave/masterslave_bypass.c b/examples/msg/masterslave/masterslave_bypass.c index 6da369204f..95bc507816 100644 --- a/examples/msg/masterslave/masterslave_bypass.c +++ b/examples/msg/masterslave/masterslave_bypass.c @@ -150,7 +150,7 @@ static int surf_parse_bypass_application(void) int master(int argc, char *argv[]); int slave(int argc, char *argv[]); -MSG_error_t test_all(void); +msg_error_t test_all(void); /** Emitter function */ int master(int argc, char *argv[]) @@ -256,9 +256,9 @@ int slave(int argc, char *argv[]) } /* end_of_slave */ /** Test function */ -MSG_error_t test_all(void) +msg_error_t test_all(void) { - MSG_error_t res = MSG_OK; + msg_error_t res = MSG_OK; /* Simulation setting */ surf_parse = surf_parse_bypass_platform; @@ -279,7 +279,7 @@ MSG_error_t test_all(void) /** Main function */ int main(int argc, char *argv[]) { - MSG_error_t res = MSG_OK; + msg_error_t res = MSG_OK; MSG_init(&argc, argv); res = test_all(); diff --git a/examples/msg/masterslave/masterslave_cluster.c b/examples/msg/masterslave/masterslave_cluster.c index 91579be501..8c02de79d9 100644 --- a/examples/msg/masterslave/masterslave_cluster.c +++ b/examples/msg/masterslave/masterslave_cluster.c @@ -16,7 +16,7 @@ XBT_LOG_NEW_DEFAULT_CATEGORY(msg_test, #define FINALIZE ((void*)221297) /* a magic number to tell people to stop working */ -MSG_error_t test_all(const char *platform_file); +msg_error_t test_all(const char *platform_file); int master(int argc, char *argv[]); @@ -197,9 +197,9 @@ static int bypass_deployment(void) } /** Test function */ -MSG_error_t test_all(const char *platform_file) +msg_error_t test_all(const char *platform_file) { - MSG_error_t res = MSG_OK; + msg_error_t res = MSG_OK; MSG_create_environment(platform_file); MSG_function_register("master", master); MSG_function_register("slave", slave); @@ -216,7 +216,7 @@ MSG_error_t test_all(const char *platform_file) /** Main function */ int main(int argc, char *argv[]) { - MSG_error_t res = MSG_OK; + msg_error_t res = MSG_OK; MSG_init(&argc, argv); res = test_all(argv[1]); diff --git a/examples/msg/masterslave/masterslave_console.c b/examples/msg/masterslave/masterslave_console.c index 963a49edce..ecefae12e5 100644 --- a/examples/msg/masterslave/masterslave_console.c +++ b/examples/msg/masterslave/masterslave_console.c @@ -26,7 +26,7 @@ XBT_LOG_NEW_DEFAULT_CATEGORY(msg_test, int master(int argc, char *argv[]); int slave(int argc, char *argv[]); -MSG_error_t test_all(const char *); +msg_error_t test_all(const char *); /** Emitter function */ int master(int argc, char *argv[]) @@ -104,9 +104,9 @@ int slave(int argc, char *argv[]) } /* end_of_slave */ /** Test function */ -MSG_error_t test_all(const char *file) //(void) +msg_error_t test_all(const char *file) //(void) { - MSG_error_t res = MSG_OK; + msg_error_t res = MSG_OK; /*start by registering functions before loading script */ MSG_function_register("master", master); @@ -122,7 +122,7 @@ MSG_error_t test_all(const char *file) //(void) /** Main function */ int main(int argc, char *argv[]) { - MSG_error_t res = MSG_OK; + msg_error_t res = MSG_OK; MSG_init(&argc, argv); if (argc < 2) { diff --git a/examples/msg/masterslave/masterslave_failure.c b/examples/msg/masterslave/masterslave_failure.c index a9b6bf8d97..7292997165 100644 --- a/examples/msg/masterslave/masterslave_failure.c +++ b/examples/msg/masterslave/masterslave_failure.c @@ -17,7 +17,7 @@ XBT_LOG_NEW_DEFAULT_CATEGORY(msg_test, int master(int argc, char *argv[]); int slave(int argc, char *argv[]); int forwarder(int argc, char *argv[]); -MSG_error_t test_all(const char *platform_file, +msg_error_t test_all(const char *platform_file, const char *application_file); #define FINALIZE ((void*)221297) /* a magic number to tell people to stop working */ @@ -177,10 +177,10 @@ int slave(int argc, char *argv[]) } /* end_of_slave */ /** Test function */ -MSG_error_t test_all(const char *platform_file, +msg_error_t test_all(const char *platform_file, const char *application_file) { - MSG_error_t res = MSG_OK; + msg_error_t res = MSG_OK; /* MSG_config("workstation/model","KCCFLN05"); */ { /* Simulation setting */ @@ -201,7 +201,7 @@ MSG_error_t test_all(const char *platform_file, /** Main function */ int main(int argc, char *argv[]) { - MSG_error_t res = MSG_OK; + msg_error_t res = MSG_OK; MSG_init(&argc, argv); if (argc < 3) { diff --git a/examples/msg/masterslave/masterslave_forwarder.c b/examples/msg/masterslave/masterslave_forwarder.c index bcb19653b0..3817018ef1 100644 --- a/examples/msg/masterslave/masterslave_forwarder.c +++ b/examples/msg/masterslave/masterslave_forwarder.c @@ -26,7 +26,7 @@ XBT_LOG_NEW_DEFAULT_CATEGORY(msg_test, int master(int argc, char *argv[]); int slave(int argc, char *argv[]); int forwarder(int argc, char *argv[]); -MSG_error_t test_all(const char *platform_file, +msg_error_t test_all(const char *platform_file, const char *application_file); #define FINALIZE ((void*)221297) /* a magic number to tell people to stop working */ @@ -180,10 +180,10 @@ int forwarder(int argc, char *argv[]) } /* end_of_forwarder */ /** Test function */ -MSG_error_t test_all(const char *platform_file, +msg_error_t test_all(const char *platform_file, const char *application_file) { - MSG_error_t res = MSG_OK; + msg_error_t res = MSG_OK; /* MSG_config("workstation/model","KCCFLN05"); */ { /* Simulation setting */ @@ -205,7 +205,7 @@ MSG_error_t test_all(const char *platform_file, /** Main function */ int main(int argc, char *argv[]) { - MSG_error_t res = MSG_OK; + msg_error_t res = MSG_OK; MSG_init(&argc, argv); if (argc < 3) { diff --git a/examples/msg/masterslave/masterslave_kill.c b/examples/msg/masterslave/masterslave_kill.c index 01a0e85bc0..85d50d6a48 100644 --- a/examples/msg/masterslave/masterslave_kill.c +++ b/examples/msg/masterslave/masterslave_kill.c @@ -43,10 +43,10 @@ static int master(int argc, char *argv[]) } /* end_of_dram_master */ /** Test function */ -static MSG_error_t test_all(const char *platform_file, +static msg_error_t test_all(const char *platform_file, const char *application_file) { - MSG_error_t res = MSG_OK; + msg_error_t res = MSG_OK; MSG_create_environment(platform_file); MSG_function_register("master", master); @@ -63,7 +63,7 @@ static MSG_error_t test_all(const char *platform_file, /** Main function */ int main(int argc, char *argv[]) { - MSG_error_t res = MSG_OK; + msg_error_t res = MSG_OK; MSG_init(&argc, argv); if (argc < 3) { diff --git a/examples/msg/masterslave/masterslave_mailbox.c b/examples/msg/masterslave/masterslave_mailbox.c index 1aabaa2f74..d69ed23a23 100644 --- a/examples/msg/masterslave/masterslave_mailbox.c +++ b/examples/msg/masterslave/masterslave_mailbox.c @@ -17,7 +17,7 @@ XBT_LOG_NEW_DEFAULT_CATEGORY(msg_test, int master(int argc, char *argv[]); int slave(int argc, char *argv[]); int forwarder(int argc, char *argv[]); -MSG_error_t test_all(const char *platform_file, +msg_error_t test_all(const char *platform_file, const char *application_file); /** Emitter function */ @@ -100,7 +100,7 @@ int slave(int argc, char *argv[]) /** Main function */ int main(int argc, char *argv[]) { - MSG_error_t res; + msg_error_t res; const char *platform_file; const char *application_file; diff --git a/examples/msg/migration/migration.c b/examples/msg/migration/migration.c index 7ce09671ff..fc14097711 100644 --- a/examples/msg/migration/migration.c +++ b/examples/msg/migration/migration.c @@ -71,7 +71,7 @@ static int policeman(int argc, char *argv[]) /** Main function */ int main(int argc, char *argv[]) { - MSG_error_t res = MSG_OK; + msg_error_t res = MSG_OK; /* Argument checking */ MSG_init(&argc, argv); diff --git a/examples/msg/ns3/ns3.c b/examples/msg/ns3/ns3.c index d668579671..44e213efc8 100644 --- a/examples/msg/ns3/ns3.c +++ b/examples/msg/ns3/ns3.c @@ -35,7 +35,7 @@ XBT_LOG_NEW_DEFAULT_CATEGORY(msg_test, int master(int argc, char *argv[]); int slave(int argc, char *argv[]); int timer(int argc, char *argv[]); -MSG_error_t test_all(const char *platform_file, +msg_error_t test_all(const char *platform_file, const char *application_file); int timer_start; //set as 1 in the master process @@ -180,10 +180,10 @@ int slave(int argc, char *argv[]) } /* end_of_slave */ /** Test function */ -MSG_error_t test_all(const char *platform_file, +msg_error_t test_all(const char *platform_file, const char *application_file) { - MSG_error_t res = MSG_OK; + msg_error_t res = MSG_OK; /* MSG_config("workstation/model", "GTNETS"); */ /* MSG_config("workstation/model","KCCFLN05"); */ @@ -207,7 +207,7 @@ MSG_error_t test_all(const char *platform_file, /** Main function */ int main(int argc, char *argv[]) { - MSG_error_t res = MSG_OK; + msg_error_t res = MSG_OK; bool_printed = 0; MSG_init(&argc, argv); diff --git a/examples/msg/parallel_task/parallel_task.c b/examples/msg/parallel_task/parallel_task.c index c76d604d99..7bd1811a3b 100644 --- a/examples/msg/parallel_task/parallel_task.c +++ b/examples/msg/parallel_task/parallel_task.c @@ -25,7 +25,7 @@ XBT_LOG_NEW_DEFAULT_CATEGORY(msg_test, */ int test(int argc, char *argv[]); -MSG_error_t test_all(const char *platform_file); +msg_error_t test_all(const char *platform_file); /** Emitter function */ int test(int argc, char *argv[]) @@ -71,9 +71,9 @@ int test(int argc, char *argv[]) } /** Test function */ -MSG_error_t test_all(const char *platform_file) +msg_error_t test_all(const char *platform_file) { - MSG_error_t res = MSG_OK; + msg_error_t res = MSG_OK; xbt_dynar_t all_hosts; msg_host_t first_host; @@ -92,7 +92,7 @@ MSG_error_t test_all(const char *platform_file) int main(int argc, char *argv[]) { - MSG_error_t res = MSG_OK; + msg_error_t res = MSG_OK; MSG_init(&argc, argv); if (argc < 2) { diff --git a/examples/msg/parallel_task/test_ptask.c b/examples/msg/parallel_task/test_ptask.c index 6d3d0e4dab..5cae52262d 100644 --- a/examples/msg/parallel_task/test_ptask.c +++ b/examples/msg/parallel_task/test_ptask.c @@ -17,7 +17,7 @@ XBT_LOG_NEW_DEFAULT_CATEGORY(msg_test, int execute(int argc, char *argv[]); int redistribute(int argc, char *argv[]); -MSG_error_t test_all(const char *platform_file, +msg_error_t test_all(const char *platform_file, const char *application_file); @@ -131,10 +131,10 @@ int redistribute(int argc, char *argv[]) } -MSG_error_t test_all(const char *platform_file, +msg_error_t test_all(const char *platform_file, const char *application_file) { - MSG_error_t res = MSG_OK; + msg_error_t res = MSG_OK; MSG_config("workstation/model", "ptask_L07"); @@ -156,7 +156,7 @@ MSG_error_t test_all(const char *platform_file, int main(int argc, char *argv[]) { - MSG_error_t res = MSG_OK; + msg_error_t res = MSG_OK; MSG_init(&argc, argv); if (argc < 3) { diff --git a/examples/msg/pmm/msg_pmm.c b/examples/msg/pmm/msg_pmm.c index 7b95d9c123..058b525e2e 100644 --- a/examples/msg/pmm/msg_pmm.c +++ b/examples/msg/pmm/msg_pmm.c @@ -274,7 +274,7 @@ int main(int argc, char *argv[]) #ifdef BENCH_THIS_CODE xbt_os_timer_start(timer); #endif - MSG_error_t res = MSG_main(); + msg_error_t res = MSG_main(); #ifdef BENCH_THIS_CODE xbt_os_timer_stop(timer); #endif diff --git a/examples/msg/priority/priority.c b/examples/msg/priority/priority.c index df17a483d8..958ebfe0a7 100644 --- a/examples/msg/priority/priority.c +++ b/examples/msg/priority/priority.c @@ -45,10 +45,10 @@ static int test(int argc, char *argv[]) return 0; } -static MSG_error_t test_all(const char *platform_file, +static msg_error_t test_all(const char *platform_file, const char *application_file) { - MSG_error_t res = MSG_OK; + msg_error_t res = MSG_OK; { /* Simulation setting */ MSG_create_environment(platform_file); @@ -65,7 +65,7 @@ static MSG_error_t test_all(const char *platform_file, int main(int argc, char *argv[]) { - MSG_error_t res = MSG_OK; + msg_error_t res = MSG_OK; #ifdef _MSC_VER unsigned int prev_exponent_format = diff --git a/examples/msg/properties/msg_prop.c b/examples/msg/properties/msg_prop.c index a0ecf5b617..7c05736efc 100644 --- a/examples/msg/properties/msg_prop.c +++ b/examples/msg/properties/msg_prop.c @@ -32,7 +32,7 @@ int alice(int argc, char *argv[]); int bob(int argc, char *argv[]); int carole(int argc, char *argv[]); int forwarder(int argc, char *argv[]); -MSG_error_t test_all(const char *platform_file, +msg_error_t test_all(const char *platform_file, const char *application_file); static void test_host(const char*hostname) @@ -109,7 +109,7 @@ int bob(int argc, char *argv[]) } /** Test function */ -MSG_error_t test_all(const char *platform_file, +msg_error_t test_all(const char *platform_file, const char *application_file) { MSG_function_register("alice", alice); @@ -126,7 +126,7 @@ MSG_error_t test_all(const char *platform_file, /** Main function */ int main(int argc, char *argv[]) { - MSG_error_t res = MSG_OK; + msg_error_t res = MSG_OK; MSG_init(&argc, argv); if (argc < 3) { diff --git a/examples/msg/sendrecv/sendrecv.c b/examples/msg/sendrecv/sendrecv.c index 52e18622dd..bfd7b3b323 100644 --- a/examples/msg/sendrecv/sendrecv.c +++ b/examples/msg/sendrecv/sendrecv.c @@ -26,7 +26,7 @@ XBT_LOG_NEW_DEFAULT_CATEGORY(msg_test, int sender(int argc, char *argv[]); int receiver(int argc, char *argv[]); -MSG_error_t test_all(const char *platform_file, +msg_error_t test_all(const char *platform_file, const char *application_file); double task_comm_size_lat = 10e0; @@ -130,11 +130,11 @@ int receiver(int argc, char *argv[]) /** Test function */ -MSG_error_t test_all(const char *platform_file, +msg_error_t test_all(const char *platform_file, const char *application_file) { - MSG_error_t res = MSG_OK; + msg_error_t res = MSG_OK; @@ -158,7 +158,7 @@ MSG_error_t test_all(const char *platform_file, /** Main function */ int main(int argc, char *argv[]) { - MSG_error_t res = MSG_OK; + msg_error_t res = MSG_OK; #ifdef _MSC_VER unsigned int prev_exponent_format = diff --git a/examples/msg/start_kill_time/sk_time.c b/examples/msg/start_kill_time/sk_time.c index 1b293b396c..af61d3717d 100644 --- a/examples/msg/start_kill_time/sk_time.c +++ b/examples/msg/start_kill_time/sk_time.c @@ -30,10 +30,10 @@ static int master(int argc, char *argv[]) } /* end_of_dram_master */ /** Test function */ -static MSG_error_t test_all(const char *platform_file, +static msg_error_t test_all(const char *platform_file, const char *application_file) { - MSG_error_t res = MSG_OK; + msg_error_t res = MSG_OK; MSG_create_environment(platform_file); MSG_function_register("master", master); @@ -50,7 +50,7 @@ static MSG_error_t test_all(const char *platform_file, /** Main function */ int main(int argc, char *argv[]) { - MSG_error_t res = MSG_OK; + msg_error_t res = MSG_OK; MSG_init(&argc, argv); if (argc < 3) { diff --git a/examples/msg/suspend/suspend.c b/examples/msg/suspend/suspend.c index 60fe0712e3..ea62f62368 100644 --- a/examples/msg/suspend/suspend.c +++ b/examples/msg/suspend/suspend.c @@ -44,10 +44,10 @@ static int dream_master(int argc, char *argv[]) } /* end_of_dram_master */ /** Test function */ -static MSG_error_t test_all(const char *platform_file, +static msg_error_t test_all(const char *platform_file, const char *application_file) { - MSG_error_t res = MSG_OK; + msg_error_t res = MSG_OK; { /* Simulation setting */ MSG_create_environment(platform_file); @@ -66,7 +66,7 @@ static MSG_error_t test_all(const char *platform_file, /** Main function */ int main(int argc, char *argv[]) { - MSG_error_t res = MSG_OK; + msg_error_t res = MSG_OK; MSG_init(&argc, argv); if (argc < 3) { diff --git a/include/msg/msg.h b/include/msg/msg.h index 99888863ad..a6a21cbbe5 100644 --- a/include/msg/msg.h +++ b/include/msg/msg.h @@ -28,9 +28,10 @@ typedef enum { running has just been rebooted. Free your datastructures and return now !*/ MSG_TASK_CANCELED = 8 /**< @brief Canceled task. This task has been canceled by somebody!*/ -} MSG_error_t; +} msg_error_t; /** @} */ +typedef msg_error_t MSG_error_t; /************************** Global ******************************************/ XBT_PUBLIC(void) MSG_config(const char *name, ...); @@ -56,8 +57,8 @@ XBT_PUBLIC(void) MSG_config(const char *name, ...); } XBT_PUBLIC(void) MSG_init_nocheck(int *argc, char **argv); -XBT_PUBLIC(MSG_error_t) MSG_main(void); -XBT_PUBLIC(MSG_error_t) MSG_clean(void); +XBT_PUBLIC(msg_error_t) MSG_main(void); +XBT_PUBLIC(msg_error_t) MSG_clean(void); XBT_PUBLIC(void) MSG_function_register(const char *name, xbt_main_func_t code); XBT_PUBLIC(void) MSG_function_register_default(xbt_main_func_t code); @@ -81,7 +82,7 @@ XBT_PUBLIC(int) MSG_file_stat(msg_file_t fd, s_msg_stat_t *buf); /************************** Host handling ***********************************/ -XBT_PUBLIC(MSG_error_t) MSG_host_set_data(msg_host_t host, void *data); +XBT_PUBLIC(msg_error_t) MSG_host_set_data(msg_host_t host, void *data); XBT_PUBLIC(void *) MSG_host_get_data(msg_host_t host); XBT_PUBLIC(const char *) MSG_host_get_name(msg_host_t host); XBT_PUBLIC(msg_host_t) MSG_host_self(void); @@ -129,10 +130,10 @@ XBT_PUBLIC(msg_process_t) MSG_process_create_with_environment(const char XBT_PUBLIC(void) MSG_process_kill(msg_process_t process); XBT_PUBLIC(int) MSG_process_killall(int reset_PIDs); -XBT_PUBLIC(MSG_error_t) MSG_process_migrate(msg_process_t process, msg_host_t host); +XBT_PUBLIC(msg_error_t) MSG_process_migrate(msg_process_t process, msg_host_t host); XBT_PUBLIC(void *) MSG_process_get_data(msg_process_t process); -XBT_PUBLIC(MSG_error_t) MSG_process_set_data(msg_process_t process, +XBT_PUBLIC(msg_error_t) MSG_process_set_data(msg_process_t process, void *data); XBT_PUBLIC(void) MSG_process_set_data_cleanup(void_f_pvoid_t data_cleanup); XBT_PUBLIC(msg_host_t) MSG_process_get_host(msg_process_t process); @@ -144,7 +145,7 @@ XBT_PUBLIC(int) MSG_process_self_PID(void); XBT_PUBLIC(int) MSG_process_self_PPID(void); XBT_PUBLIC(msg_process_t) MSG_process_self(void); XBT_PUBLIC(xbt_dynar_t) MSG_processes_as_dynar(void); -XBT_PUBLIC(MSG_error_t) MSG_process_set_kill_time(msg_process_t process, double kill_time); +XBT_PUBLIC(msg_error_t) MSG_process_set_kill_time(msg_process_t process, double kill_time); /*property handlers*/ XBT_PUBLIC(xbt_dict_t) MSG_process_get_properties(msg_process_t process); @@ -152,8 +153,8 @@ XBT_PUBLIC(const char *) MSG_process_get_property_value(msg_process_t process, const char *name); -XBT_PUBLIC(MSG_error_t) MSG_process_suspend(msg_process_t process); -XBT_PUBLIC(MSG_error_t) MSG_process_resume(msg_process_t process); +XBT_PUBLIC(msg_error_t) MSG_process_suspend(msg_process_t process); +XBT_PUBLIC(msg_error_t) MSG_process_resume(msg_process_t process); XBT_PUBLIC(int) MSG_process_is_suspended(msg_process_t process); XBT_PUBLIC(void) MSG_process_on_exit(int_f_pvoid_t fun, void *data); XBT_PUBLIC(void) MSG_process_auto_restart_set(msg_process_t process, int auto_restart); @@ -180,17 +181,17 @@ XBT_PUBLIC(msg_process_t) MSG_task_get_sender(msg_task_t task); XBT_PUBLIC(msg_host_t) MSG_task_get_source(msg_task_t task); XBT_PUBLIC(const char *) MSG_task_get_name(msg_task_t task); XBT_PUBLIC(void) MSG_task_set_name(msg_task_t task, const char *name); -XBT_PUBLIC(MSG_error_t) MSG_task_cancel(msg_task_t task); -XBT_PUBLIC(MSG_error_t) MSG_task_destroy(msg_task_t task); +XBT_PUBLIC(msg_error_t) MSG_task_cancel(msg_task_t task); +XBT_PUBLIC(msg_error_t) MSG_task_destroy(msg_task_t task); -XBT_PUBLIC(MSG_error_t) MSG_task_receive_from_host(msg_task_t * task, const char *alias, +XBT_PUBLIC(msg_error_t) MSG_task_receive_from_host(msg_task_t * task, const char *alias, msg_host_t host); -XBT_PUBLIC(MSG_error_t) MSG_task_execute(msg_task_t task); -XBT_PUBLIC(MSG_error_t) MSG_parallel_task_execute(msg_task_t task); +XBT_PUBLIC(msg_error_t) MSG_task_execute(msg_task_t task); +XBT_PUBLIC(msg_error_t) MSG_parallel_task_execute(msg_task_t task); XBT_PUBLIC(void) MSG_task_set_priority(msg_task_t task, double priority); -XBT_PUBLIC(MSG_error_t) MSG_process_sleep(double nb_sec); +XBT_PUBLIC(msg_error_t) MSG_process_sleep(double nb_sec); XBT_PUBLIC(double) MSG_task_get_compute_duration(msg_task_t task); XBT_PUBLIC(void) MSG_task_set_compute_duration(msg_task_t task, @@ -201,15 +202,15 @@ XBT_PUBLIC(int) MSG_task_is_latency_bounded(msg_task_t task); XBT_PUBLIC(double) MSG_task_get_data_size(msg_task_t task); -XBT_PUBLIC(MSG_error_t) +XBT_PUBLIC(msg_error_t) MSG_task_receive_ext(msg_task_t * task, const char *alias, double timeout, msg_host_t host); -XBT_PUBLIC(MSG_error_t) +XBT_PUBLIC(msg_error_t) MSG_task_receive_with_timeout(msg_task_t * task, const char *alias, double timeout); -XBT_PUBLIC(MSG_error_t) +XBT_PUBLIC(msg_error_t) MSG_task_receive(msg_task_t * task, const char *alias); #define MSG_task_recv(t,a) MSG_task_receive(t,a) @@ -224,26 +225,26 @@ XBT_PUBLIC(msg_comm_t) MSG_task_irecv(msg_task_t * task, const char *alias); XBT_PUBLIC(int) MSG_comm_test(msg_comm_t comm); XBT_PUBLIC(int) MSG_comm_testany(xbt_dynar_t comms); XBT_PUBLIC(void) MSG_comm_destroy(msg_comm_t comm); -XBT_PUBLIC(MSG_error_t) MSG_comm_wait(msg_comm_t comm, double timeout); +XBT_PUBLIC(msg_error_t) MSG_comm_wait(msg_comm_t comm, double timeout); XBT_PUBLIC(void) MSG_comm_waitall(msg_comm_t * comm, int nb_elem, double timeout); XBT_PUBLIC(int) MSG_comm_waitany(xbt_dynar_t comms); XBT_PUBLIC(msg_task_t) MSG_comm_get_task(msg_comm_t comm); -XBT_PUBLIC(MSG_error_t) MSG_comm_get_status(msg_comm_t comm); +XBT_PUBLIC(msg_error_t) MSG_comm_get_status(msg_comm_t comm); XBT_PUBLIC(int) MSG_task_listen(const char *alias); XBT_PUBLIC(int) MSG_task_listen_from_host(const char *alias, msg_host_t host); -XBT_PUBLIC(MSG_error_t) +XBT_PUBLIC(msg_error_t) MSG_task_send_with_timeout(msg_task_t task, const char *alias, double timeout); -XBT_PUBLIC(MSG_error_t) +XBT_PUBLIC(msg_error_t) MSG_task_send(msg_task_t task, const char *alias); -XBT_PUBLIC(MSG_error_t) +XBT_PUBLIC(msg_error_t) MSG_task_send_bounded(msg_task_t task, const char *alias, double rate); XBT_PUBLIC(int) MSG_task_listen_from(const char *alias); @@ -252,16 +253,16 @@ XBT_PUBLIC(void) MSG_task_set_category (msg_task_t task, const char *category); XBT_PUBLIC(const char *) MSG_task_get_category (msg_task_t task); /************************** Task handling ************************************/ -XBT_PUBLIC(MSG_error_t) +XBT_PUBLIC(msg_error_t) MSG_mailbox_get_task_ext(msg_mailbox_t mailbox, msg_task_t * task, msg_host_t host, double timeout); -XBT_PUBLIC(MSG_error_t) +XBT_PUBLIC(msg_error_t) MSG_mailbox_put_with_timeout(msg_mailbox_t mailbox, msg_task_t task, double timeout); /************************** Action handling **********************************/ -MSG_error_t MSG_action_trace_run(char *path); +msg_error_t MSG_action_trace_run(char *path); #ifdef MSG_USE_DEPRECATED #define MSG_global_init(argc, argv) MSG_init(argc,argv) @@ -277,24 +278,24 @@ XBT_PUBLIC(msg_host_t *) MSG_get_host_table(void); MSG_mailbox_put_with_timeout(mailbox, task, timeout) #define MSG_process_change_host(h) MSG_process_migrate(MSG_process_self(),h); -XBT_PUBLIC(MSG_error_t) MSG_get_errno(void); +XBT_PUBLIC(msg_error_t) MSG_get_errno(void); -XBT_PUBLIC(MSG_error_t) MSG_task_get(msg_task_t * task, m_channel_t channel); -XBT_PUBLIC(MSG_error_t) MSG_task_get_with_timeout(msg_task_t * task, +XBT_PUBLIC(msg_error_t) MSG_task_get(msg_task_t * task, m_channel_t channel); +XBT_PUBLIC(msg_error_t) MSG_task_get_with_timeout(msg_task_t * task, m_channel_t channel, double max_duration); -XBT_PUBLIC(MSG_error_t) MSG_task_get_from_host(msg_task_t * task, +XBT_PUBLIC(msg_error_t) MSG_task_get_from_host(msg_task_t * task, int channel, msg_host_t host); -XBT_PUBLIC(MSG_error_t) MSG_task_get_ext(msg_task_t * task, int channel, +XBT_PUBLIC(msg_error_t) MSG_task_get_ext(msg_task_t * task, int channel, double max_duration, msg_host_t host); -XBT_PUBLIC(MSG_error_t) MSG_task_put(msg_task_t task, msg_host_t dest, +XBT_PUBLIC(msg_error_t) MSG_task_put(msg_task_t task, msg_host_t dest, m_channel_t channel); -XBT_PUBLIC(MSG_error_t) MSG_task_put_bounded(msg_task_t task, +XBT_PUBLIC(msg_error_t) MSG_task_put_bounded(msg_task_t task, msg_host_t dest, m_channel_t channel, double max_rate); -XBT_PUBLIC(MSG_error_t) MSG_task_put_with_timeout(msg_task_t task, +XBT_PUBLIC(msg_error_t) MSG_task_put_with_timeout(msg_task_t task, msg_host_t dest, m_channel_t channel, double max_duration); @@ -302,7 +303,7 @@ XBT_PUBLIC(int) MSG_task_Iprobe(m_channel_t channel); XBT_PUBLIC(int) MSG_task_probe_from(m_channel_t channel); XBT_PUBLIC(int) MSG_task_probe_from_host(int channel, msg_host_t host); -XBT_PUBLIC(MSG_error_t) MSG_set_channel_number(int number); +XBT_PUBLIC(msg_error_t) MSG_set_channel_number(int number); XBT_PUBLIC(int) MSG_get_channel_number(void); #endif diff --git a/src/bindings/lua/lua_comm.c b/src/bindings/lua/lua_comm.c index 61071b839f..41fc7e6ba1 100644 --- a/src/bindings/lua/lua_comm.c +++ b/src/bindings/lua/lua_comm.c @@ -62,7 +62,7 @@ static int l_comm_wait(lua_State* L) { timeout = luaL_checknumber(L, 2); } /* comm ... */ - MSG_error_t res = MSG_comm_wait(comm, timeout); + msg_error_t res = MSG_comm_wait(comm, timeout); if (res == MSG_OK) { msg_task_t task = MSG_comm_get_task(comm); @@ -111,7 +111,7 @@ static int l_comm_test(lua_State* L) { } else { /* finished but may have failed */ - MSG_error_t res = MSG_comm_get_status(comm); + msg_error_t res = MSG_comm_get_status(comm); if (res == MSG_OK) { msg_task_t task = MSG_comm_get_task(comm); diff --git a/src/bindings/lua/lua_private.h b/src/bindings/lua/lua_private.h index 373bd3241a..47dc17d231 100644 --- a/src/bindings/lua/lua_private.h +++ b/src/bindings/lua/lua_private.h @@ -25,4 +25,4 @@ void sglua_register_process_functions(lua_State* L); void sglua_register_platf_functions(lua_State* L); -const char* sglua_get_msg_error(MSG_error_t err); +const char* sglua_get_msg_error(msg_error_t err); diff --git a/src/bindings/lua/lua_process.c b/src/bindings/lua/lua_process.c index c10747d781..6454ca3fa1 100644 --- a/src/bindings/lua/lua_process.c +++ b/src/bindings/lua/lua_process.c @@ -29,7 +29,7 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(lua_process, bindings, "Lua Bindings (process mo static int l_process_sleep(lua_State* L) { double duration = luaL_checknumber(L, 1); - MSG_error_t res = MSG_process_sleep(duration); + msg_error_t res = MSG_process_sleep(duration); switch (res) { diff --git a/src/bindings/lua/lua_task.c b/src/bindings/lua/lua_task.c index e9c32d25d9..62eee8234b 100644 --- a/src/bindings/lua/lua_task.c +++ b/src/bindings/lua/lua_task.c @@ -129,7 +129,7 @@ static int l_task_get_computation_duration(lua_State* L) static int l_task_execute(lua_State* L) { msg_task_t task = sglua_check_task(L, 1); - MSG_error_t res = MSG_task_execute(task); + msg_error_t res = MSG_task_execute(task); if (res == MSG_OK) { return 0; @@ -247,7 +247,7 @@ static int l_task_send(lua_State* L) /* task */ sglua_task_register(L); /* -- */ - MSG_error_t res = MSG_task_send_with_timeout(task, mailbox, timeout); + msg_error_t res = MSG_task_send_with_timeout(task, mailbox, timeout); if (res == MSG_OK) { lua_pushboolean(L, 1); @@ -349,7 +349,7 @@ static int l_task_recv(lua_State* L) /* no timeout by default */ } /* mailbox ... */ - MSG_error_t res = MSG_task_receive_with_timeout(&task, mailbox, timeout); + msg_error_t res = MSG_task_receive_with_timeout(&task, mailbox, timeout); if (res == MSG_OK) { sglua_task_unregister(L, task); diff --git a/src/bindings/lua/simgrid_lua.c b/src/bindings/lua/simgrid_lua.c index 09d96d851a..440c5629c1 100644 --- a/src/bindings/lua/simgrid_lua.c +++ b/src/bindings/lua/simgrid_lua.c @@ -441,7 +441,7 @@ static int run_lua_code(int argc, char **argv) * \param err an MSG error code * \return a string describing this error */ -const char* sglua_get_msg_error(MSG_error_t err) { +const char* sglua_get_msg_error(msg_error_t err) { static const char* msg_errors[] = { NULL, diff --git a/src/msg/msg_actions.c b/src/msg/msg_actions.c index d994c3f391..75ea78e8d8 100644 --- a/src/msg/msg_actions.c +++ b/src/msg/msg_actions.c @@ -34,9 +34,9 @@ void _MSG_action_exit() * If path!=NULL, load a trace file containing actions, and execute them. * Else, assume that each process gets the path in its deployment file */ -MSG_error_t MSG_action_trace_run(char *path) +msg_error_t MSG_action_trace_run(char *path) { - MSG_error_t res; + msg_error_t res; char *name; xbt_dynar_t todo; xbt_dict_cursor_t cursor; diff --git a/src/msg/msg_global.c b/src/msg/msg_global.c index 47e85704a9..6caadb8590 100644 --- a/src/msg/msg_global.c +++ b/src/msg/msg_global.c @@ -72,7 +72,7 @@ void MSG_init_nocheck(int *argc, char **argv) { parameter. * \param number the number of channel in the simulation. It has to be >0 */ -MSG_error_t MSG_set_channel_number(int number) +msg_error_t MSG_set_channel_number(int number) { XBT_WARN("DEPRECATED! Please use aliases instead"); xbt_assert((msg_global) @@ -102,7 +102,7 @@ int MSG_get_channel_number(void) /** \ingroup msg_simulation * \brief Launch the MSG simulation */ -MSG_error_t MSG_main(void) +msg_error_t MSG_main(void) { /* Clean IO before the run */ fflush(stdout); @@ -139,7 +139,7 @@ int MSG_process_killall(int reset_PIDs) /** \ingroup msg_simulation * \brief Clean the MSG simulation */ -MSG_error_t MSG_clean(void) +msg_error_t MSG_clean(void) { XBT_DEBUG("Closing MSG"); diff --git a/src/msg/msg_gos.c b/src/msg/msg_gos.c index 72eb74e981..c8d56bef27 100644 --- a/src/msg/msg_gos.c +++ b/src/msg/msg_gos.c @@ -21,7 +21,7 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(msg_gos, msg, * \return #MSG_OK if the task was successfully completed, #MSG_TASK_CANCELED * or #MSG_HOST_FAILURE otherwise */ -MSG_error_t MSG_task_execute(msg_task_t task) +msg_error_t MSG_task_execute(msg_task_t task) { return MSG_parallel_task_execute(task); } @@ -34,14 +34,14 @@ MSG_error_t MSG_task_execute(msg_task_t task) * \return #MSG_OK if the task was successfully completed, #MSG_TASK_CANCELED * or #MSG_HOST_FAILURE otherwise */ -MSG_error_t MSG_parallel_task_execute(msg_task_t task) +msg_error_t MSG_parallel_task_execute(msg_task_t task) { xbt_ex_t e; simdata_task_t simdata = task->simdata; msg_process_t self = SIMIX_process_self(); simdata_process_t p_simdata = SIMIX_process_self_get_data(self); e_smx_state_t comp_state; - MSG_error_t status = MSG_OK; + msg_error_t status = MSG_OK; #ifdef HAVE_TRACING TRACE_msg_task_execute_start(task); @@ -123,9 +123,9 @@ MSG_error_t MSG_parallel_task_execute(msg_task_t task) * * \param nb_sec a number of second */ -MSG_error_t MSG_process_sleep(double nb_sec) +msg_error_t MSG_process_sleep(double nb_sec) { - MSG_error_t status = MSG_OK; + msg_error_t status = MSG_OK; /*msg_process_t proc = MSG_process_self();*/ #ifdef HAVE_TRACING @@ -179,7 +179,7 @@ MSG_error_t MSG_process_sleep(double nb_sec) * #MSG_OK if the task was successfully received, * #MSG_HOST_FAILURE, or #MSG_TRANSFER_FAILURE otherwise. */ -MSG_error_t +msg_error_t MSG_task_receive_from_host(msg_task_t * task, const char *alias, msg_host_t host) { @@ -200,7 +200,7 @@ MSG_task_receive_from_host(msg_task_t * task, const char *alias, * #MSG_OK if the task was successfully received, * #MSG_HOST_FAILURE, or #MSG_TRANSFER_FAILURE otherwise. */ -MSG_error_t MSG_task_receive(msg_task_t * task, const char *alias) +msg_error_t MSG_task_receive(msg_task_t * task, const char *alias) { return MSG_task_receive_with_timeout(task, alias, -1); } @@ -221,7 +221,7 @@ MSG_error_t MSG_task_receive(msg_task_t * task, const char *alias) * #MSG_OK if the task was successfully received, * #MSG_HOST_FAILURE, or #MSG_TRANSFER_FAILURE, or #MSG_TIMEOUT otherwise. */ -MSG_error_t +msg_error_t MSG_task_receive_with_timeout(msg_task_t * task, const char *alias, double timeout) { @@ -245,7 +245,7 @@ MSG_task_receive_with_timeout(msg_task_t * task, const char *alias, * #MSG_OK if the task was successfully received, * #MSG_HOST_FAILURE, or #MSG_TRANSFER_FAILURE, or #MSG_TIMEOUT otherwise. */ -MSG_error_t +msg_error_t MSG_task_receive_ext(msg_task_t * task, const char *alias, double timeout, msg_host_t host) { @@ -458,7 +458,7 @@ int MSG_comm_testany(xbt_dynar_t comms) xbt_dynar_push(s_comms, &comm->s_comm); } - MSG_error_t status = MSG_OK; + msg_error_t status = MSG_OK; TRY { finished_index = simcall_comm_testany(s_comms); } @@ -511,9 +511,9 @@ void MSG_comm_destroy(msg_comm_t comm) * \param comm the communication to wait. * \param timeout Wait until the communication terminates or the timeout * occurs. You can provide a -1 timeout to obtain an infinite timeout. - * \return MSG_error_t + * \return msg_error_t */ -MSG_error_t MSG_comm_wait(msg_comm_t comm, double timeout) +msg_error_t MSG_comm_wait(msg_comm_t comm, double timeout) { xbt_ex_t e; TRY { @@ -577,7 +577,7 @@ int MSG_comm_waitany(xbt_dynar_t comms) xbt_dynar_push(s_comms, &comm->s_comm); } - MSG_error_t status = MSG_OK; + msg_error_t status = MSG_OK; TRY { finished_index = simcall_comm_waitany(s_comms); } @@ -621,7 +621,7 @@ int MSG_comm_waitany(xbt_dynar_t comms) * \return the status of the communication, or #MSG_OK if no error occured * during the communication */ -MSG_error_t MSG_comm_get_status(msg_comm_t comm) { +msg_error_t MSG_comm_get_status(msg_comm_t comm) { return comm->status; } @@ -671,7 +671,7 @@ void MSG_comm_copy_data_from_SIMIX(smx_action_t comm, void* buff, size_t buff_si * \return Returns #MSG_OK if the task was successfully sent, * #MSG_HOST_FAILURE, or #MSG_TRANSFER_FAILURE otherwise. */ -MSG_error_t MSG_task_send(msg_task_t task, const char *alias) +msg_error_t MSG_task_send(msg_task_t task, const char *alias) { XBT_DEBUG("MSG_task_send: Trying to send a message on mailbox '%s'", alias); return MSG_task_send_with_timeout(task, alias, -1); @@ -691,7 +691,7 @@ MSG_error_t MSG_task_send(msg_task_t task, const char *alias) * \return Returns #MSG_OK if the task was successfully sent, * #MSG_HOST_FAILURE, or #MSG_TRANSFER_FAILURE otherwise. */ -MSG_error_t +msg_error_t MSG_task_send_bounded(msg_task_t task, const char *alias, double maxrate) { task->simdata->rate = maxrate; @@ -711,7 +711,7 @@ MSG_task_send_bounded(msg_task_t task, const char *alias, double maxrate) * \return Returns #MSG_OK if the task was successfully sent, * #MSG_HOST_FAILURE, or #MSG_TRANSFER_FAILURE, or #MSG_TIMEOUT otherwise. */ -MSG_error_t +msg_error_t MSG_task_send_with_timeout(msg_task_t task, const char *alias, double timeout) { @@ -819,7 +819,7 @@ const char *MSG_task_get_category (msg_task_t task) * \brief Return the last value returned by a MSG function (except * MSG_get_errno...). */ -MSG_error_t MSG_get_errno(void) +msg_error_t MSG_get_errno(void) { return PROCESS_GET_ERRNO(); } @@ -849,7 +849,7 @@ MSG_error_t MSG_get_errno(void) * #MSG_TRANSFER_FAILURE if the transfer could not be properly done * (network failure, dest failure) or #MSG_OK if it succeeded. */ -MSG_error_t MSG_task_put(msg_task_t task, msg_host_t dest, m_channel_t channel) +msg_error_t MSG_task_put(msg_task_t task, msg_host_t dest, m_channel_t channel) { XBT_WARN("DEPRECATED! Now use MSG_task_send"); return MSG_task_put_with_timeout(task, dest, channel, -1.0); @@ -861,7 +861,7 @@ MSG_error_t MSG_task_put(msg_task_t task, msg_host_t dest, m_channel_t channel) * * \sa MSG_task_put */ -MSG_error_t +msg_error_t MSG_task_put_bounded(msg_task_t task, msg_host_t dest, m_channel_t channel, double maxrate) { @@ -900,7 +900,7 @@ this function was called was shut down, #MSG_TRANSFER_FAILURE if the transfer could not be properly done (network failure, dest failure, timeout...) or #MSG_OK if the communication succeeded. */ -MSG_error_t +msg_error_t MSG_task_put_with_timeout(msg_task_t task, msg_host_t dest, m_channel_t channel, double timeout) { @@ -1002,9 +1002,9 @@ int MSG_task_probe_from_host(int channel, msg_host_t host) listening. This value has to be >=0 and < than the maximal number of channels fixed with MSG_set_channel_number(). * \param host the host that is to be watched. - * \return a #MSG_error_t indicating whether the operation was successful (#MSG_OK), or why it failed otherwise. + * \return a #msg_error_t indicating whether the operation was successful (#MSG_OK), or why it failed otherwise. */ -MSG_error_t +msg_error_t MSG_task_get_from_host(msg_task_t * task, m_channel_t channel, msg_host_t host) { XBT_WARN("DEPRECATED! Now use MSG_task_receive_from_host"); @@ -1022,9 +1022,9 @@ MSG_task_get_from_host(msg_task_t * task, m_channel_t channel, msg_host_t host) * \param channel the channel on which the process should be listening. This value has to be >=0 and < than the maximal number of channels fixed with MSG_set_channel_number(). - * \return a #MSG_error_t indicating whether the operation was successful (#MSG_OK), or why it failed otherwise. + * \return a #msg_error_t indicating whether the operation was successful (#MSG_OK), or why it failed otherwise. */ -MSG_error_t MSG_task_get(msg_task_t * task, m_channel_t channel) +msg_error_t MSG_task_get(msg_task_t * task, m_channel_t channel) { XBT_WARN("DEPRECATED! Now use MSG_task_receive"); return MSG_task_get_with_timeout(task, channel, -1); @@ -1045,9 +1045,9 @@ MSG_error_t MSG_task_get(msg_task_t * task, m_channel_t channel) up. In such a case, #MSG_TRANSFER_FAILURE will be returned, \a task will not be modified and will still be equal to \c NULL when returning. - * \return a #MSG_error_t indicating whether the operation was successful (#MSG_OK), or why it failed otherwise. + * \return a #msg_error_t indicating whether the operation was successful (#MSG_OK), or why it failed otherwise. */ -MSG_error_t +msg_error_t MSG_task_get_with_timeout(msg_task_t * task, m_channel_t channel, double max_duration) { @@ -1055,7 +1055,7 @@ MSG_task_get_with_timeout(msg_task_t * task, m_channel_t channel, return MSG_task_get_ext(task, channel, max_duration, NULL); } -MSG_error_t +msg_error_t MSG_task_get_ext(msg_task_t * task, m_channel_t channel, double timeout, msg_host_t host) { diff --git a/src/msg/msg_host.c b/src/msg/msg_host.c index 5c697a7d7e..53e1ac5cae 100644 --- a/src/msg/msg_host.c +++ b/src/msg/msg_host.c @@ -75,7 +75,7 @@ msg_host_t MSG_get_host_by_name(const char *name) * This functions checks whether some data has already been associated to \a host or not and attach \a data to \a host if it is possible. */ -MSG_error_t MSG_host_set_data(msg_host_t host, void *data) +msg_error_t MSG_host_set_data(msg_host_t host, void *data) { SIMIX_host_set_data(host->smx_host,data); diff --git a/src/msg/msg_mailbox.c b/src/msg/msg_mailbox.c index 6a1ee8f1da..8d1e7c9ed1 100644 --- a/src/msg/msg_mailbox.c +++ b/src/msg/msg_mailbox.c @@ -56,12 +56,12 @@ msg_mailbox_t MSG_mailbox_get_by_alias(const char *alias) return mailbox; } -MSG_error_t +msg_error_t MSG_mailbox_get_task_ext(msg_mailbox_t mailbox, msg_task_t * task, msg_host_t host, double timeout) { xbt_ex_t e; - MSG_error_t ret = MSG_OK; + msg_error_t ret = MSG_OK; /* We no longer support getting a task from a specific host */ if (host) THROW_UNIMPLEMENTED; @@ -108,12 +108,12 @@ MSG_mailbox_get_task_ext(msg_mailbox_t mailbox, msg_task_t * task, MSG_RETURN(ret); } -MSG_error_t +msg_error_t MSG_mailbox_put_with_timeout(msg_mailbox_t mailbox, msg_task_t task, double timeout) { xbt_ex_t e; - MSG_error_t ret = MSG_OK; + msg_error_t ret = MSG_OK; simdata_task_t t_simdata = NULL; msg_process_t process = MSG_process_self(); simdata_process_t p_simdata = SIMIX_process_self_get_data(process); diff --git a/src/msg/msg_private.h b/src/msg/msg_private.h index 4b13c5ea26..97af923ebf 100644 --- a/src/msg/msg_private.h +++ b/src/msg/msg_private.h @@ -69,7 +69,7 @@ typedef struct simdata_process { msg_task_t waiting_task; char **argv; /* arguments table if any */ int argc; /* arguments number if any */ - MSG_error_t last_errno; /* the last value returned by a MSG_function */ + msg_error_t last_errno; /* the last value returned by a MSG_function */ msg_vm_t vm; /* virtual machine the process is in */ @@ -90,7 +90,7 @@ typedef struct msg_comm { smx_action_t s_comm; /* SIMIX communication object encapsulated (the same for both processes) */ msg_task_t task_sent; /* task sent (NULL for the receiver) */ msg_task_t *task_received; /* where the task will be received (NULL for the sender) */ - MSG_error_t status; /* status of the communication once finished */ + msg_error_t status; /* status of the communication once finished */ } s_msg_comm_t; typedef enum { diff --git a/src/msg/msg_process.c b/src/msg/msg_process.c index 821f6b39e3..f511d47456 100644 --- a/src/msg/msg_process.c +++ b/src/msg/msg_process.c @@ -224,7 +224,7 @@ void MSG_process_kill(msg_process_t process) * This function checks whether \a process and \a host are valid pointers and change the value of the #msg_host_t on which \a process is running. */ -MSG_error_t MSG_process_migrate(msg_process_t process, msg_host_t host) +msg_error_t MSG_process_migrate(msg_process_t process, msg_host_t host) { simdata_process_t simdata = simcall_process_get_data(process); simdata->m_host = host; @@ -257,7 +257,7 @@ void* MSG_process_get_data(msg_process_t process) * This function checks whether \a process is a valid pointer or not and sets the user data associated to this process. */ -MSG_error_t MSG_process_set_data(msg_process_t process, void *data) +msg_error_t MSG_process_set_data(msg_process_t process, void *data) { xbt_assert(process != NULL, "Invalid parameter"); @@ -320,7 +320,7 @@ xbt_dynar_t MSG_processes_as_dynar(void) { * \param process a process * \param kill_time the time when the process is killed. */ -MSG_error_t MSG_process_set_kill_time(msg_process_t process, double kill_time) +msg_error_t MSG_process_set_kill_time(msg_process_t process, double kill_time) { simcall_process_set_kill_time(process,kill_time); return MSG_OK; @@ -437,7 +437,7 @@ msg_process_t MSG_process_self(void) * This function suspends the process by suspending the task on which * it was waiting for the completion. */ -MSG_error_t MSG_process_suspend(msg_process_t process) +msg_error_t MSG_process_suspend(msg_process_t process) { xbt_assert(process != NULL, "Invalid parameter"); @@ -455,7 +455,7 @@ MSG_error_t MSG_process_suspend(msg_process_t process) * This function resumes a suspended process by resuming the task on * which it was waiting for the completion. */ -MSG_error_t MSG_process_resume(msg_process_t process) +msg_error_t MSG_process_resume(msg_process_t process) { xbt_assert(process != NULL, "Invalid parameter"); diff --git a/src/msg/msg_task.c b/src/msg/msg_task.c index 7390b47623..117a72e633 100644 --- a/src/msg/msg_task.c +++ b/src/msg/msg_task.c @@ -261,7 +261,7 @@ void MSG_task_set_name(msg_task_t task, const char *name) * supposed to destroy it. The sender should not use it anymore. * If the task failed to be sent, the sender remains the owner of the task. */ -MSG_error_t MSG_task_destroy(msg_task_t task) +msg_error_t MSG_task_destroy(msg_task_t task) { smx_action_t action = NULL; xbt_assert((task != NULL), "Invalid parameter"); @@ -296,7 +296,7 @@ MSG_error_t MSG_task_destroy(msg_task_t task) * \param task the task to cancel. If it was executed or transfered, it stops the process that were working on it. */ -MSG_error_t MSG_task_cancel(msg_task_t task) +msg_error_t MSG_task_cancel(msg_task_t task) { xbt_assert((task != NULL), "Invalid parameter"); diff --git a/teshsuite/msg/get_sender.c b/teshsuite/msg/get_sender.c index 938f95977c..b9ffa48829 100644 --- a/teshsuite/msg/get_sender.c +++ b/teshsuite/msg/get_sender.c @@ -34,7 +34,7 @@ static int receive(int argc, char *argv[]) /** Main function */ int main(int argc, char *argv[]) { - MSG_error_t res = MSG_OK; + msg_error_t res = MSG_OK; MSG_init(&argc, argv); diff --git a/teshsuite/msg/trace/test_trace_integration.c b/teshsuite/msg/trace/test_trace_integration.c index d4745a21d3..4ed7b370ec 100644 --- a/teshsuite/msg/trace/test_trace_integration.c +++ b/teshsuite/msg/trace/test_trace_integration.c @@ -50,7 +50,7 @@ int test_trace(int argc, char *argv[]) /** Main function */ int main(int argc, char *argv[]) { - MSG_error_t res = MSG_OK; + msg_error_t res = MSG_OK; /* Verify if the platform xml file was passed by command line. */ MSG_init(&argc, argv);