Home ⌂Doc Index ◂Up ▴
Intel(R) Threading Building Blocks Doxygen Documentation  version 4.2.3
tbb::internal::mail_inbox Class Reference

Class representing source of mail. More...

#include <mailbox.h>

Collaboration diagram for tbb::internal::mail_inbox:

Public Member Functions

 mail_inbox ()
 Construct unattached inbox. More...
 
void attach (mail_outbox &putter)
 Attach inbox to a corresponding outbox. More...
 
void detach ()
 Detach inbox from its outbox. More...
 
task_proxypop (__TBB_ISOLATION_EXPR(isolation_tag isolation))
 Get next piece of mail, or NULL if mailbox is empty. More...
 
bool empty ()
 Return true if mailbox is empty. More...
 
void set_is_idle (bool value)
 Indicate whether thread that reads this mailbox is idle. More...
 
bool is_idle_state (bool value) const
 Indicate whether thread that reads this mailbox is idle. More...
 

Private Attributes

mail_outboxmy_putter
 Corresponding sink where mail that we receive will be put. More...
 

Detailed Description

Class representing source of mail.

Definition at line 196 of file mailbox.h.

Constructor & Destructor Documentation

◆ mail_inbox()

tbb::internal::mail_inbox::mail_inbox ( )
inline

Construct unattached inbox.

Definition at line 201 of file mailbox.h.

201 : my_putter(NULL) {}
mail_outbox * my_putter
Corresponding sink where mail that we receive will be put.
Definition: mailbox.h:198

Member Function Documentation

◆ attach()

void tbb::internal::mail_inbox::attach ( mail_outbox putter)
inline

Attach inbox to a corresponding outbox.

Definition at line 204 of file mailbox.h.

204  {
205  my_putter = &putter;
206  }
mail_outbox * my_putter
Corresponding sink where mail that we receive will be put.
Definition: mailbox.h:198

References my_putter.

Referenced by tbb::internal::generic_scheduler::attach_mailbox().

Here is the caller graph for this function:

◆ detach()

void tbb::internal::mail_inbox::detach ( )
inline

Detach inbox from its outbox.

Definition at line 208 of file mailbox.h.

208  {
209  __TBB_ASSERT(my_putter,"not attached");
210  my_putter = NULL;
211  }
#define __TBB_ASSERT(predicate, comment)
No-op version of __TBB_ASSERT.
Definition: tbb_stddef.h:165
mail_outbox * my_putter
Corresponding sink where mail that we receive will be put.
Definition: mailbox.h:198

References __TBB_ASSERT, and my_putter.

◆ empty()

bool tbb::internal::mail_inbox::empty ( )
inline

Return true if mailbox is empty.

Definition at line 217 of file mailbox.h.

217  {
218  return my_putter->empty();
219  }
bool empty()
Return true if mailbox is empty.
Definition: mailbox.h:161
mail_outbox * my_putter
Corresponding sink where mail that we receive will be put.
Definition: mailbox.h:198

References tbb::internal::mail_outbox::empty(), and my_putter.

Here is the call graph for this function:

◆ is_idle_state()

bool tbb::internal::mail_inbox::is_idle_state ( bool  value) const
inline

Indicate whether thread that reads this mailbox is idle.

Definition at line 229 of file mailbox.h.

229  {
230  return !my_putter || my_putter->my_is_idle == value;
231  }
bool my_is_idle
Owner of mailbox is not executing a task, and has drained its own task pool.
Definition: mailbox.h:94
mail_outbox * my_putter
Corresponding sink where mail that we receive will be put.
Definition: mailbox.h:198
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 __itt_model_task_instance ITT_FORMAT p void ITT_FORMAT p void ITT_FORMAT p void size_t ITT_FORMAT d void ITT_FORMAT p const wchar_t ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s no args void ITT_FORMAT p size_t ITT_FORMAT d no args const wchar_t const wchar_t ITT_FORMAT s __itt_heap_function void size_t int ITT_FORMAT d __itt_heap_function void ITT_FORMAT p __itt_heap_function void void size_t int ITT_FORMAT d no args no args unsigned int ITT_FORMAT u const __itt_domain __itt_id ITT_FORMAT lu const __itt_domain __itt_id __itt_id __itt_string_handle ITT_FORMAT p const __itt_domain __itt_id ITT_FORMAT p const __itt_domain __itt_id __itt_timestamp __itt_timestamp ITT_FORMAT lu const __itt_domain __itt_id __itt_id __itt_string_handle ITT_FORMAT p const __itt_domain ITT_FORMAT p const __itt_domain __itt_string_handle unsigned long long value

