[mpich2-commits] r6668 - in mpich2/trunk/src/include: . thread

goodell at mcs.anl.gov goodell at mcs.anl.gov
Mon May 17 17:47:58 CDT 2010


Author: goodell
Date: 2010-05-17 17:47:58 -0500 (Mon, 17 May 2010)
New Revision: 6668

Modified:
   mpich2/trunk/src/include/mpiimplthread.h
   mpich2/trunk/src/include/thread/mpiu_thread_posix_funcs.h
Log:
MPID_Thread_yield never should have been defined in mpiimplthread.h

No reviewer.

Modified: mpich2/trunk/src/include/mpiimplthread.h
===================================================================
--- mpich2/trunk/src/include/mpiimplthread.h	2010-05-17 22:47:57 UTC (rev 6667)
+++ mpich2/trunk/src/include/mpiimplthread.h	2010-05-17 22:47:58 UTC (rev 6668)
@@ -300,22 +300,7 @@
 #endif /* defined(MPIU_TLS_SPECIFIER) */
 #endif /* defined(MPICH_IS_THREADED) */
 
-
 /* ------------------------------------------------------------------------- */
-/* yield macro */
-/* FIXME update mpiatomic.h accordingly if this is ever improved */
-#undef MPID_Thread_yield
-/* FIXME this should probably include sleep/usleep/nanosleep as an option in here */
-#if defined(HAVE_THR_YIELD)
-#define MPID_Thread_yield() thr_yield()
-#elif defined(HAVE_SCHED_YIELD)
-#define MPID_Thread_yield() sched_yield()
-#elif defined(HAVE_YIELD)
-#define MPID_Thread_yield() yield()
-#endif
-
-
-/* ------------------------------------------------------------------------- */
 /*
  * New definitions for controling the granularity of thread atomicity
  *

Modified: mpich2/trunk/src/include/thread/mpiu_thread_posix_funcs.h
===================================================================
--- mpich2/trunk/src/include/thread/mpiu_thread_posix_funcs.h	2010-05-17 22:47:57 UTC (rev 6667)
+++ mpich2/trunk/src/include/thread/mpiu_thread_posix_funcs.h	2010-05-17 22:47:58 UTC (rev 6668)
@@ -43,9 +43,9 @@
 #define MPIU_Thread_yield()						\
 do {                                                                       \
     /* FIXME: need to check for different types of yield */	\
-    MPIU_DBG_MSG_P(THREAD,TYPICAL,"enter MPIU_Thread_yield");    \
-    sched_yield();							\
-    MPIU_DBG_MSG_P(THREAD,TYPICAL,"exit MPIU_Thread_yield");    \
+    MPIU_DBG_MSG(THREAD,TYPICAL,"enter MPIU_Thread_yield");    \
+    MPIU_PW_Sched_yield();                                     \
+    MPIU_DBG_MSG(THREAD,TYPICAL,"exit MPIU_Thread_yield");     \
 } while (0)
 
 



More information about the mpich2-commits mailing list