Changeset 106598 in webkit
- Timestamp:
- Feb 2, 2012 3:36:40 PM (12 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r106596 r106598 1 2012-02-02 Kalev Lember <kalevlember@gmail.com> 2 3 [GTK] Use win32 native threading 4 https://bugs.webkit.org/show_bug.cgi?id=77676 5 6 Reviewed by Martin Robinson. 7 8 r97269 switched from glib threading to pthreads, breaking win32 GTK+. 9 This is a follow up, removing some leftovers in ThreadSpecific.h and 10 switching win32 to use the native threading in ThreadingWin.cpp. 11 12 * GNUmakefile.list.am: Compile in win32 native threading support 13 * wtf/ThreadSpecific.h: Remove GTK+-specific definitions 14 (ThreadSpecific): 15 (WTF::::destroy): 16 1 17 2012-02-02 Filip Pizlo <fpizlo@apple.com> 2 18 -
trunk/Source/JavaScriptCore/GNUmakefile.list.am
r106197 r106598 757 757 if TARGET_WIN32 758 758 javascriptcore_sources += \ 759 Source/JavaScriptCore/wtf/OSAllocatorWin.cpp 759 Source/JavaScriptCore/wtf/OSAllocatorWin.cpp \ 760 Source/JavaScriptCore/wtf/ThreadFunctionInvocation.h \ 761 Source/JavaScriptCore/wtf/ThreadingWin.cpp \ 762 Source/JavaScriptCore/wtf/ThreadSpecificWin.cpp 760 763 else 761 764 javascriptcore_sources += \ -
trunk/Source/JavaScriptCore/wtf/ThreadSpecific.h
r103287 r106598 47 47 #if USE(PTHREADS) 48 48 #include <pthread.h> 49 #elif PLATFORM(GTK)50 #include <glib.h>51 49 #elif OS(WINDOWS) 52 50 #include <windows.h> … … 101 99 #if USE(PTHREADS) 102 100 pthread_key_t m_key; 103 #elif PLATFORM(GTK)104 GStaticPrivate m_key;105 101 #elif OS(WINDOWS) 106 102 int m_index; … … 129 125 ASSERT(!get()); 130 126 pthread_setspecific(m_key, new Data(ptr, this)); 131 }132 133 #elif PLATFORM(GTK)134 135 template<typename T>136 inline ThreadSpecific<T>::ThreadSpecific()137 {138 g_static_private_init(&m_key);139 }140 141 template<typename T>142 inline T* ThreadSpecific<T>::get()143 {144 Data* data = static_cast<Data*>(g_static_private_get(&m_key));145 return data ? data->value : 0;146 }147 148 template<typename T>149 inline void ThreadSpecific<T>::set(T* ptr)150 {151 ASSERT(!get());152 Data* data = new Data(ptr, this);153 g_static_private_set(&m_key, data, destroy);154 127 } 155 128 … … 219 192 // Some pthreads implementations zero out the pointer before calling destroy(), so we temporarily reset it. 220 193 pthread_setspecific(data->owner->m_key, ptr); 221 #elif PLATFORM(GTK)222 // See comment as above223 g_static_private_set(&data->owner->m_key, data, 0);224 194 #endif 225 195 … … 229 199 #if USE(PTHREADS) 230 200 pthread_setspecific(data->owner->m_key, 0); 231 #elif PLATFORM(GTK)232 g_static_private_set(&data->owner->m_key, 0, 0);233 201 #elif OS(WINDOWS) 234 202 TlsSetValue(tlsKeys()[data->owner->m_index], 0);
Note: See TracChangeset
for help on using the changeset viewer.