From de5e501519aa2ca6d398f40bdbbf6bb30648fabe Mon Sep 17 00:00:00 2001 From: Brian Barrett Date: Wed, 19 Oct 2005 00:56:14 +0000 Subject: [PATCH] Rather than hard spinning waiting for something to happen when doing shared memory initialization, call opal_progress() to push any pending events around and possibly yield the processor if nothing entertaining is happening. This should probably go to the 1.0 branch. This commit was SVN r7808. --- ompi/mca/btl/sm/btl_sm.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/ompi/mca/btl/sm/btl_sm.c b/ompi/mca/btl/sm/btl_sm.c index 031e41058e..27bff586a3 100644 --- a/ompi/mca/btl/sm/btl_sm.c +++ b/ompi/mca/btl/sm/btl_sm.c @@ -390,8 +390,9 @@ int mca_btl_sm_add_procs_same_base_addr( if( 0 != mca_btl_sm_component.my_smp_rank ) { /* spin unitl local proc 0 initializes the segment */ - while(!mca_btl_sm_component.mmap_file->map_seg->seg_inited) - { ; } + while(!mca_btl_sm_component.mmap_file->map_seg->seg_inited) { + opal_progress(); + } } /* set the base of the shared memory segment, and flag @@ -456,7 +457,9 @@ int mca_btl_sm_add_procs_same_base_addr( /* spin until this element is allocated */ while ( NULL == fifo_tmp[j] ) - { ; } + { + opal_progress(); + } tmp_ptr=(volatile char **) ( (char *)mca_btl_sm_component.sm_ctl_header->