PPC has no 'pause' asm opcode

This commit is contained in:
Karsten Hopp 2013-01-28 16:52:46 +01:00
parent 7709c72122
commit d3a5a3304f
1 changed files with 10 additions and 1 deletions

View File

@ -1,6 +1,6 @@
diff -up oiio-Release-1.1.3/src/include/thread.h.ppc oiio-Release-1.1.3/src/include/thread.h
--- oiio-Release-1.1.3/src/include/thread.h.ppc 2013-01-10 02:13:37.000000000 +0100
+++ oiio-Release-1.1.3/src/include/thread.h 2013-01-28 14:30:48.667934337 +0100
+++ oiio-Release-1.1.3/src/include/thread.h 2013-01-28 15:07:23.190624263 +0100
@@ -98,7 +98,7 @@
#endif
@ -52,3 +52,12 @@ diff -up oiio-Release-1.1.3/src/include/thread.h.ppc oiio-Release-1.1.3/src/incl
#else
# error No atomics on this platform.
#endif
@@ -324,7 +338,7 @@ pause (int delay)
{
#if USE_TBB
__TBB_Pause(delay);
-#elif defined(__GNUC__)
+#elif defined(__GNUC__) && !defined (__PPC__)
for (int i = 0; i < delay; ++i) {
__asm__ __volatile__("pause;");
}