[mpich2-commits] r6707 - mpich2/trunk/src/include

goodell at mcs.anl.gov goodell at mcs.anl.gov
Mon May 24 10:38:05 CDT 2010


Author: goodell
Date: 2010-05-24 10:38:05 -0500 (Mon, 24 May 2010)
New Revision: 6707

Modified:
   mpich2/trunk/src/include/mpiimplthread.h
Log:
Revert r6699, which very clearly broke threading on non-TLS platforms.

There is still an unresolved MPI_Init-time error handling issue.

No reviewer.

Modified: mpich2/trunk/src/include/mpiimplthread.h
===================================================================
--- mpich2/trunk/src/include/mpiimplthread.h	2010-05-24 13:57:29 UTC (rev 6706)
+++ mpich2/trunk/src/include/mpiimplthread.h	2010-05-24 15:38:05 UTC (rev 6707)
@@ -233,6 +233,9 @@
         if (!MPIR_Thread) {                                                         \
             if (MPIU_ISTHREADED) {                                                  \
                 MPID_Thread_tls_get(&MPIR_ThreadInfo.thread_storage, &MPIR_Thread); \
+                if (!MPIR_Thread) {                                                 \
+                    MPIU_THREADPRIV_INIT; /* subtle, sets MPIR_Thread */            \
+                }                                                                   \
             }                                                                       \
             else {                                                                  \
                 MPIR_Thread = &MPIR_ThreadSingle;                                   \
@@ -258,6 +261,9 @@
     do {                                                                        \
         if (!MPIR_Thread) {                                                     \
             MPID_Thread_tls_get(&MPIR_ThreadInfo.thread_storage, &MPIR_Thread); \
+            if (!MPIR_Thread) {                                                 \
+                MPIU_THREADPRIV_INIT; /* subtle, sets MPIR_Thread */            \
+            }                                                                   \
             MPIU_Assert(MPIR_Thread);                                           \
         }                                                                       \
     } while (0)



More information about the mpich2-commits mailing list