Revision: 55026
http://brlcad.svn.sourceforge.net/brlcad/?rev=55026&view=rev
Author: brlcad
Date: 2013-04-03 06:42:52 +0000 (Wed, 03 Apr 2013)
Log Message:
-----------
pthread shouldn't take priority over the intrinsic methods, let it be a fallback
Modified Paths:
--------------
brlcad/trunk/src/libbu/thread.cpp
Modified: brlcad/trunk/src/libbu/thread.cpp
===================================================================
--- brlcad/trunk/src/libbu/thread.cpp 2013-04-03 06:24:44 UTC (rev 55025)
+++ brlcad/trunk/src/libbu/thread.cpp 2013-04-03 06:42:52 UTC (rev 55026)
@@ -27,8 +27,20 @@
#endif
-#if defined(HAVE_PTHREAD_H)
+#if defined(HAVE_THREAD_LOCAL)
+static thread_local int thread_cpu = 0;
+
+#elif defined(HAVE___THREAD)
+
+static __thread int thread_cpu = 0;
+
+#elif defined(HAVE___DECLSPEC_THREAD)
+
+static __declspec(thread) int thread_cpu;
+
+#elif defined(HAVE_PTHREAD_H)
+
template<typename T>
class ThreadLocal
{
@@ -62,18 +74,6 @@
};
static ThreadLocal<int> thread_cpu;
-#elif defined(HAVE_THREAD_LOCAL)
-
-static thread_local int thread_cpu = 0;
-
-#elif defined(HAVE___THREAD)
-
-static __thread int thread_cpu = 0;
-
-#elif defined(HAVE___DECLSPEC_THREAD)
-
-static __declspec(thread) int thread_cpu;
-
#else
# error "Unrecognized thread local storage method for this platform"
#endif
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Minimize network downtime and maximize team effectiveness.
Reduce network management and security costs.Learn how to hire
the most talented Cisco Certified professionals. Visit the
Employer Resources Portal
http://www.cisco.com/web/learning/employer_resources/index.html
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits