| OLD | NEW | 
|---|
| 1 /* | 1 /* | 
| 2  * Copyright (C) 2007, 2009 Apple Inc. All rights reserved. | 2  * Copyright (C) 2007, 2009 Apple Inc. All rights reserved. | 
| 3  * Copyright (C) 2007 Justin Haygood (jhaygood@reaktix.com) | 3  * Copyright (C) 2007 Justin Haygood (jhaygood@reaktix.com) | 
| 4  * Copyright (C) 2011 Research In Motion Limited. All rights reserved. | 4  * Copyright (C) 2011 Research In Motion Limited. All rights reserved. | 
| 5  * | 5  * | 
| 6  * Redistribution and use in source and binary forms, with or without | 6  * Redistribution and use in source and binary forms, with or without | 
| 7  * modification, are permitted provided that the following conditions | 7  * modification, are permitted provided that the following conditions | 
| 8  * are met: | 8  * are met: | 
| 9  * | 9  * | 
| 10  * 1.  Redistributions of source code must retain the above copyright | 10  * 1.  Redistributions of source code must retain the above copyright | 
| (...skipping 20 matching lines...) Expand all  Loading... | 
| 31 #include "config.h" | 31 #include "config.h" | 
| 32 #include "wtf/Threading.h" | 32 #include "wtf/Threading.h" | 
| 33 | 33 | 
| 34 #if USE(PTHREADS) | 34 #if USE(PTHREADS) | 
| 35 | 35 | 
| 36 #include "wtf/DateMath.h" | 36 #include "wtf/DateMath.h" | 
| 37 #include "wtf/HashMap.h" | 37 #include "wtf/HashMap.h" | 
| 38 #include "wtf/OwnPtr.h" | 38 #include "wtf/OwnPtr.h" | 
| 39 #include "wtf/PassOwnPtr.h" | 39 #include "wtf/PassOwnPtr.h" | 
| 40 #include "wtf/RandomNumberSeed.h" | 40 #include "wtf/RandomNumberSeed.h" | 
| 41 #include "wtf/StackStats.h" |  | 
| 42 #include "wtf/StdLibExtras.h" | 41 #include "wtf/StdLibExtras.h" | 
| 43 #include "wtf/ThreadFunctionInvocation.h" | 42 #include "wtf/ThreadFunctionInvocation.h" | 
| 44 #include "wtf/ThreadIdentifierDataPthreads.h" | 43 #include "wtf/ThreadIdentifierDataPthreads.h" | 
| 45 #include "wtf/ThreadSpecific.h" | 44 #include "wtf/ThreadSpecific.h" | 
|  | 45 #include "wtf/ThreadingPrimitives.h" | 
| 46 #include "wtf/UnusedParam.h" | 46 #include "wtf/UnusedParam.h" | 
| 47 #include "wtf/WTFThreadData.h" | 47 #include "wtf/WTFThreadData.h" | 
| 48 #include "wtf/dtoa.h" | 48 #include "wtf/dtoa.h" | 
| 49 #include "wtf/dtoa/cached-powers.h" | 49 #include "wtf/dtoa/cached-powers.h" | 
| 50 #include <errno.h> | 50 #include <errno.h> | 
| 51 | 51 | 
| 52 #if !COMPILER(MSVC) | 52 #if !COMPILER(MSVC) | 
| 53 #include <limits.h> | 53 #include <limits.h> | 
| 54 #include <sched.h> | 54 #include <sched.h> | 
| 55 #include <sys/time.h> | 55 #include <sys/time.h> | 
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 116     ASSERT(!atomicallyInitializedStaticMutex); | 116     ASSERT(!atomicallyInitializedStaticMutex); | 
| 117 | 117 | 
| 118     WTF::double_conversion::initialize(); | 118     WTF::double_conversion::initialize(); | 
| 119     // StringImpl::empty() does not construct its static string in a threadsafe 
     fashion, | 119     // StringImpl::empty() does not construct its static string in a threadsafe 
     fashion, | 
| 120     // so ensure it has been initialized from here. | 120     // so ensure it has been initialized from here. | 
| 121     StringImpl::empty(); | 121     StringImpl::empty(); | 
| 122     atomicallyInitializedStaticMutex = new Mutex; | 122     atomicallyInitializedStaticMutex = new Mutex; | 
| 123     threadMapMutex(); | 123     threadMapMutex(); | 
| 124     initializeRandomNumberGenerator(); | 124     initializeRandomNumberGenerator(); | 
| 125     ThreadIdentifierData::initializeOnce(); | 125     ThreadIdentifierData::initializeOnce(); | 
| 126     StackStats::initialize(); |  | 
| 127     wtfThreadData(); | 126     wtfThreadData(); | 
| 128     s_dtoaP5Mutex = new Mutex; | 127     s_dtoaP5Mutex = new Mutex; | 
| 129     initializeDates(); | 128     initializeDates(); | 
| 130 } | 129 } | 
| 131 | 130 | 
| 132 void lockAtomicallyInitializedStaticMutex() | 131 void lockAtomicallyInitializedStaticMutex() | 
| 133 { | 132 { | 
| 134     ASSERT(atomicallyInitializedStaticMutex); | 133     ASSERT(atomicallyInitializedStaticMutex); | 
| 135     atomicallyInitializedStaticMutex->lock(); | 134     atomicallyInitializedStaticMutex->lock(); | 
| 136 } | 135 } | 
| (...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 386 | 385 | 
| 387 void ThreadCondition::broadcast() | 386 void ThreadCondition::broadcast() | 
| 388 { | 387 { | 
| 389     int result = pthread_cond_broadcast(&m_condition); | 388     int result = pthread_cond_broadcast(&m_condition); | 
| 390     ASSERT_UNUSED(result, !result); | 389     ASSERT_UNUSED(result, !result); | 
| 391 } | 390 } | 
| 392 | 391 | 
| 393 } // namespace WTF | 392 } // namespace WTF | 
| 394 | 393 | 
| 395 #endif // USE(PTHREADS) | 394 #endif // USE(PTHREADS) | 
| OLD | NEW | 
|---|