MCPcopy Create free account
hub / github.com/cameron314/concurrentqueue / Scheduler_OneTimeInitialization

Function Scheduler_OneTimeInitialization

benchmarks/tbb/scheduler.cpp:56–68  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

54#endif /* __TBB_TASK_GROUP_CONTEXT */
55
56void Scheduler_OneTimeInitialization ( bool itt_present ) {
57 AllocateSchedulerPtr = itt_present ? &custom_scheduler<DefaultSchedulerTraits>::allocate_scheduler :
58 &custom_scheduler<IntelSchedulerTraits>::allocate_scheduler;
59#if __TBB_TASK_GROUP_CONTEXT
60 // There must be no tasks belonging to this fake task group. Mark invalid for the assert
61 __TBB_ASSERT(!(task_group_context::low_unused_state_bit & (task_group_context::low_unused_state_bit-1)), NULL);
62 the_dummy_context.my_state = task_group_context::low_unused_state_bit;
63#if __TBB_TASK_PRIORITY
64 // It should never prevent tasks from being passed to execution.
65 the_dummy_context.my_priority = num_priority_levels - 1;
66#endif /* __TBB_TASK_PRIORITY */
67#endif /* __TBB_TASK_GROUP_CONTEXT */
68}
69
70//------------------------------------------------------------------------
71// scheduler interface

Callers 1

DoOneTimeInitializationsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected