Changeset 35367 in webkit for trunk/JavaScriptCore/wtf/Threading.h
- Timestamp:
- Jul 25, 2008, 7:28:57 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/wtf/Threading.h
r34757 r35367 64 64 #include <wtf/Noncopyable.h> 65 65 66 #if PLATFORM(WIN_OS) 66 // On wx/Win, including windows.h here causes multiply-defined symbol errors 67 // for libjpeg and wx, and also wx needs to include windows.h itself first for wx 68 // includes to work right. So until we can find a better solution to this problem, 69 // on wx, we workaround including windows.h here. 70 #if PLATFORM(WIN_OS) && !PLATFORM(WX) 67 71 #include <windows.h> 68 72 #elif PLATFORM(DARWIN) … … 169 173 }; 170 174 171 #if PLATFORM(WIN_OS) && !COMPILER(MSVC7)175 #if PLATFORM(WIN_OS) 172 176 #define WTF_USE_LOCKFREE_THREADSAFESHARED 1 173 177 174 #if COMPILER(MINGW) 178 #if COMPILER(MINGW) || COMPILER(MSVC7) 179 #if PLATFORM(WX) 180 // we define these prototypes to avoid a dependency on windows.h in the header. See comment at top of header. 181 long InterlockedIncrement(long *Addend); 182 long InterlockedDecrement(long *Addend); 183 #endif 175 184 inline void atomicIncrement(int* addend) { InterlockedIncrement(reinterpret_cast<long*>(addend)); } 176 185 inline int atomicDecrement(int* addend) { return InterlockedDecrement(reinterpret_cast<long*>(addend)); } 177 186 #else 187 #if PLATFORM(WX) 188 // we define these prototypes to avoid a dependency on windows.h in the header. See comment at top of header. 189 long InterlockedIncrement(long volatile *Addend); 190 long InterlockedDecrement(long volatile *Addend); 191 #endif 178 192 inline void atomicIncrement(int volatile* addend) { InterlockedIncrement(reinterpret_cast<long volatile*>(addend)); } 179 193 inline int atomicDecrement(int volatile* addend) { return InterlockedDecrement(reinterpret_cast<long volatile*>(addend)); }
Note:
See TracChangeset
for help on using the changeset viewer.