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