Changeset 48300 in webkit for trunk/JavaScriptCore/wtf


Ignore:
Timestamp:
Sep 11, 2009, 6:29:25 AM (16 years ago)
Author:
[email protected]
Message:

2009-09-11 Jocelyn Turcotte <[email protected]>

Reviewed by Simon Hausmann.

Compiling JavaScriptCore on sparc 64 with gcc fails.

ThreadSafeShared uses the atomic gnu_cxx::exchange_and_add with an int,
however on sparc 64 the _Atomic_word argument is typedefed to long (8 bytes).

The patch disables WTF_USE_LOCKFREE_THREADSAFESHARED in ThreadSafeShared to use
a mutex instead when compiling for sparc 64 with gcc.

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

  • wtf/Platform.h: sparc64 is not defined on all OS.
Uses instead: sparc && arch64
sparcv9
  • wtf/Threading.h:
Location:
trunk/JavaScriptCore/wtf
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/wtf/Platform.h

    r48274 r48300  
    280280
    281281/* PLATFORM(SPARC64) */
    282 #if defined(__sparc64__)
     282#if defined(__sparc__) && defined(__arch64__) || defined (__sparcv9)
    283283#define WTF_PLATFORM_SPARC64 1
    284284#define WTF_PLATFORM_BIG_ENDIAN 1
  • trunk/JavaScriptCore/wtf/Threading.h

    r48161 r48300  
    229229inline int atomicDecrement(int volatile* addend) { return OSAtomicDecrement32Barrier(const_cast<int*>(addend)); }
    230230
    231 #elif COMPILER(GCC)
     231#elif COMPILER(GCC) && !PLATFORM(SPARC64) // sizeof(_Atomic_word) != sizeof(int) on sparc64 gcc
    232232#define WTF_USE_LOCKFREE_THREADSAFESHARED 1
    233233
Note: See TracChangeset for help on using the changeset viewer.