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_proxy * | pop (__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_outbox * | my_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.

: my_putter(NULL) {}
tbb::internal::mail_inbox::my_putter
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.

{
my_putter = &putter;
}

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.

{
__TBB_ASSERT(my_putter,"not attached");
my_putter = NULL;
}
__TBB_ASSERT
#define __TBB_ASSERT(predicate, comment)
No-op version of __TBB_ASSERT.
Definition: tbb_stddef.h:165

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.

{
return my_putter->empty();
}
tbb::internal::mail_outbox::empty
bool empty()
Return true if mailbox is empty.
Definition: mailbox.h:161

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.

{
return !my_putter || my_putter->my_is_idle == value;
}
value
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
Definition: ittnotify_static.h:192

References 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.

{
return my_putter->internal_pop( __TBB_ISOLATION_EXPR( isolation ) );
}
__TBB_ISOLATION_EXPR
#define __TBB_ISOLATION_EXPR(isolation)
Definition: scheduler_common.h:67
tbb::internal::mail_outbox::internal_pop
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.

{
if( my_putter ) {
__TBB_ASSERT( my_putter->my_is_idle || value, "attempt to redundantly mark mailbox as not idle" );
my_putter->my_is_idle = value;
}
}

References __TBB_ASSERT, 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:

- mailbox.h

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.