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
model-checker : update tesh
[simgrid.git]
/
examples
/
xbt
/
sem_basic.c
diff --git
a/examples/xbt/sem_basic.c
b/examples/xbt/sem_basic.c
index
1d944f7
..
7b36a83
100644
(file)
--- a/
examples/xbt/sem_basic.c
+++ b/
examples/xbt/sem_basic.c
@@
-16,7
+16,7
@@
XBT_LOG_NEW_DEFAULT_CATEGORY(sem_basic,
-#define THREAD_THREADS_MAX
((unsigned int)10)
+#define THREAD_THREADS_MAX ((unsigned int)10)
/*
* the thread funtion.
/*
* the thread funtion.
@@
-64,7
+64,7
@@
int main(int argc, char *argv[])
xbt_os_sem_destroy(sem);
xbt_os_sem_destroy(sem);
-
INFO1
("sem_basic terminated with exit code %d (success)", EXIT_SUCCESS);
+
XBT_INFO
("sem_basic terminated with exit code %d (success)", EXIT_SUCCESS);
return EXIT_SUCCESS;
return EXIT_SUCCESS;
@@
-76,9
+76,9
@@
void *thread_routine(void *param)
int exit_code = 0;
xbt_os_sem_acquire(sem);
int exit_code = 0;
xbt_os_sem_acquire(sem);
-
INFO1
("Hello i'm the thread %d", thread_index);
+
XBT_INFO
("Hello i'm the thread %d", thread_index);
value++;
value++;
-
INFO1
("The new value of the global variable is %d, bye", value);
+
XBT_INFO
("The new value of the global variable is %d, bye", value);
xbt_os_sem_release(sem);
xbt_os_thread_exit(&exit_code);
xbt_os_sem_release(sem);
xbt_os_thread_exit(&exit_code);