stdcxx-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From far...@apache.org
Subject svn commit: r614868 - in /stdcxx/trunk: etc/config/src/ATOMIC_OPS.cpp include/rw/_config-msvcrt.h include/rw/_mutex.h
Date Thu, 24 Jan 2008 12:59:56 GMT
Author: faridz
Date: Thu Jan 24 04:59:49 2008
New Revision: 614868

URL: http://svn.apache.org/viewvc?rev=614868&view=rev
Log:
2008-01-24 Farid Zaripov <farid_zaripov@epam.com>

	Merged 614864 from branches/4.2.x
	* etc/config/src/ATOMIC_OPS.cpp: Delete unused configuration test.
	* include/rw/_config-msvcrt.h: Don't #define _RWSTD_NO_LONG_LONG as __int64
	if long long type is supported by compiler and _MSC_VER > 1300.
	* include/rw/_mutex.h: Use intrinsic interlocked functions on MSVC 7.1 and ICC.
	Declare the interlocked functions instead of #including <intrin.h>.
	Remove unused declaration of the InterlockedXXX() Win32 API functions.

Removed:
    stdcxx/trunk/etc/config/src/ATOMIC_OPS.cpp
Modified:
    stdcxx/trunk/include/rw/_config-msvcrt.h
    stdcxx/trunk/include/rw/_mutex.h

Modified: stdcxx/trunk/include/rw/_config-msvcrt.h
URL: http://svn.apache.org/viewvc/stdcxx/trunk/include/rw/_config-msvcrt.h?rev=614868&r1=614867&r2=614868&view=diff
==============================================================================
--- stdcxx/trunk/include/rw/_config-msvcrt.h (original)
+++ stdcxx/trunk/include/rw/_config-msvcrt.h Thu Jan 24 04:59:49 2008
@@ -89,7 +89,9 @@
 #endif   // _RWSTD_NO_STATIC_CONST_MEMBER_DEFINITION
 
    // enable iostream and locale support for long long integers
-#define _RWSTD_LONG_LONG __int64
+#if _MSC_VER <= 1300 || defined (_RWSTD_NO_LONG_LONG)
+#  define _RWSTD_LONG_LONG __int64
+#endif   // _MSC_VER <= 1300 || _RWSTD_NO_LONG_LONG
 
 #if defined (_WIN64)
      // FIXME: handle by forward declaring fuctions in <rw/_mutex.h>

Modified: stdcxx/trunk/include/rw/_mutex.h
URL: http://svn.apache.org/viewvc/stdcxx/trunk/include/rw/_mutex.h?rev=614868&r1=614867&r2=614868&view=diff
==============================================================================
--- stdcxx/trunk/include/rw/_mutex.h (original)
+++ stdcxx/trunk/include/rw/_mutex.h Thu Jan 24 04:59:49 2008
@@ -141,24 +141,6 @@
 __declspec (dllimport) void __stdcall
 DeleteCriticalSection (_RTL_CRITICAL_SECTION*);
 
-
-#if defined _RWSTD_INTERLOCKED_T && (!defined (_MSC_VER) || _MSC_VER < 1400)
-
-__declspec (dllimport) long __stdcall
-InterlockedIncrement (_RWSTD_INTERLOCKED_T*);
-
-__declspec (dllimport) long __stdcall
-InterlockedDecrement (_RWSTD_INTERLOCKED_T*);
-
-__declspec (dllimport) long __stdcall
-InterlockedExchange (_RWSTD_INTERLOCKED_T*, long);
-
-#  define _InterlockedIncrement InterlockedIncrement
-#  define _InterlockedDecrement InterlockedDecrement
-#  define _InterlockedExchange  InterlockedExchange
-
-#endif   // _RWSTD_INTERLOCKED_T && (!_MSC_VER || _MSC_VER < 1400)
-
 }   // extern "C"
 
 _RWSTD_NAMESPACE (__rw) { 
@@ -176,21 +158,35 @@
 
 #  endif   // _RWSTD_NO_FWD_DECLARATIONS
 
-#  if defined (_MSC_VER) && _MSC_VER >= 1400 && !defined (__INTEL_COMPILER)
-#    include <intrin.h>
-
-#    pragma intrinsic (_InterlockedIncrement)
-#    pragma intrinsic (_InterlockedIncrement16)
-#    pragma intrinsic (_InterlockedDecrement)
-#    pragma intrinsic (_InterlockedDecrement16)
-#    pragma intrinsic (_InterlockedExchange)
+#  ifdef _MSC_VER
+extern "C" long __cdecl _InterlockedIncrement (volatile long*);
+extern "C" long __cdecl _InterlockedDecrement (volatile long*);
+extern "C" long __cdecl _InterlockedExchange (volatile long*, long);
+#    ifndef __INTEL_COMPILER
+#      pragma intrinsic (_InterlockedIncrement)
+#      pragma intrinsic (_InterlockedDecrement)
+#      pragma intrinsic (_InterlockedExchange)
+#    endif   // __INTEL_COMPILER
+
+#    if _MSC_VER >= 1400 && !defined (__INTEL_COMPILER)
+extern "C" short __cdecl _InterlockedIncrement16 (volatile short*);
+extern "C" short __cdecl _InterlockedDecrement16 (volatile short*);
+#      pragma intrinsic (_InterlockedIncrement16)
+#      pragma intrinsic (_InterlockedDecrement16)
+#    endif   // _MSC_VER >= 1400 && !__INTEL_COMPILER
 
 #    ifdef _M_X64
-#      pragma intrinsic (_InterlockedIncrement64)
-#      pragma intrinsic (_InterlockedDecrement64)
-#      pragma intrinsic (_InterlockedExchange64)
-#    endif
-#  endif   // _MSC_VER >= 1400 && !__INTEL_COMPILER
+extern "C" long long __cdecl _InterlockedIncrement64 (volatile long long*);
+extern "C" long long __cdecl _InterlockedDecrement64 (volatile long long*);
+extern "C" long long __cdecl _InterlockedExchange64 (volatile long long*,
+                                                     long long);
+#      ifndef __INTEL_COMPILER
+#        pragma intrinsic (_InterlockedIncrement64)
+#        pragma intrinsic (_InterlockedDecrement64)
+#        pragma intrinsic (_InterlockedExchange64)
+#      endif   // __INTEL_COMPILER
+#    endif   // _M_X64
+#  endif   // _MSC_VER
 
 
 _RWSTD_NAMESPACE (__rw) { 



Mime
View raw message