Intel(R) Threading Building Blocks Doxygen Documentation  version 4.2.3
tbb::internal::allocate_additional_child_of_proxy Class Reference

#include <task.h>

Inheritance diagram for tbb::internal::allocate_additional_child_of_proxy:
Collaboration diagram for tbb::internal::allocate_additional_child_of_proxy:

Public Member Functions

 allocate_additional_child_of_proxy (task &parent_)
 
task &__TBB_EXPORTED_METHOD allocate (size_t size) const
 
void __TBB_EXPORTED_METHOD free (task &) const
 

Private Attributes

taskself
 No longer used, but retained for binary layout compatibility. Always NULL. More...
 
taskparent
 

Detailed Description

Definition at line 47 of file task.h.

Constructor & Destructor Documentation

◆ allocate_additional_child_of_proxy()

tbb::internal::allocate_additional_child_of_proxy::allocate_additional_child_of_proxy ( task parent_)
inlineexplicit

Definition at line 52 of file task.h.

52  : self(NULL), parent(parent_) {
54  }
void suppress_unused_warning(const T1 &)
Utility template function to prevent "unused" warnings by various compilers.
Definition: tbb_stddef.h:381

References tbb::internal::suppress_unused_warning().

Here is the call graph for this function:

Member Function Documentation

◆ allocate()

task & tbb::internal::allocate_additional_child_of_proxy::allocate ( size_t  size) const

Definition at line 132 of file task.cpp.

132  {
135  return s->allocate_task( size, __TBB_CONTEXT_ARG(&parent, parent.prefix().context) );
136 }
#define __TBB_CONTEXT_ARG(arg1, context)
Work stealing task scheduler.
Definition: scheduler.h:124
void increment_ref_count()
Atomically increment reference count.
Definition: task.h:744
void const char const char int ITT_FORMAT __itt_group_sync s
static generic_scheduler * local_scheduler_weak()
Definition: governor.h:131
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 size
internal::task_prefix & prefix(internal::version_tag *=NULL) const
Get reference to corresponding task_prefix.
Definition: task.h:941

References __TBB_CONTEXT_ARG, tbb::task::increment_ref_count(), tbb::internal::governor::local_scheduler_weak(), parent, tbb::task::prefix(), s, and size.

Here is the call graph for this function:

◆ free()

void tbb::internal::allocate_additional_child_of_proxy::free ( task task) const

Definition at line 138 of file task.cpp.

138  {
139  // Undo the increment. We do not check the result of the fetch-and-decrement.
140  // We could consider be spawning the task if the fetch-and-decrement returns 1.
141  // But we do not know that was the programmer's intention.
142  // Furthermore, if it was the programmer's intention, the program has a fundamental
143  // race condition (that we warn about in Reference manual), because the
144  // reference count might have become zero before the corresponding call to
145  // allocate_additional_child_of_proxy::allocate.
148 }
Task is known to have been allocated by this scheduler.
internal::reference_count __TBB_EXPORTED_METHOD internal_decrement_ref_count()
Decrement reference count and return its new value.
Definition: task.cpp:196
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
static generic_scheduler * local_scheduler_weak()
Definition: governor.h:131
void free_task(task &t)
Put task on free list.
Definition: scheduler.h:652

References tbb::internal::generic_scheduler::free_task(), tbb::task::internal_decrement_ref_count(), tbb::internal::governor::local_scheduler_weak(), tbb::internal::local_task, parent, and task.

Here is the call graph for this function:

Member Data Documentation

◆ parent

task& tbb::internal::allocate_additional_child_of_proxy::parent
private

Definition at line 50 of file task.h.

Referenced by allocate(), and free().

◆ self

task* tbb::internal::allocate_additional_child_of_proxy::self
private

No longer used, but retained for binary layout compatibility. Always NULL.

Definition at line 49 of file task.h.


The documentation for this class was generated from the following files:

Copyright © 2005-2019 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.