|
Lines 41-47
a/Source/WTF/wtf/MainThread.cpp_sec1
|
| 41 |
namespace WTF { |
41 |
namespace WTF { |
| 42 |
|
42 |
|
| 43 |
static bool callbacksPaused; // This global variable is only accessed from main thread. |
43 |
static bool callbacksPaused; // This global variable is only accessed from main thread. |
| 44 |
#if !OS(DARWIN) && !PLATFORM(GTK) |
44 |
#if !OS(DARWIN) && !USE(GLIB) |
| 45 |
static ThreadIdentifier mainThreadIdentifier; |
45 |
static ThreadIdentifier mainThreadIdentifier; |
| 46 |
#endif |
46 |
#endif |
| 47 |
|
47 |
|
|
Lines 53-59
static Deque<Function<void ()>>& functionQueue()
a/Source/WTF/wtf/MainThread.cpp_sec2
|
| 53 |
return functionQueue; |
53 |
return functionQueue; |
| 54 |
} |
54 |
} |
| 55 |
|
55 |
|
| 56 |
#if OS(DARWIN) || PLATFORM(GTK) |
56 |
#if OS(DARWIN) || USE(GLIB) |
| 57 |
static pthread_once_t initializeMainThreadKeyOnce = PTHREAD_ONCE_INIT; |
57 |
static pthread_once_t initializeMainThreadKeyOnce = PTHREAD_ONCE_INIT; |
| 58 |
|
58 |
|
| 59 |
static void initializeMainThreadOnce() |
59 |
static void initializeMainThreadOnce() |
|
Lines 68-74
void initializeMainThread()
a/Source/WTF/wtf/MainThread.cpp_sec3
|
| 68 |
pthread_once(&initializeMainThreadKeyOnce, initializeMainThreadOnce); |
68 |
pthread_once(&initializeMainThreadKeyOnce, initializeMainThreadOnce); |
| 69 |
} |
69 |
} |
| 70 |
|
70 |
|
| 71 |
#if !USE(WEB_THREAD) && !PLATFORM(GTK) |
71 |
#if !USE(WEB_THREAD) && !USE(GLIB) |
| 72 |
static void initializeMainThreadToProcessMainThreadOnce() |
72 |
static void initializeMainThreadToProcessMainThreadOnce() |
| 73 |
{ |
73 |
{ |
| 74 |
initializeThreading(); |
74 |
initializeThreading(); |
|
Lines 80-86
void initializeMainThreadToProcessMainThread()
a/Source/WTF/wtf/MainThread.cpp_sec4
|
| 80 |
{ |
80 |
{ |
| 81 |
pthread_once(&initializeMainThreadKeyOnce, initializeMainThreadToProcessMainThreadOnce); |
81 |
pthread_once(&initializeMainThreadKeyOnce, initializeMainThreadToProcessMainThreadOnce); |
| 82 |
} |
82 |
} |
| 83 |
#elif !PLATFORM(GTK) |
83 |
#elif !USE(GLIB) |
| 84 |
static pthread_once_t initializeWebThreadKeyOnce = PTHREAD_ONCE_INIT; |
84 |
static pthread_once_t initializeWebThreadKeyOnce = PTHREAD_ONCE_INIT; |
| 85 |
|
85 |
|
| 86 |
static void initializeWebThreadOnce() |
86 |
static void initializeWebThreadOnce() |
|
Lines 178-184
void setMainThreadCallbacksPaused(bool paused)
a/Source/WTF/wtf/MainThread.cpp_sec5
|
| 178 |
scheduleDispatchFunctionsOnMainThread(); |
178 |
scheduleDispatchFunctionsOnMainThread(); |
| 179 |
} |
179 |
} |
| 180 |
|
180 |
|
| 181 |
#if !OS(DARWIN) && !USE(GLIB_EVENT_LOOP) |
181 |
#if !OS(DARWIN) && !USE(GLIB) |
| 182 |
bool isMainThread() |
182 |
bool isMainThread() |
| 183 |
{ |
183 |
{ |
| 184 |
return currentThread() == mainThreadIdentifier; |
184 |
return currentThread() == mainThreadIdentifier; |