A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
mv msg/msg.h simgrid/msg.h
[simgrid.git]
/
examples
/
msg
/
semaphores
/
synchro.c
diff --git
a/examples/msg/semaphores/synchro.c
b/examples/msg/semaphores/synchro.c
index
b63a759
..
01dcd02
100644
(file)
--- a/
examples/msg/semaphores/synchro.c
+++ b/
examples/msg/semaphores/synchro.c
@@
-1,6
+1,12
@@
+/* 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 <stdio.h>
#include <stdlib.h>
#include <stdio.h>
#include <stdlib.h>
-#include "
msg
/msg.h"
+#include "
simgrid
/msg.h"
#include "xbt/log.h"
XBT_LOG_NEW_DEFAULT_CATEGORY(msg_semaphore_example,
#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;
msg_sem_t sem;
-int peer(int argc, char* argv[]){
+
static
int peer(int argc, char* argv[]){
int i = 0;
int i = 0;
@@
-27,6
+33,8
@@
int peer(int argc, char* argv[]){
}
MSG_process_sleep(50);
XBT_INFO("Done");
}
MSG_process_sleep(50);
XBT_INFO("Done");
+
+ return 0;
}
int main(int argc, char* argv[]) {
}
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");
msg_error_t res = MSG_main();
printf("Finished\n");
- return
0
;
+ return
(res != MSG_OK)
;
}
}