Ignore:
Timestamp:
Mar 17, 2014, 1:29:12 AM (11 years ago)
Author:
[email protected]
Message:

[Mac] WTFThreadData should use _pthread_getspecific_direct().
<https://webkit.org/b/130320>

Hack WTFThreadData to use a direct key for TLS access when available.
This mechanism uses a dedicated segment register and is the same way
we implement the fast path in FastMalloc.

Reviewed by Darin Adler.

  • wtf/FastMalloc.cpp:
  • wtf/WTFThreadData.cpp:

(WTF::WTFThreadData::createAndRegisterForGetspecificDirect):

  • wtf/WTFThreadData.h:

(WTF::wtfThreadData):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WTF/wtf/FastMalloc.cpp

    r164742 r165725  
    462462#endif
    463463
    464 #ifdef __has_include
    465 #if __has_include(<System/pthread_machdep.h>)
    466 
     464#if defined(__has_include) && __has_include(<System/pthread_machdep.h>)
    467465#include <System/pthread_machdep.h>
     466#endif
    468467
    469468#if defined(__PTK_FRAMEWORK_JAVASCRIPTCORE_KEY0)
    470469#define WTF_USE_PTHREAD_GETSPECIFIC_DIRECT 1
    471 #endif
    472 
    473 #endif
    474470#endif
    475471
Note: See TracChangeset for help on using the changeset viewer.