summaryrefslogtreecommitdiffstats
path: root/src/corelib/arch
diff options
context:
space:
mode:
authoraxis <qt-info@nokia.com>2009-06-02 08:14:04 (GMT)
committeraxis <qt-info@nokia.com>2009-06-02 08:14:04 (GMT)
commit3c594257c4aedf113de92c5888e74f676ba87385 (patch)
treee309c7502e13f552203b509494a20792125fed29 /src/corelib/arch
parent539989f41316329e7aba69ba97e1579eed6036e6 (diff)
parent0ff7b68f2e3f184d809cf6fd13ff930efa493e9f (diff)
downloadQt-3c594257c4aedf113de92c5888e74f676ba87385.zip
Qt-3c594257c4aedf113de92c5888e74f676ba87385.tar.gz
Qt-3c594257c4aedf113de92c5888e74f676ba87385.tar.bz2
Merge branch '4.5' of git@scm.dev.nokia.troll.no:qt/qt
Conflicts: configure.exe examples/itemviews/puzzle/puzzle.pro examples/qtconcurrent/imagescaling/imagescaling.pro examples/widgets/movie/movie.pro tools/configure/configureapp.cpp Will rebuild configure.exe in next commit.
Diffstat (limited to 'src/corelib/arch')
-rw-r--r--src/corelib/arch/qatomic_windows.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/corelib/arch/qatomic_windows.h b/src/corelib/arch/qatomic_windows.h
index c795ea6..a1a5a7d 100644
--- a/src/corelib/arch/qatomic_windows.h
+++ b/src/corelib/arch/qatomic_windows.h
@@ -220,6 +220,9 @@ Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddOrdered(qptrdiff valueTo
#if !defined(Q_OS_WINCE) && !defined(Q_CC_MWERKS)
// use compiler intrinsics for all atomic functions
+//those functions need to be define in the global namespace
+QT_END_NAMESPACE
+
extern "C" {
long __cdecl _InterlockedIncrement(volatile long *);
long __cdecl _InterlockedDecrement(volatile long *);
@@ -252,6 +255,9 @@ extern "C" {
# define _InterlockedExchangeAddPointer(a,b) \
_InterlockedExchangeAdd(reinterpret_cast<volatile long *>(a), long(b))
# endif
+
+QT_BEGIN_NAMESPACE
+
inline bool QBasicAtomicInt::ref()
{
return _InterlockedIncrement(reinterpret_cast<volatile long *>(&_q_value)) != 0;
@@ -334,6 +340,8 @@ Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddOrdered(qptrdiff valueTo
#define Q_ARGUMENT_TYPE
#endif
+QT_END_NAMESPACE
+
extern "C" {
long __cdecl InterlockedIncrement(long Q_ARGUMENT_TYPE * lpAddend);
long __cdecl InterlockedDecrement(long Q_ARGUMENT_TYPE * lpAddend);
@@ -350,6 +358,8 @@ long __cdecl InterlockedExchangeAdd(long Q_ARGUMENT_TYPE * Addend, long Value);
# pragma intrinsic (_InterlockedExchangeAdd)
#endif
+QT_BEGIN_NAMESPACE
+
#endif
@@ -408,6 +418,8 @@ Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddOrdered(qptrdiff valueTo
// MinGW's definition, such that we pick up variations in the headers.
#ifndef __INTERLOCKED_DECLARED
#define __INTERLOCKED_DECLARED
+QT_END_NAMESPACE
+
extern "C" {
__declspec(dllimport) long __stdcall InterlockedCompareExchange(long *, long, long);
__declspec(dllimport) long __stdcall InterlockedIncrement(long *);
@@ -415,6 +427,8 @@ extern "C" {
__declspec(dllimport) long __stdcall InterlockedExchange(long *, long);
__declspec(dllimport) long __stdcall InterlockedExchangeAdd(long *, long);
}
+
+QT_BEGIN_NAMESPACE
#endif
inline bool QBasicAtomicInt::ref()