From: pini Date: Thu, 25 Nov 2010 08:41:28 +0000 (+0000) Subject: Revert "Always decrement the semaphore capacity, even if it will go under 0 that... X-Git-Tag: v3_5~185 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/06688d73948ce9a162626ecb422345f0c5acd7a4?hp=4ceaeaa049f33495a445d5b4f1347eec202a762b;ds=sidebyside Revert "Always decrement the semaphore capacity, even if it will go under 0 that way (because release does ++ all the time)" -> 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 --- diff --git a/src/simix/smx_synchro.c b/src/simix/smx_synchro.c index bec90e9f6f..1cd37ed82f 100644 --- a/src/simix/smx_synchro.c +++ b/src/simix/smx_synchro.c @@ -485,7 +485,6 @@ 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);