1
1

If ompi_free_list_grow fails wait until resources are available instead of

spinning without progress.

This commit was SVN r10520.
Этот коммит содержится в:
Gleb Natapov 2006-06-27 09:23:51 +00:00
родитель 52208d7bf9
Коммит 012d95d195

Просмотреть файл

@ -155,9 +155,15 @@ static inline int __ompi_free_list_wait( ompi_free_list_t* fl,
opal_condition_wait(&((fl)->fl_condition), &((fl)->fl_lock));
(fl)->fl_num_waiting--;
} else {
ompi_free_list_grow((fl), (fl)->fl_num_per_alloc);
if( 0 < (fl)->fl_num_waiting ) {
opal_condition_signal(&((fl)->fl_condition));
if(ompi_free_list_grow((fl), (fl)->fl_num_per_alloc)
== OMPI_SUCCESS) {
if( 0 < (fl)->fl_num_waiting ) {
opal_condition_signal(&((fl)->fl_condition));
}
} else {
(fl)->fl_num_waiting++;
opal_condition_wait(&((fl)->fl_condition), &((fl)->fl_lock));
(fl)->fl_num_waiting--;
}
}
} else {