References tbb::internal::unpadded_mail_outbox::my_is_idle, my_putter, and value.

Referenced by tbb::internal::generic_scheduler::attach_arena().

Here is the caller graph for this function:

◆ pop()

task_proxy* tbb::internal::mail_inbox::pop ( __TBB_ISOLATION_EXPR(isolation_tag isolation)  )
inline

Get next piece of mail, or NULL if mailbox is empty.

Definition at line 213 of file mailbox.h.

213  {
214  return my_putter->internal_pop( __TBB_ISOLATION_EXPR( isolation ) );
215  }
#define __TBB_ISOLATION_EXPR(isolation)
mail_outbox * my_putter
Corresponding sink where mail that we receive will be put.
Definition: mailbox.h:198
task_proxy * internal_pop(__TBB_ISOLATION_EXPR(isolation_tag isolation))
Definition: mailbox.h:102

References __TBB_ISOLATION_EXPR, tbb::internal::mail_outbox::internal_pop(), and my_putter.

Referenced by tbb::internal::generic_scheduler::get_mailbox_task().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_is_idle()

void tbb::internal::mail_inbox::set_is_idle ( bool  value)
inline

Indicate whether thread that reads this mailbox is idle.

Raises assertion failure if mailbox is redundantly marked as not idle.

Definition at line 222 of file mailbox.h.

222  {
223  if( my_putter ) {
224  __TBB_ASSERT( my_putter->my_is_idle || value, "attempt to redundantly mark mailbox as not idle" );
226  }
227  }
bool my_is_idle
Owner of mailbox is not executing a task, and has drained its own task pool.
Definition: mailbox.h:94
#define __TBB_ASSERT(predicate, comment)
No-op version of __TBB_ASSERT.
Definition: tbb_stddef.h:165
mail_outbox * my_putter
Corresponding sink where mail that we receive will be put.
Definition: mailbox.h:198
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 __itt_model_task_instance ITT_FORMAT p void ITT_FORMAT p void ITT_FORMAT p void size_t ITT_FORMAT d void ITT_FORMAT p const wchar_t ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s no args void ITT_FORMAT p size_t ITT_FORMAT d no args const wchar_t const wchar_t ITT_FORMAT s __itt_heap_function void size_t int ITT_FORMAT d __itt_heap_function void ITT_FORMAT p __itt_heap_function void void size_t int ITT_FORMAT d no args no args unsigned int ITT_FORMAT u const __itt_domain __itt_id ITT_FORMAT lu const __itt_domain __itt_id __itt_id __itt_string_handle ITT_FORMAT p const __itt_domain __itt_id ITT_FORMAT p const __itt_domain __itt_id __itt_timestamp __itt_timestamp ITT_FORMAT lu const __itt_domain __itt_id __itt_id __itt_string_handle ITT_FORMAT p const __itt_domain ITT_FORMAT p const __itt_domain __itt_string_handle unsigned long long value

References __TBB_ASSERT, tbb::internal::unpadded_mail_outbox::my_is_idle, my_putter, and value.

Referenced by tbb::internal::generic_scheduler::attach_arena().

Here is the caller graph for this function:

Member Data Documentation

◆ my_putter

mail_outbox* tbb::internal::mail_inbox::my_putter
private

Corresponding sink where mail that we receive will be put.

Definition at line 198 of file mailbox.h.

Referenced by attach(), detach(), empty(), is_idle_state(), pop(), and set_is_idle().


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

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.