Performs thread-safe lazy one-time general TBB initialization.
| 216 | |
| 217 | //! Performs thread-safe lazy one-time general TBB initialization. |
| 218 | void DoOneTimeInitializations() { |
| 219 | suppress_unused_warning(_pad); |
| 220 | __TBB_InitOnce::lock(); |
| 221 | // No fence required for load of InitializationDone, because we are inside a critical section. |
| 222 | if( !__TBB_InitOnce::InitializationDone ) { |
| 223 | __TBB_InitOnce::add_ref(); |
| 224 | if( GetBoolEnvironmentVariable("TBB_VERSION") ) |
| 225 | PrintVersion(); |
| 226 | bool itt_present = false; |
| 227 | #if DO_ITT_NOTIFY |
| 228 | ITT_DoUnsafeOneTimeInitialization(); |
| 229 | itt_present = ITT_Present; |
| 230 | #endif /* DO_ITT_NOTIFY */ |
| 231 | initialize_cache_aligned_allocator(); |
| 232 | governor::initialize_rml_factory(); |
| 233 | Scheduler_OneTimeInitialization( itt_present ); |
| 234 | // Force processor groups support detection |
| 235 | governor::default_num_threads(); |
| 236 | // Dump version data |
| 237 | governor::print_version_info(); |
| 238 | PrintExtraVersionInfo( "Tools support", itt_present ? "enabled" : "disabled" ); |
| 239 | __TBB_InitOnce::InitializationDone = true; |
| 240 | } |
| 241 | __TBB_InitOnce::unlock(); |
| 242 | } |
| 243 | |
| 244 | #if (_WIN32||_WIN64) && !__TBB_SOURCE_DIRECTLY_INCLUDED |
| 245 | //! Windows "DllMain" that handles startup and shutdown of dynamic library. |
no test coverage detected