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
Type casting. Bug solved.
[simgrid.git]
/
examples
/
gras
/
synchro
/
philosopher.c
diff --git
a/examples/gras/synchro/philosopher.c
b/examples/gras/synchro/philosopher.c
index
b85aac1
..
3ce27ca
100644
(file)
--- a/
examples/gras/synchro/philosopher.c
+++ b/
examples/gras/synchro/philosopher.c
@@
-70,9
+70,9
@@
static void philo_thread(void *arg) {
for (i=0; i<lunch_amount; i++) {
pickup(id,i);
for (i=0; i<lunch_amount; i++) {
pickup(id,i);
- gras_os_sleep(id / 10); /* each philosopher sleeps and eat a time related to its ID */
+ gras_os_sleep(id / 10
.0
); /* each philosopher sleeps and eat a time related to its ID */
putdown(id);
putdown(id);
- gras_os_sleep(id / 10);
+ gras_os_sleep(id / 10
.0
);
}
xbt_mutex_lock(mut_end);
}
xbt_mutex_lock(mut_end);