Author: faridz
Date: Tue Sep 18 12:46:28 2007
New Revision: 577031
URL: http://svn.apache.org/viewvc?rev=577031&view=rev
Log:
2007-09-18 Farid Zaripov <[EMAIL PROTECTED]>
* _mutex.h: Use #pragma intrinsic only on MSVC
(ICC doesn't support this #pragma).
Use _InterlockedIncrement16() and _InterlockedDecrement16()
intrinsic functions only on MSVC (ICC doesn't support them).
Modified:
incubator/stdcxx/trunk/include/rw/_mutex.h
Modified: incubator/stdcxx/trunk/include/rw/_mutex.h
URL:
http://svn.apache.org/viewvc/incubator/stdcxx/trunk/include/rw/_mutex.h?rev=577031&r1=577030&r2=577031&view=diff
==============================================================================
--- incubator/stdcxx/trunk/include/rw/_mutex.h (original)
+++ incubator/stdcxx/trunk/include/rw/_mutex.h Tue Sep 18 12:46:28 2007
@@ -175,7 +175,7 @@
# endif // _RWSTD_NO_FWD_DECLARATIONS
-# if _MSC_VER >= 1400
+# if defined (_MSC_VER) && _MSC_VER >= 1400 && !defined (__INTEL_COMPILER)
# include <intrin.h>
# pragma intrinsic (_InterlockedIncrement)
@@ -189,7 +189,7 @@
# pragma intrinsic (_InterlockedDecrement64)
# pragma intrinsic (_InterlockedExchange64)
# endif
-# endif // _MSC_VER >= 1400
+# endif // _MSC_VER >= 1400 && !__INTEL_COMPILER
_RWSTD_NAMESPACE (__rw) {
@@ -1232,7 +1232,7 @@
{
_RWSTD_COMPILE_ASSERT (2 == sizeof (short));
-#if defined (_MSC_VER) && _MSC_VER >= 1400
+#if defined (_MSC_VER) && _MSC_VER >= 1400 && !defined (__INTEL_COMPILER)
return _InterlockedIncrement16 (&__x);
#else
return __rw_atomic_add16 (&__x, +1);
@@ -1245,7 +1245,7 @@
{
_RWSTD_COMPILE_ASSERT (2 == sizeof (unsigned short));
-#if defined (_MSC_VER) && _MSC_VER >= 1400
+#if defined (_MSC_VER) && _MSC_VER >= 1400 && !defined (__INTEL_COMPILER)
return _InterlockedIncrement16 (_RWSTD_REINTERPRET_CAST (short*, &__x));
#else
return __rw_atomic_add16 (_RWSTD_REINTERPRET_CAST (short*, &__x), +1);
@@ -1308,7 +1308,7 @@
{
_RWSTD_COMPILE_ASSERT (2 == sizeof (short));
-#if defined (_MSC_VER) && _MSC_VER >= 1400
+#if defined (_MSC_VER) && _MSC_VER >= 1400 && !defined (__INTEL_COMPILER)
return _InterlockedDecrement16 (&__x);
#else
return __rw_atomic_add16 (&__x, -1);
@@ -1321,7 +1321,7 @@
{
_RWSTD_COMPILE_ASSERT (2 == sizeof (unsigned short));
-#if defined (_MSC_VER) && _MSC_VER >= 1400
+#if defined (_MSC_VER) && _MSC_VER >= 1400 && !defined (__INTEL_COMPILER)
return _InterlockedDecrement16 (_RWSTD_REINTERPRET_CAST (short*, &__x));
#else
return __rw_atomic_add16 (_RWSTD_REINTERPRET_CAST (short*, &__x), -1);
@@ -1499,7 +1499,7 @@
{
_RWSTD_COMPILE_ASSERT (2 == sizeof (short));
-#ifdef _MSC_VER
+#if defined (_MSC_VER) && !defined (__INTEL_COMPILER)
return _InterlockedIncrement16 (&__x);
#else
return __rw_atomic_add16 (_RWSTD_REINTERPRET_CAST (_RWSTD_INT16_T*, &__x),
@@ -1513,7 +1513,7 @@
{
_RWSTD_COMPILE_ASSERT (2 == sizeof (unsigned short));
-#ifdef _MSC_VER
+#if defined (_MSC_VER) && !defined (__INTEL_COMPILER)
return _InterlockedIncrement16 (_RWSTD_REINTERPRET_CAST (short*, &__x));
#else
return __rw_atomic_add16 (_RWSTD_REINTERPRET_CAST (_RWSTD_INT16_T*, &__x),
@@ -1643,7 +1643,7 @@
{
_RWSTD_COMPILE_ASSERT (2 == sizeof (short));
-#ifdef _MSC_VER
+#if defined (_MSC_VER) && !defined (__INTEL_COMPILER)
return _InterlockedDecrement16 (&__x);
#else
return __rw_atomic_add16 (_RWSTD_REINTERPRET_CAST (_RWSTD_INT16_T*, &__x),
@@ -1657,7 +1657,7 @@
{
_RWSTD_COMPILE_ASSERT (2 == sizeof (unsigned short));
-#ifdef _MSC_VER
+#if defined (_MSC_VER) && !defined (__INTEL_COMPILER)
return _InterlockedDecrement16 (_RWSTD_REINTERPRET_CAST (short*, &__x));
#else
return __rw_atomic_add16 (_RWSTD_REINTERPRET_CAST (_RWSTD_INT16_T*, &__x),