X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/17426e6da9e3e452fcc304e77af71c28a71f5c5c..5b3677b425b9cc6949c1573d59ac772540cbf4b2:/examples/msg/semaphores/synchro.c diff --git a/examples/msg/semaphores/synchro.c b/examples/msg/semaphores/synchro.c index b63a759415..cc10147595 100644 --- a/examples/msg/semaphores/synchro.c +++ b/examples/msg/semaphores/synchro.c @@ -1,3 +1,9 @@ +/* Copyright (c) 2013-2014. 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" @@ -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); }