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