Intel(R) Threading Building Blocks Doxygen Documentation
version 4.2.3
|
Go to the documentation of this file.
17 #ifndef _TBB_mailbox_H
18 #define _TBB_mailbox_H
56 template<
intptr_t from_bit>
61 "Proxy's tag cannot specify both locations if the proxy "
62 "was retrieved from one of its original locations" );
63 if ( tat != from_bit ) {
107 #if __TBB_TASK_ISOLATION
T __TBB_load_with_acquire(const volatile T &location)
void pause()
Pause for a while.
void construct()
Construct *this as a mailbox from zeroed memory.
#define __TBB_ISOLATION_EXPR(isolation)
#define __TBB_ASSERT(predicate, comment)
No-op version of __TBB_ASSERT.
Internal representation of mail_outbox, without padding.
proxy_ptr my_first
Pointer to first task_proxy in mailbox, or NULL if box is empty.
Class that implements exponential backoff.
bool my_is_idle
Owner of mailbox is not executing a task, and has drained its own task pool.
Class representing source of mail.
@ es_task_proxy
Tag for v3 task_proxy.
task_proxy * pop(__TBB_ISOLATION_EXPR(isolation_tag isolation))
Get next piece of mail, or NULL if mailbox is empty.
static bool is_shared(intptr_t tat)
True if the proxy is stored both in its sender's pool and in the destination mailbox.
bool push(task_proxy *t)
Push task_proxy onto the mailbox queue of another thread.
void set_is_idle(bool value)
Indicate whether thread that reads this mailbox is idle.
proxy_ptr *__TBB_atomic my_last
Pointer to pointer that will point to next item in the queue. Never NULL.
internal::task_prefix & prefix(internal::version_tag *=NULL) const
Get reference to corresponding task_prefix.
task_proxy *__TBB_atomic proxy_ptr
void __TBB_store_relaxed(volatile T &location, V value)
tbb::atomic< int > my_task_count
Approximate number of tasks in mailbox to prevent an unlimited grow when the owner is not available.
void attach(mail_outbox &putter)
Attach inbox to a corresponding outbox.
bool recipient_is_idle()
True if thread that owns this mailbox is looking for work.
Base class for user-defined tasks.
bool empty()
Return true if mailbox is empty.
const isolation_tag no_isolation
static task * task_ptr(intptr_t tat)
Returns a pointer to the encapsulated task or NULL.
Pads type T to fill out to a multiple of cache line size.
const size_t NFS_MaxLineSize
Compile-time constant that is upper bound on cache line/sector size.
#define __TBB_control_consistency_helper()
mail_inbox()
Construct unattached inbox.
task * extract_task()
Returns a pointer to the encapsulated task or NULL, and frees proxy if necessary.
intptr_t isolation_tag
A tag for task isolation.
mail_outbox * outbox
Mailbox to which this was mailed.
void suppress_unused_warning(const T1 &)
Utility template function to prevent "unused" warnings by various compilers.
void detach()
Detach inbox from its outbox.
bool is_idle_state(bool value) const
Indicate whether thread that reads this mailbox is idle.
atomic< T > & as_atomic(T &t)
intptr_t drain()
Drain the mailbox.
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
static const intptr_t pool_bit
Class representing where mail is put.
bool empty()
Return true if mailbox is empty.
task_proxy *__TBB_atomic next_in_mailbox
Pointer to next task_proxy in a mailbox.
void __TBB_EXPORTED_FUNC NFS_Free(void *)
Free memory allocated by NFS_Allocate.
mail_outbox * my_putter
Corresponding sink where mail that we receive will be put.
task_proxy * internal_pop(__TBB_ISOLATION_EXPR(isolation_tag isolation))
static const intptr_t mailbox_bit
static const intptr_t location_mask
static const int mailbox_task_limit
const size_t task_prefix_reservation_size
Number of bytes reserved for a task prefix.
T __TBB_load_relaxed(const volatile T &location)
isolation_tag isolation
The tag used for task isolation.
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.