A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add a SD_task_set_name() function
[simgrid.git]
/
src
/
simix
/
smx_synchro.c
diff --git
a/src/simix/smx_synchro.c
b/src/simix/smx_synchro.c
index
92ddf27
..
77170c5
100644
(file)
--- a/
src/simix/smx_synchro.c
+++ b/
src/simix/smx_synchro.c
@@
-404,6
+404,7
@@
void SIMIX_sem_release_forever(smx_sem_t sem) {
xbt_swag_remove(proc, sem->sleeping);
xbt_swag_insert(proc, simix_global->process_to_run);
}
xbt_swag_remove(proc, sem->sleeping);
xbt_swag_insert(proc, simix_global->process_to_run);
}
+ sem->capacity = SMX_SEM_NOLIMIT;
}
/**
}
/**
@@
-551,11
+552,11
@@
unsigned int SIMIX_sem_acquire_any(xbt_dynar_t sems) {
xbt_swag_insert(self, sem->sleeping);
}
SIMIX_process_yield();
xbt_swag_insert(self, sem->sleeping);
}
SIMIX_process_yield();
+ self->sem = NULL;
while (self->suspended)
SIMIX_process_yield();
/* one of the semaphore unsuspended us -- great, let's search which one (and get out of the others) */
while (self->suspended)
SIMIX_process_yield();
/* one of the semaphore unsuspended us -- great, let's search which one (and get out of the others) */
- self->sem = NULL;
xbt_dynar_foreach(sems,counter,sem) {
if (xbt_swag_belongs(self,sem->sleeping))
xbt_swag_remove(self,sem->sleeping);
xbt_dynar_foreach(sems,counter,sem) {
if (xbt_swag_belongs(self,sem->sleeping))
xbt_swag_remove(self,sem->sleeping);