From: mquinson Date: Tue, 23 Nov 2010 20:28:19 +0000 (+0000) Subject: Always decrement the semaphore capacity, even if it will go under 0 that way (because... X-Git-Tag: v3_5~206 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/34e7986909807638c6670c20a0704f949d696d11?hp=dc6775d4c4eb81fee210853dd09bf97527671dbc Always decrement the semaphore capacity, even if it will go under 0 that way (because release does ++ all the time) git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@8624 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- diff --git a/src/simix/smx_synchro.c b/src/simix/smx_synchro.c index 1cd37ed82f..bec90e9f6f 100644 --- a/src/simix/smx_synchro.c +++ b/src/simix/smx_synchro.c @@ -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);