From c83b2fce4d822dc7e4e77c41bc79e71853f7559a Mon Sep 17 00:00:00 2001 From: Tim Woodall Date: Thu, 9 Mar 2006 17:57:31 +0000 Subject: [PATCH] resolve threading issue This commit was SVN r9233. --- ompi/mca/bml/bml.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ompi/mca/bml/bml.h b/ompi/mca/bml/bml.h index 3385babb35..8bda875bcf 100644 --- a/ompi/mca/bml/bml.h +++ b/ompi/mca/bml/bml.h @@ -171,10 +171,15 @@ static inline mca_bml_base_btl_t* mca_bml_base_btl_array_get_next(mca_bml_base_b return 0; } #endif +#if OMPI_HAVE_THREAD_SUPPORT + array->arr_index = (array->arr_index +1) % array->arr_size; + bml_btl = &array->bml_btls[array->arr_index]; +#else bml_btl = &array->bml_btls[array->arr_index++]; if(array->arr_index == array->arr_size) { array->arr_index = 0; } +#endif return bml_btl; }