| 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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 { | 107 { |
| 108 DEFINE_STATIC_LOCAL(Mutex, mutex, ()); | 108 DEFINE_STATIC_LOCAL(Mutex, mutex, ()); |
| 109 return mutex; | 109 return mutex; |
| 110 } | 110 } |
| 111 | 111 |
| 112 void initializeThreading() | 112 void initializeThreading() |
| 113 { | 113 { |
| 114 // This should only be called once. | 114 // This should only be called once. |
| 115 ASSERT(!atomicallyInitializedStaticMutex); | 115 ASSERT(!atomicallyInitializedStaticMutex); |
| 116 | 116 |
| 117 WTF::double_conversion::initialize(); | |
| 118 // StringImpl::empty() does not construct its static string in a threadsafe
fashion, | 117 // StringImpl::empty() does not construct its static string in a threadsafe
fashion, |
| 119 // so ensure it has been initialized from here. | 118 // so ensure it has been initialized from here. |
| 120 StringImpl::empty(); | 119 StringImpl::empty(); |
| 121 atomicallyInitializedStaticMutex = new Mutex; | 120 atomicallyInitializedStaticMutex = new Mutex; |
| 122 threadMapMutex(); | 121 threadMapMutex(); |
| 123 ThreadIdentifierData::initializeOnce(); | 122 ThreadIdentifierData::initializeOnce(); |
| 124 wtfThreadData(); | 123 wtfThreadData(); |
| 125 s_dtoaP5Mutex = new Mutex; | 124 s_dtoaP5Mutex = new Mutex; |
| 126 initializeDates(); | 125 initializeDates(); |
| 127 } | 126 } |
| (...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 383 | 382 |
| 384 void ThreadCondition::broadcast() | 383 void ThreadCondition::broadcast() |
| 385 { | 384 { |
| 386 int result = pthread_cond_broadcast(&m_condition); | 385 int result = pthread_cond_broadcast(&m_condition); |
| 387 ASSERT_UNUSED(result, !result); | 386 ASSERT_UNUSED(result, !result); |
| 388 } | 387 } |
| 389 | 388 |
| 390 } // namespace WTF | 389 } // namespace WTF |
| 391 | 390 |
| 392 #endif // USE(PTHREADS) | 391 #endif // USE(PTHREADS) |
| OLD | NEW |