1
1

* Default the value of opal_uses_threads (which is used by the macro

versions of the thread lock functions to determine at runtime if a lock
  is needed) to OMPI_ENABLE_PROGRESS_THREADS instead of 
  OMPI_HAVE_THREAD_SUPPORT.  Opal only starts a thread when
  OMPI_ENABLE_PROGRESS_THREADS is enabled, and ORTE never really starts
  a thread that requires special locking considerations.

  MPI_INIT would set opal_uses_threads to true if thread level was 
  greater than MPI_THREAD_SINGLE, but it would never decreast the
  value of opal_uses_threads, meaning that we always enabled all that
  locking if we did a threaded build, which isn't neccessary.  Now
  we do locking iff progress threads are enabled OR thread level
  is above MPI_THREAD_SINGLE.

This commit was SVN r11390.
Этот коммит содержится в:
Brian Barrett 2006-08-24 13:57:26 +00:00
родитель 4c3f135a92
Коммит b56c8c3a66

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

@ -21,9 +21,10 @@
#include "opal/threads/mutex.h"
/*
* Default to a safe value
* If we have progress threads, always default to using threads.
* Otherwise, wait and see if some upper layer wants to use threads.
*/
bool opal_uses_threads = (bool) OMPI_HAVE_THREAD_SUPPORT;
bool opal_uses_threads = (bool) OMPI_ENABLE_PROGRESS_THREADS;
#ifdef __WINDOWS__