[Webkit-unassigned] [Bug 106740] Fix the atomicIncrement implementation for Windows

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jan 14 03:55:39 PST 2013


https://bugs.webkit.org/show_bug.cgi?id=106740





--- Comment #1 from Zoltan Arvai <zarvai at inf.u-szeged.hu>  2013-01-14 03:57:26 PST ---
After trying build with InterlockedIncrement64 and InterlockedDecrement64, it seems it is not supported on 32bit build :(
Msdn has some resources about it: http://msdn.microsoft.com/en-us/library/windows/desktop/2ddez55b%28v=vs.85%29.aspx


diff --git a/Source/WTF/wtf/Atomics.h b/Source/WTF/wtf/Atomics.h
index 86ed805..7fc56a1 100644
--- a/Source/WTF/wtf/Atomics.h
+++ b/Source/WTF/wtf/Atomics.h
@@ -90,6 +90,9 @@ inline int atomicDecrement(int* addend) { return InterlockedDecrement(reinterpre
#else
inline int atomicIncrement(int volatile* addend) { return InterlockedIncrement(reinterpret_cast<long volatile*>(addend)); }
inline int atomicDecrement(int volatile* addend) { return InterlockedDecrement(reinterpret_cast<long volatile*>(addend)); }
+
+inline int64_t atomicIncrement(int64_t volatile* addend) { return InterlockedIncrement64(reinterpret_cast<long volatile*>(addend)); }
+inline int64_t atomicDecrement(int64_t volatile* addend) { return InterlockedDecrement64(reinterpret_cast<long volatile*>(addend)); }
#endif
#elif OS(DARWIN)


Error message: 

LLIntOffsetsExtractor.cpp
C:\WebKitBuildSlave\proba\WebKit\Source\WTF\wtf/Atomics.h(94) : error C3861: 'InterlockedIncrement64': identifier not found
C:\WebKitBuildSlave\proba\WebKit\Source\WTF\wtf/Atomics.h(95) : error C3861: 'InterlockedDecrement64': identifier not found
NMAKE : fatal error U1077: '"c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\BIN\cl.EXE"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\BIN\nmake.exe"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\BIN\nmake.exe"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: 'cd' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\BIN\nmake.exe"' : return code '0x2'
Stop.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list