Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Always decrement the semaphore capacity, even if it will go under 0 that way (because...
authormquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Tue, 23 Nov 2010 20:28:19 +0000 (20:28 +0000)
committermquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Tue, 23 Nov 2010 20:28:19 +0000 (20:28 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@8624 48e7efb5-ca39-0410-a469-dd3cf9ba447f

src/simix/smx_synchro.c

index 1cd37ed..bec90e9 100644 (file)
@@ -485,6 +485,7 @@ void SIMIX_sem_acquire_timeout(smx_sem_t sem, double max_duration)
     sem->capacity--;
     return;
   }
+  sem->capacity--;
 
   /* Always create an action null in case there is a host failure */
   act_sleep = SIMIX_action_sleep(SIMIX_host_self(), max_duration);