Changeset 24693 in webkit for trunk/JavaScriptCore
- Timestamp:
- Jul 27, 2007, 1:29:44 AM (18 years ago)
- Location:
- trunk/JavaScriptCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/ChangeLog
r24692 r24693 1 2007-07-27 Simon Hausmann <[email protected]> 2 3 Done with and reviewed by Lars and Zack. 4 5 Don't use pthread.h unless thread support is enabled. 6 7 * kjs/collector.cpp: 8 (KJS::Collector::registerAsMainThread): 9 (KJS::onMainThread): 10 1 11 2007-07-27 Simon Hausmann <[email protected]> 2 12 -
trunk/JavaScriptCore/kjs/collector.cpp
r24633 r24693 34 34 #include <algorithm> 35 35 36 #if USE(MULTIPLE_THREADS) 36 37 #include <pthread.h> 38 #endif 37 39 38 40 #if PLATFORM(DARWIN) … … 293 295 } 294 296 297 #if USE(MULTIPLE_THREADS) 295 298 static pthread_t mainThread; 299 #endif 296 300 297 301 void Collector::registerAsMainThread() 298 302 { 303 #if USE(MULTIPLE_THREADS) 299 304 mainThread = pthread_self(); 305 #endif 300 306 } 301 307 302 308 static inline bool onMainThread() 303 309 { 310 #if USE(MULTIPLE_THREADS) 304 311 #if PLATFORM(DARWIN) 305 312 return pthread_main_np(); 306 313 #else 307 314 return !!pthread_equal(pthread_self(), mainThread); 315 #endif 316 #else 317 return true; 308 318 #endif 309 319 }
Note:
See TracChangeset
for help on using the changeset viewer.