Browse Source

Minor ICC fixes.

tags/2021-05-28
Julian Storer 16 years ago
parent
commit
bca84263a4
4 changed files with 308 additions and 285 deletions
  1. +295
    -275
      build/linux/JUCE.make
  2. +2
    -1
      build/linux/juce_premake.lua
  3. +7
    -9
      src/core/juce_Atomic.h
  4. +4
    -0
      src/threads/juce_Thread.h

+ 295
- 275
build/linux/JUCE.make
File diff suppressed because it is too large
View File


+ 2
- 1
build/linux/juce_premake.lua View File

@@ -21,7 +21,8 @@ package.config["Debug"].defines = { "LINUX=1", "DEBUG=1", "_DEBUG=1" };
package.config["Debug"].buildoptions = { "-D_DEBUG -ggdb -Wall" }
package.config["Release"].defines = { "LINUX=1", "NDEBUG=1" };
package.config["Release"].buildoptions = { "-O2 -Wall -fvisibility=hidden" }
package.config["Release"].buildoptions = { "-fvisibility=hidden" }
package.config["Release"].buildflags = { "extra-warnings", "optimize-speed", "no-symbols" }
package.includepaths = {


+ 7
- 9
src/core/juce_Atomic.h View File

@@ -86,21 +86,19 @@ private:
#elif JUCE_LINUX // Linux...
#if __INTEL_COMPILER
inline void Atomic::increment (int32& variable) { _InterlockedIncrement (static_cast <void*> (&variable)); }
inline int32 Atomic::incrementAndReturn (int32& variable) { return _InterlockedIncrement (static_cast <void*> (&variable)); }
inline void Atomic::decrement (int32& variable) { _InterlockedDecrement (static_cast <void*> (&variable)); }
inline int32 Atomic::decrementAndReturn (int32& variable) { return _InterlockedDecrement (static_cast <void*> (&variable)); }
inline void Atomic::increment (int32& variable) { _InterlockedIncrement (&variable); }
inline int32 Atomic::incrementAndReturn (int32& variable) { return _InterlockedIncrement (&variable); }
inline void Atomic::decrement (int32& variable) { _InterlockedDecrement (&variable); }
inline int32 Atomic::decrementAndReturn (int32& variable) { return _InterlockedDecrement (&variable); }
inline int32 Atomic::compareAndExchange (int32& destination, int32 newValue, int32 oldValue)
{ return _InterlockedCompareExchange (static_cast <void*> (&destination), newValue, oldValue); }
{ return _InterlockedCompareExchange (&destination, newValue, oldValue); }
inline void* Atomic::swapPointers (void* volatile* value1, void* value2)
{
#if __ia64__
return reinterpret_cast<void*> (_InterlockedExchange64 (reinterpret_cast<volatile __int64*> (value1),
reinterpret_cast<__int64> (value2)));
return reinterpret_cast<void*> (_InterlockedExchange64 (const_cast<void**> (value1), reinterpret_cast<__int64> (value2)));
#else
return reinterpret_cast<void*> (_InterlockedExchange (reinterpret_cast<volatile int*> (value1),
reinterpret_cast<long> (value2)));
return reinterpret_cast<void*> (_InterlockedExchange (const_cast<void**> (value1), reinterpret_cast<long> (value2)));
#endif
}


+ 4
- 0
src/threads/juce_Thread.h View File

@@ -126,6 +126,10 @@ public:
Calling this means that the threadShouldExit() method will then return true.
The thread should be regularly checking this to see whether it should exit.
If your thread makes use of wait(), you might want to call notify() after calling
this method, to interrupt any waits that might be in progress, and allow it
to reach a point where it can exit.
@see threadShouldExit
@see waitForThreadToExit


Loading…
Cancel
Save