[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [52232] trunk/lib/windows/openimageio: MSVC Windows x32:

Thomas Dinges blender at dingto.org
Thu Nov 15 15:06:06 CET 2012


Revision: 52232
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=52232
Author:   dingto
Date:     2012-11-15 14:06:05 +0000 (Thu, 15 Nov 2012)
Log Message:
-----------
MSVC Windows x32:
* Recompiled OIIO with additional entry point for "_InterlockedCompareExchange64" to make it work on old x32 XP. 

Modified Paths:
--------------
    trunk/lib/windows/openimageio/bin/OpenImageIO.dll
    trunk/lib/windows/openimageio/include/OpenImageIO/thread.h
    trunk/lib/windows/openimageio/lib/OpenImageIO.lib

Modified: trunk/lib/windows/openimageio/bin/OpenImageIO.dll
===================================================================
(Binary files differ)

Modified: trunk/lib/windows/openimageio/include/OpenImageIO/thread.h
===================================================================
--- trunk/lib/windows/openimageio/include/OpenImageIO/thread.h	2012-11-15 13:26:32 UTC (rev 52231)
+++ trunk/lib/windows/openimageio/include/OpenImageIO/thread.h	2012-11-15 14:06:05 UTC (rev 52232)
@@ -206,8 +206,6 @@
 
 #endif
 
-
-
 inline LONGLONG _InterlockedCompareExchange64(LONGLONG volatile* Destination, LONGLONG Exchange, LONGLONG Comperand)
 {
 	__asm {
@@ -220,7 +218,8 @@
 	}
 }
 
-// Atomic version of:  r = *at, *at += x, return r
+
+/// Atomic version of:  r = *at, *at += x, return r
 /// For each of several architectures.
 inline int
 atomic_exchange_and_add (volatile int *at, int x)
@@ -259,7 +258,10 @@
 #  if defined(_WIN64)
     return _InterlockedExchangeAdd64 ((volatile LONGLONG *)at, x);
 #  else
-    return InterlockedExchangeAdd64 ((volatile LONGLONG *)at, x);
+	LONGLONG Old; 	 
+	do Old = *at; 	 
+	while (_InterlockedCompareExchange64(at, Old + x, Old) != Old); 	 
+	return Old;
 #  endif
 #else
 #   error No atomics on this platform.

Modified: trunk/lib/windows/openimageio/lib/OpenImageIO.lib
===================================================================
(Binary files differ)




More information about the Bf-blender-cvs mailing list