X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/17426e6da9e3e452fcc304e77af71c28a71f5c5c..5367d14cee11f6e79168382bb14cbd873675a681:/examples/msg/semaphores/synchro.c diff --git a/examples/msg/semaphores/synchro.c b/examples/msg/semaphores/synchro.c index b63a759415..aed1405b54 100644 --- a/examples/msg/semaphores/synchro.c +++ b/examples/msg/semaphores/synchro.c @@ -1,6 +1,12 @@ +/* Copyright (c) 2013-2015. The SimGrid Team. + * All rights reserved. */ + +/* 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. */ + #include #include -#include "msg/msg.h" +#include "simgrid/msg.h" #include "xbt/log.h" XBT_LOG_NEW_DEFAULT_CATEGORY(msg_semaphore_example, @@ -8,7 +14,7 @@ XBT_LOG_NEW_DEFAULT_CATEGORY(msg_semaphore_example, msg_sem_t sem; -int peer(int argc, char* argv[]){ +static int peer(int argc, char* argv[]){ int i = 0; @@ -27,6 +33,8 @@ int peer(int argc, char* argv[]){ } MSG_process_sleep(50); XBT_INFO("Done"); + + return 0; } int main(int argc, char* argv[]) { @@ -70,5 +78,5 @@ int main(int argc, char* argv[]) { msg_error_t res = MSG_main(); printf("Finished\n"); - return 0; + return (res != MSG_OK); }