Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Revert "Always decrement the semaphore capacity, even if it will go under 0 that...
authorpini <pini@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Thu, 25 Nov 2010 08:41:28 +0000 (08:41 +0000)
committerpini <pini@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Thu, 25 Nov 2010 08:41:28 +0000 (08:41 +0000)
-> The released token is already taken after it has been waited for.

This reverts commit 34e7986909807638c6670c20a0704f949d696d11.

git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@8645 48e7efb5-ca39-0410-a469-dd3cf9ba447f

src/simix/smx_synchro.c

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