void initializeMainThreadPlatform()
{
-#if !defined(BUILDING_ON_TIGER)
ASSERT(!staticMainThreadCaller);
staticMainThreadCaller = [[WTFMainThreadCaller alloc] init];
mainThreadEstablishedAsPthreadMain = false;
mainThreadPthread = pthread_self();
mainThreadNSThread = [[NSThread currentThread] retain];
-#else
- ASSERT_NOT_REACHED();
-#endif
}
void initializeMainThreadToProcessMainThreadPlatform()
return;
}
-#if !defined(BUILDING_ON_TIGER)
ASSERT(mainThreadNSThread);
[staticMainThreadCaller performSelector:@selector(call) onThread:mainThreadNSThread withObject:nil waitUntilDone:NO];
-#else
- ASSERT_NOT_REACHED();
-#endif
}
bool isMainThread()
return pthread_main_np();
}
-#if !defined(BUILDING_ON_TIGER)
ASSERT(mainThreadPthread);
return pthread_equal(pthread_self(), mainThreadPthread);
-#else
- ASSERT_NOT_REACHED();
- return false;
-#endif
}
// This function is the same as isMainThread() above except that it does not do