X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/06ee15f57336cd94ef7be68947df842dbce28675..82791f187dbb46144e40afb1a2b6a467df41dbc1:/teshsuite/msg/pid.c diff --git a/teshsuite/msg/pid.c b/teshsuite/msg/pid.c index 1f04fb2a54..ef21c7858b 100644 --- a/teshsuite/msg/pid.c +++ b/teshsuite/msg/pid.c @@ -9,15 +9,16 @@ XBT_LOG_NEW_DEFAULT_CATEGORY(msg_test, "Messages specific for this msg example"); -char* mailbox = "mailbox"; +const char* mailbox = "mailbox"; #define task_comp_size 1000 #define task_comm_size 100000 -int onexit(void* data){ - XBT_INFO("Process \"%d\" killed.", *((int*)data)); +static int onexit(void* data){ + XBT_INFO("Process \"%d\" killed.", *((int*)data)); + return 0; } -int sendpid(int argc, char *argv[]) +static int sendpid(int argc, char *argv[]) { int pid = MSG_process_self_PID(); MSG_process_on_exit(onexit, &pid); @@ -26,9 +27,10 @@ int sendpid(int argc, char *argv[]) MSG_task_send(task, mailbox); XBT_INFO("Send of pid \"%d\" done.", pid); MSG_process_suspend(MSG_process_self()); + return 0; } -int killall(int argc, char *argv[]){ +static int killall(int argc, char *argv[]){ msg_task_t task = NULL; _XBT_GNUC_UNUSED int res; int i; @@ -39,6 +41,7 @@ int killall(int argc, char *argv[]){ MSG_process_kill(MSG_process_from_PID(pid)); task = NULL; } + return 0; } /** Main function */