Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Type casting. Bug solved.
authordonassbr <donassbr@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Thu, 12 Jul 2007 10:55:53 +0000 (10:55 +0000)
committerdonassbr <donassbr@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Thu, 12 Jul 2007 10:55:53 +0000 (10:55 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@3744 48e7efb5-ca39-0410-a469-dd3cf9ba447f

examples/gras/synchro/philosopher.c

index b85aac1..3ce27ca 100644 (file)
@@ -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);