From 34e7986909807638c6670c20a0704f949d696d11 Mon Sep 17 00:00:00 2001 From: mquinson Date: Tue, 23 Nov 2010 20:28:19 +0000 Subject: [PATCH 1/1] 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 --- src/simix/smx_synchro.c | 1 + 1 file changed, 1 insertion(+) 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); -- 2.20.1