scheduler_common.h
Go to the documentation of this file.
/*
Copyright (c) 2005-2020 Intel Corporation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
#ifndef _TBB_scheduler_common_H
#define _TBB_scheduler_common_H
#include "tbb/tbb_machine.h"
#include "tbb/cache_aligned_allocator.h"
#include <string.h> // for memset, memcpy, memmove
#include "tbb_statistics.h"
#if TBB_USE_ASSERT > 1
#include <stdio.h>
#endif /* TBB_USE_ASSERT > 1 */
/* Temporarily change "private" to "public" while including "tbb/task.h".
This hack allows us to avoid publishing internal types and methods
in the public header files just for sake of friend declarations. */
#ifndef private
#define private public
#define undef_private
#endif
#include "tbb/task.h"
#include "tbb/tbb_exception.h"
#ifdef undef_private
#undef private
#endif
#ifndef __TBB_SCHEDULER_MUTEX_TYPE
#define __TBB_SCHEDULER_MUTEX_TYPE tbb::spin_mutex
#endif
// TODO: add conditional inclusion based on specified type
#include "tbb/spin_mutex.h"
// This macro is an attempt to get rid of ugly ifdefs in the shared parts of the code.
// It drops the second argument depending on whether the controlling macro is defined.
// The first argument is just a convenience allowing to keep comma before the macro usage.
#if __TBB_TASK_GROUP_CONTEXT
#define __TBB_CONTEXT_ARG1(context) context
#define __TBB_CONTEXT_ARG(arg1, context) arg1, context
#else /* !__TBB_TASK_GROUP_CONTEXT */
#define __TBB_CONTEXT_ARG1(context)
#define __TBB_CONTEXT_ARG(arg1, context) arg1
#endif /* !__TBB_TASK_GROUP_CONTEXT */
#if __TBB_TASK_ISOLATION
#define __TBB_ISOLATION_EXPR(isolation) isolation
#define __TBB_ISOLATION_ARG(arg1, isolation) arg1, isolation
#else
#define __TBB_ISOLATION_EXPR(isolation)
#define __TBB_ISOLATION_ARG(arg1, isolation) arg1
#endif /* __TBB_TASK_ISOLATION */
#if DO_TBB_TRACE
#include <cstdio>
#define TBB_TRACE(x) ((void)std::printf x)
#else
#define TBB_TRACE(x) ((void)(0))
#endif /* DO_TBB_TRACE */
#if !__TBB_CPU_CTL_ENV_PRESENT
#include <fenv.h>
#endif
#if _MSC_VER && !defined(__INTEL_COMPILER)
// Workaround for overzealous compiler warnings
// These particular warnings are so ubiquitous that no attempt is made to narrow
// the scope of the warnings.
#pragma warning (disable: 4100 4127 4312 4244 4267 4706)
#endif
namespace tbb {
namespace interface7 {
namespace internal {
class task_arena_base;
class delegated_task;
class wait_task;
}}
namespace internal {
using namespace interface7::internal;
class arena;
template<typename SchedulerTraits> class custom_scheduler;
class generic_scheduler;
class governor;
class mail_outbox;
class market;
class observer_proxy;
class task_scheduler_observer_v3;
#if __TBB_TASK_PRIORITY
static const intptr_t num_priority_levels = 3;
static const intptr_t normalized_normal_priority = (num_priority_levels - 1) / 2;
inline intptr_t normalize_priority ( priority_t p ) {
return intptr_t(p - priority_low) / priority_stride_v4;
}
static const priority_t priority_from_normalized_rep[num_priority_levels] = {
priority_low, priority_normal, priority_high
};
inline void assert_priority_valid ( intptr_t p ) {
__TBB_ASSERT_EX( p >= 0 && p < num_priority_levels, NULL );
}
inline intptr_t& priority ( task& t ) {
return t.prefix().context->my_priority;
}
#else /* __TBB_TASK_PRIORITY */
static const intptr_t num_priority_levels = 1;
#endif /* __TBB_TASK_PRIORITY */
typedef __TBB_SCHEDULER_MUTEX_TYPE scheduler_mutex_type;
#if __TBB_TASK_GROUP_CONTEXT
extern uintptr_t the_context_state_propagation_epoch;
typedef scheduler_mutex_type context_state_propagation_mutex_type;
extern context_state_propagation_mutex_type the_context_state_propagation_mutex;
#endif /* __TBB_TASK_GROUP_CONTEXT */
const size_t task_alignment = 32;
const size_t task_prefix_reservation_size = ((sizeof(internal::task_prefix)-1)/task_alignment+1)*task_alignment;
enum task_extra_state {
es_version_1_task = 0,
es_version_3_task = 1,
#if __TBB_PREVIEW_CRITICAL_TASKS
es_task_critical = 0x8,
#endif
es_task_enqueued = 0x10,
es_task_proxy = 0x20,
es_ref_count_active = 0x40,
es_task_is_stolen = 0x80
};
inline void reset_extra_state ( task *t ) {
t->prefix().extra_state &= ~(es_task_is_stolen | es_task_enqueued);
}
enum free_task_hint {
no_hint=0,
local_task=1,
small_task=2,
small_local_task=3,
no_cache = 4,
no_cache_small_task = no_cache | small_task
};
//------------------------------------------------------------------------
// Debugging support
//------------------------------------------------------------------------
#if TBB_USE_ASSERT
static const uintptr_t venom = tbb::internal::select_size_t_constant<0xDEADBEEFU,0xDDEEAADDDEADBEEFULL>::value;
template <typename T>
void poison_value ( T& val ) { val = * punned_cast<T*>(&venom); }
inline bool is_alive( uintptr_t v ) { return v != venom; }
inline void assert_task_valid( const task* task ) {
__TBB_ASSERT( task!=NULL, NULL );
__TBB_ASSERT( !is_poisoned(&task), NULL );
__TBB_ASSERT( (uintptr_t)task % task_alignment == 0, "misaligned task" );
__TBB_ASSERT( task->prefix().ref_count >= 0, NULL);
#if __TBB_RECYCLE_TO_ENQUEUE
__TBB_ASSERT( (unsigned)task->state()<=(unsigned)task::to_enqueue, "corrupt task (invalid state)" );
#else
__TBB_ASSERT( (unsigned)task->state()<=(unsigned)task::recycle, "corrupt task (invalid state)" );
#endif
}
#else /* !TBB_USE_ASSERT */
#define poison_value(g) ((void)0)
inline void assert_task_valid( const task* ) {}
#endif /* !TBB_USE_ASSERT */
//------------------------------------------------------------------------
// Helpers
//------------------------------------------------------------------------
#if __TBB_TASK_GROUP_CONTEXT
inline bool ConcurrentWaitsEnabled ( task& t ) {
return (t.prefix().context->my_version_and_traits & task_group_context::concurrent_wait) != 0;
}
inline bool CancellationInfoPresent ( task& t ) {
return t.prefix().context->my_cancellation_requested != 0;
}
#if TBB_USE_CAPTURED_EXCEPTION
inline tbb_exception* TbbCurrentException( task_group_context*, tbb_exception* src) { return src->move(); }
inline tbb_exception* TbbCurrentException( task_group_context* c, captured_exception* src) {
if( c->my_version_and_traits & task_group_context::exact_exception )
runtime_warning( "Exact exception propagation is requested by application but the linked library is built without support for it");
return src;
}
#define TbbRethrowException(TbbCapturedException) (TbbCapturedException)->throw_self()
#else
// Using macro instead of an inline function here allows to avoid evaluation of the
// TbbCapturedException expression when exact propagation is enabled for the context.
#define TbbCurrentException(context, TbbCapturedException) \
context->my_version_and_traits & task_group_context::exact_exception \
? tbb_exception_ptr::allocate() \
: tbb_exception_ptr::allocate( *(TbbCapturedException) );
#define TbbRethrowException(TbbCapturedException) \
{ \
if( governor::rethrow_exception_broken() ) fix_broken_rethrow(); \
(TbbCapturedException)->throw_self(); \
}
#endif /* !TBB_USE_CAPTURED_EXCEPTION */
#define TbbRegisterCurrentException(context, TbbCapturedException) \
if ( context->cancel_group_execution() ) { \
/* We are the first to signal cancellation, so store the exception that caused it. */ \
context->my_exception = TbbCurrentException( context, TbbCapturedException ); \
}
#define TbbCatchAll(context) \
catch ( tbb_exception& exc ) { \
TbbRegisterCurrentException( context, &exc ); \
} catch ( std::exception& exc ) { \
TbbRegisterCurrentException( context, captured_exception::allocate(typeid(exc).name(), exc.what()) ); \
} catch ( ... ) { \
TbbRegisterCurrentException( context, captured_exception::allocate("...", "Unidentified exception") );\
}
#else /* !__TBB_TASK_GROUP_CONTEXT */
inline bool ConcurrentWaitsEnabled ( task& t ) { return false; }
#endif /* __TBB_TASK_GROUP_CONTEXT */
inline void prolonged_pause() {
#if defined(__TBB_time_stamp) && !__TBB_STEALING_PAUSE
// Assumption based on practice: 1000-2000 ticks seems to be a suitable invariant for the
// majority of platforms. Currently, skip platforms that define __TBB_STEALING_PAUSE
// because these platforms require very careful tuning.
machine_tsc_t prev = __TBB_time_stamp();
const machine_tsc_t finish = prev + 1000;
atomic_backoff backoff;
do {
backoff.bounded_pause();
machine_tsc_t curr = __TBB_time_stamp();
if ( curr <= prev )
// Possibly, the current logical thread is moved to another hardware thread or overflow is occurred.
break;
prev = curr;
} while ( prev < finish );
#else
#ifdef __TBB_STEALING_PAUSE
static const long PauseTime = __TBB_STEALING_PAUSE;
#elif __TBB_ipf
static const long PauseTime = 1500;
#else
static const long PauseTime = 80;
#endif
// TODO IDEA: Update PauseTime adaptively?
__TBB_Pause(PauseTime);
#endif
}
//------------------------------------------------------------------------
// arena_slot
//------------------------------------------------------------------------
struct arena_slot_line1 {
//TODO: make this tbb:atomic<>.
generic_scheduler* my_scheduler;
// Synchronization of access to Task pool
task* *__TBB_atomic task_pool;
__TBB_atomic size_t head;
#if __TBB_PREVIEW_RESUMABLE_TASKS
tbb::atomic<bool>* my_scheduler_is_recalled;
#endif
};
struct arena_slot_line2 {
unsigned hint_for_pop;
#if __TBB_PREVIEW_CRITICAL_TASKS
unsigned hint_for_critical;
#endif
__TBB_atomic size_t tail;
size_t my_task_pool_size;
task* *__TBB_atomic task_pool_ptr;
#if __TBB_STATISTICS
statistics_counters *my_counters;
#endif /* __TBB_STATISTICS */
};
struct arena_slot : padded<arena_slot_line1>, padded<arena_slot_line2> {
#if TBB_USE_ASSERT
void fill_with_canary_pattern ( size_t first, size_t last ) {
for ( size_t i = first; i < last; ++i )
poison_pointer(task_pool_ptr[i]);
}
#else
void fill_with_canary_pattern ( size_t, size_t ) {}
#endif /* TBB_USE_ASSERT */
void allocate_task_pool( size_t n ) {
size_t byte_size = ((n * sizeof(task*) + NFS_MaxLineSize - 1) / NFS_MaxLineSize) * NFS_MaxLineSize;
my_task_pool_size = byte_size / sizeof(task*);
task_pool_ptr = (task**)NFS_Allocate( 1, byte_size, NULL );
// No need to clear the fresh deque since valid items are designated by the head and tail members.
// But fill it with a canary pattern in the high vigilance debug mode.
fill_with_canary_pattern( 0, my_task_pool_size );
}
void free_task_pool( ) {
// TODO: understand the assertion and modify
// __TBB_ASSERT( !task_pool /*TODO: == EmptyTaskPool*/, NULL);
if( task_pool_ptr ) {
__TBB_ASSERT( my_task_pool_size, NULL);
NFS_Free( task_pool_ptr );
task_pool_ptr = NULL;
my_task_pool_size = 0;
}
}
};
#if !__TBB_CPU_CTL_ENV_PRESENT
class cpu_ctl_env {
fenv_t *my_fenv_ptr;
public:
cpu_ctl_env() : my_fenv_ptr(NULL) {}
~cpu_ctl_env() {
if ( my_fenv_ptr )
tbb::internal::NFS_Free( (void*)my_fenv_ptr );
}
// It is possible not to copy memory but just to copy pointers but the following issues should be addressed:
// 1. The arena lifetime and the context lifetime are independent;
// 2. The user is allowed to recapture different FPU settings to context so 'current FPU settings' inside
// dispatch loop may become invalid.
// But do we really want to improve the fenv implementation? It seems to be better to replace the fenv implementation
// with a platform specific implementation.
cpu_ctl_env( const cpu_ctl_env &src ) : my_fenv_ptr(NULL) {
*this = src;
}
cpu_ctl_env& operator=( const cpu_ctl_env &src ) {
__TBB_ASSERT( src.my_fenv_ptr, NULL );
if ( !my_fenv_ptr )
my_fenv_ptr = (fenv_t*)tbb::internal::NFS_Allocate(1, sizeof(fenv_t), NULL);
*my_fenv_ptr = *src.my_fenv_ptr;
return *this;
}
bool operator!=( const cpu_ctl_env &ctl ) const {
__TBB_ASSERT( my_fenv_ptr, "cpu_ctl_env is not initialized." );
__TBB_ASSERT( ctl.my_fenv_ptr, "cpu_ctl_env is not initialized." );
return memcmp( (void*)my_fenv_ptr, (void*)ctl.my_fenv_ptr, sizeof(fenv_t) );
}
void get_env () {
if ( !my_fenv_ptr )
my_fenv_ptr = (fenv_t*)tbb::internal::NFS_Allocate(1, sizeof(fenv_t), NULL);
fegetenv( my_fenv_ptr );
}
const cpu_ctl_env& set_env () const {
__TBB_ASSERT( my_fenv_ptr, "cpu_ctl_env is not initialized." );
fesetenv( my_fenv_ptr );
return *this;
}
};
#endif /* !__TBB_CPU_CTL_ENV_PRESENT */
} // namespace internal
} // namespace tbb
#endif /* _TBB_scheduler_common_H */
cache_aligned_allocator.h
__TBB_time_stamp
#define __TBB_time_stamp()
Definition: gcc_ia32_common.h:63
__TBB_STEALING_PAUSE
#define __TBB_STEALING_PAUSE
Definition: mic_common.h:40
spin_mutex.h
task.h
tbb_exception.h
tbb_machine.h
__TBB_Pause
void __TBB_Pause(int32_t)
Definition: tbb_machine.h:334
__TBB_atomic
#define __TBB_atomic
Definition: tbb_stddef.h:237
__TBB_ASSERT_EX
#define __TBB_ASSERT_EX(predicate, comment)
"Extended" version is useful to suppress warnings if a variable is only used with an assert
Definition: tbb_stddef.h:167
__TBB_ASSERT
#define __TBB_ASSERT(predicate, comment)
No-op version of __TBB_ASSERT.
Definition: tbb_stddef.h:165
__TBB_SCHEDULER_MUTEX_TYPE
#define __TBB_SCHEDULER_MUTEX_TYPE
Definition: scheduler_common.h:47
poison_value
#define poison_value(g)
Definition: scheduler_common.h:235
tbb_statistics.h
task
void const char const char int ITT_FORMAT __itt_group_sync x void const char ITT_FORMAT __itt_group_sync s void ITT_FORMAT __itt_group_sync p void ITT_FORMAT p void ITT_FORMAT p no args __itt_suppress_mode_t unsigned int void size_t ITT_FORMAT d void ITT_FORMAT p void ITT_FORMAT p __itt_model_site __itt_model_site_instance ITT_FORMAT p __itt_model_task * task
Definition: ittnotify_static.h:119
p
void const char const char int ITT_FORMAT __itt_group_sync p
Definition: ittnotify_static.h:91
tbb::internal::NFS_Allocate
void *__TBB_EXPORTED_FUNC NFS_Allocate(size_t n_element, size_t element_size, void *hint)
Allocate memory on cache/sector line boundary.
Definition: cache_aligned_allocator.cpp:176
tbb::internal::NFS_MaxLineSize
const size_t NFS_MaxLineSize
Compile-time constant that is upper bound on cache line/sector size.
Definition: tbb_stddef.h:216
tbb::internal::NFS_Free
void __TBB_EXPORTED_FUNC NFS_Free(void *)
Free memory allocated by NFS_Allocate.
Definition: cache_aligned_allocator.cpp:198
tbb
The graph class.
Definition: serial/tbb/parallel_for.h:46
tbb::priority_t
priority_t
Definition: task.h:317
tbb::priority_normal
@ priority_normal
Definition: task.h:318
tbb::priority_high
@ priority_high
Definition: task.h:320
tbb::priority_low
@ priority_low
Definition: task.h:319
tbb::internal::task_prefix_reservation_size
const size_t task_prefix_reservation_size
Number of bytes reserved for a task prefix.
Definition: scheduler_common.h:159
tbb::internal::prolonged_pause
void prolonged_pause()
Definition: scheduler_common.h:297
tbb::internal::runtime_warning
void __TBB_EXPORTED_FUNC runtime_warning(const char *format,...)
Report a runtime warning.
Definition: tbb_assert_impl.h:85
tbb::internal::assert_task_valid
void assert_task_valid(const task *)
Definition: scheduler_common.h:237
tbb::internal::priority_stride_v4
static const int priority_stride_v4
Definition: task.h:310
tbb::internal::poison_pointer
void poison_pointer(T *__TBB_atomic &)
Definition: tbb_stddef.h:305
tbb::internal::task_extra_state
task_extra_state
Definitions for bits in task_prefix::extra_state.
Definition: scheduler_common.h:162
tbb::internal::es_version_1_task
@ es_version_1_task
Tag for v1 tasks (i.e. tasks in TBB 1.0 and 2.0)
Definition: scheduler_common.h:164
tbb::internal::es_task_enqueued
@ es_task_enqueued
Tag for enqueued tasks.
Definition: scheduler_common.h:172
tbb::internal::es_task_proxy
@ es_task_proxy
Tag for v3 task_proxy.
Definition: scheduler_common.h:174
tbb::internal::es_ref_count_active
@ es_ref_count_active
Set if ref_count might be changed by another thread. Used for debugging.
Definition: scheduler_common.h:176
tbb::internal::es_task_is_stolen
@ es_task_is_stolen
Set if the task has been stolen.
Definition: scheduler_common.h:178
tbb::internal::es_version_3_task
@ es_version_3_task
Tag for v3 tasks (i.e. tasks in TBB 2.1-2.2)
Definition: scheduler_common.h:166
tbb::internal::scheduler_mutex_type
__TBB_SCHEDULER_MUTEX_TYPE scheduler_mutex_type
Mutex type for global locks in the scheduler.
Definition: scheduler_common.h:133
tbb::internal::task_alignment
const size_t task_alignment
Alignment for a task object.
Definition: scheduler_common.h:155
tbb::internal::reset_extra_state
void reset_extra_state(task *t)
Definition: scheduler_common.h:181
tbb::internal::ConcurrentWaitsEnabled
bool ConcurrentWaitsEnabled(task &t)
Definition: scheduler_common.h:293
tbb::internal::last
auto last(Container &c) -> decltype(begin(c))
Definition: _range_iterator.h:40
tbb::internal::first
auto first(Container &c) -> decltype(begin(c))
Definition: _range_iterator.h:34
tbb::internal::num_priority_levels
static const intptr_t num_priority_levels
Definition: scheduler_common.h:129
tbb::internal::free_task_hint
free_task_hint
Optimization hint to free_task that enables it omit unnecessary tests and code.
Definition: scheduler_common.h:186
tbb::internal::no_cache
@ no_cache
Disable caching for a small task.
Definition: scheduler_common.h:198
tbb::internal::no_hint
@ no_hint
No hint.
Definition: scheduler_common.h:188
tbb::internal::small_task
@ small_task
Task is known to be a small task.
Definition: scheduler_common.h:193
tbb::internal::no_cache_small_task
@ no_cache_small_task
Task is known to be a small task and must not be cached.
Definition: scheduler_common.h:200
tbb::internal::local_task
@ local_task
Task is known to have been allocated by this scheduler.
Definition: scheduler_common.h:190
tbb::internal::small_local_task
@ small_local_task
Bitwise-OR of local_task and small_task.
Definition: scheduler_common.h:196
tbb::internal::machine_tsc_t
uint64_t machine_tsc_t
Definition: gcc_ia32_common.h:53
internal
Definition: _flow_graph_async_msg_impl.h:24
tbb::internal::cpu_ctl_env
Definition: gcc_ia32_common.h:70
tbb::internal::cpu_ctl_env::cpu_ctl_env
cpu_ctl_env(const cpu_ctl_env &src)
Definition: scheduler_common.h:424
tbb::internal::cpu_ctl_env::operator=
cpu_ctl_env & operator=(const cpu_ctl_env &src)
Definition: scheduler_common.h:427
tbb::internal::cpu_ctl_env::cpu_ctl_env
cpu_ctl_env()
Definition: scheduler_common.h:413
tbb::internal::cpu_ctl_env::set_env
const cpu_ctl_env & set_env() const
Definition: scheduler_common.h:444
tbb::internal::cpu_ctl_env::my_fenv_ptr
fenv_t * my_fenv_ptr
Definition: scheduler_common.h:411
tbb::internal::cpu_ctl_env::get_env
void get_env()
Definition: scheduler_common.h:439
tbb::internal::cpu_ctl_env::~cpu_ctl_env
~cpu_ctl_env()
Definition: scheduler_common.h:414
tbb::internal::cpu_ctl_env::operator!=
bool operator!=(const cpu_ctl_env &ctl) const
Definition: scheduler_common.h:434
tbb::internal::task_prefix
Memory prefix to a task object.
Definition: task.h:203
tbb::internal::task_prefix::extra_state
unsigned char extra_state
Miscellaneous state that is not directly visible to users, stored as a byte for compactness.
Definition: task.h:292
tbb::internal::task_prefix::context
task_group_context * context
Shared context that is used to communicate asynchronous state changes.
Definition: task.h:230
tbb::task_group_context::exact_exception
@ exact_exception
Definition: task.h:383
tbb::task_group_context::concurrent_wait
@ concurrent_wait
Definition: task.h:387
tbb::task_group_context::my_version_and_traits
uintptr_t my_version_and_traits
Version for run-time checks and behavioral traits of the context.
Definition: task.h:446
tbb::task
Base class for user-defined tasks.
Definition: task.h:615
tbb::task::recycle
@ recycle
task to be recycled as continuation
Definition: task.h:647
tbb::task::prefix
internal::task_prefix & prefix(internal::version_tag *=NULL) const
Get reference to corresponding task_prefix.
Definition: task.h:1002
tbb::internal::atomic_backoff
Class that implements exponential backoff.
Definition: tbb_machine.h:348
tbb::internal::atomic_backoff::bounded_pause
bool bounded_pause()
Pause for a few times and return false if saturated.
Definition: tbb_machine.h:375
tbb::internal::padded
Pads type T to fill out to a multiple of cache line size.
Definition: tbb_stddef.h:261
tbb::internal::select_size_t_constant
A template to select either 32-bit or 64-bit constant as compile time, depending on machine word size...
Definition: tbb_stddef.h:494
tbb::internal::generic_scheduler
Work stealing task scheduler.
Definition: scheduler.h:140
tbb::internal::arena_slot_line1
Definition: scheduler_common.h:329
tbb::internal::arena_slot_line1::head
__TBB_atomic size_t head
Index of the first ready task in the deque.
Definition: scheduler_common.h:343
tbb::internal::arena_slot_line1::task_pool
task **__TBB_atomic task_pool
Definition: scheduler_common.h:339
tbb::internal::arena_slot_line1::my_scheduler
generic_scheduler * my_scheduler
Scheduler of the thread attached to the slot.
Definition: scheduler_common.h:333
tbb::internal::arena_slot_line2
Definition: scheduler_common.h:351
tbb::internal::arena_slot_line2::my_task_pool_size
size_t my_task_pool_size
Capacity of the primary task pool (number of elements - pointers to task).
Definition: scheduler_common.h:366
tbb::internal::arena_slot_line2::hint_for_pop
unsigned hint_for_pop
Hint provided for operations with the container of starvation-resistant tasks.
Definition: scheduler_common.h:354
tbb::internal::arena_slot_line2::task_pool_ptr
task **__TBB_atomic task_pool_ptr
Task pool of the scheduler that owns this slot.
Definition: scheduler_common.h:369
tbb::internal::arena_slot_line2::tail
__TBB_atomic size_t tail
Index of the element following the last ready task in the deque.
Definition: scheduler_common.h:363
tbb::internal::arena_slot
Definition: scheduler_common.h:377
tbb::internal::arena_slot::allocate_task_pool
void allocate_task_pool(size_t n)
Definition: scheduler_common.h:387
tbb::internal::arena_slot::fill_with_canary_pattern
void fill_with_canary_pattern(size_t, size_t)
Definition: scheduler_common.h:384
tbb::internal::arena_slot::free_task_pool
void free_task_pool()
Deallocate task pool that was allocated by means of allocate_task_pool.
Definition: scheduler_common.h:397

Copyright © 2005-2020 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its subsidiaries in the United States and other countries.

* Other names and brands may be claimed as the property of others.