Ignore:
Timestamp:
Jan 20, 2010, 5:01:58 PM (15 years ago)
Author:
[email protected]
Message:

Use the inline i386 assembly for x86_64 as well rather than falling back to using pthread mutexes.

Reviewed by Oliver Hunt.

  • wtf/TCSpinLock.h:

(TCMalloc_SpinLock::Lock):
(TCMalloc_SpinLock::Unlock):
(TCMalloc_SlowLock):

File:
1 edited

Legend:

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

    r52791 r53580  
    3434#define TCMALLOC_INTERNAL_SPINLOCK_H__
    3535
    36 #if (CPU(X86) || CPU(PPC)) && (COMPILER(GCC) || COMPILER(MSVC))
     36#if (CPU(X86) || CPU(X86_64) || CPU(PPC)) && (COMPILER(GCC) || COMPILER(MSVC))
    3737
    3838#include <time.h>       /* For nanosleep() */
     
    6363    int r;
    6464#if COMPILER(GCC)
    65 #if CPU(X86)
     65#if CPU(X86) || CPU(X86_64)
    6666    __asm__ __volatile__
    6767      ("xchgl %0, %1"
     
    9393  inline void Unlock() {
    9494#if COMPILER(GCC)
    95 #if CPU(X86)
     95#if CPU(X86) || CPU(X86_64)
    9696    __asm__ __volatile__
    9797      ("movl $0, %0"
     
    139139    int r;
    140140#if COMPILER(GCC)
    141 #if CPU(X86)
     141#if CPU(X86) || CPU(X86_64)
    142142    __asm__ __volatile__
    143143      ("xchgl %0, %1"
Note: See TracChangeset for help on using the changeset viewer.