Intel(R) Threading Building Blocks Doxygen Documentation
version 4.2.3
|
Go to the documentation of this file.
19 #if !defined(__TBB_show_deprecation_message_tbb_thread_H) && defined(__TBB_show_deprecated_header_message)
20 #define __TBB_show_deprecation_message_tbb_thread_H
21 #pragma message("TBB Warning: tbb/tbb_thread.h is deprecated. For details, please see Deprecated Features appendix in the TBB reference manual.")
24 #if defined(__TBB_show_deprecated_header_message)
25 #undef __TBB_show_deprecated_header_message
28 #ifndef __TBB_tbb_thread_H
29 #define __TBB_tbb_thread_H
31 #define __TBB_tbb_thread_H_include_area
38 #define __TBB_NATIVE_THREAD_ROUTINE unsigned WINAPI
39 #define __TBB_NATIVE_THREAD_ROUTINE_PTR(r) unsigned (WINAPI* r)( void* )
41 #if __TBB_WIN8UI_SUPPORT
43 #else // __TBB_WIN8UI_SUPPORT
45 #endif // __TBB_WIN8UI_SUPPORT
48 #define __TBB_NATIVE_THREAD_ROUTINE void*
49 #define __TBB_NATIVE_THREAD_ROUTINE_PTR(r) void* (*r)( void* )
54 #endif // _WIN32||_WIN64
60 #include __TBB_STD_SWAP_HEADER
69 inline void swap( internal::tbb_thread_v3& t1, internal::tbb_thread_v3& t2 )
__TBB_NOEXCEPT(
true);
114 self->
function(self->arg1, self->arg2);
123 #if __TBB_IF_NO_COPY_CTOR_MOVE_SEMANTICS_BROKEN
135 #endif // _WIN32||_WIN64
142 #endif // _WIN32||_WIN64
153 internal_start(closure_type::start_routine,
new closure_type(f,x));
158 internal_start(closure_type::start_routine,
new closure_type(f,x,y));
161 #if __TBB_CPP11_RVALUE_REF_PRESENT
165 , my_thread_id(x.my_thread_id)
177 #else // __TBB_CPP11_RVALUE_REF_PRESENT
182 #endif // __TBB_CPP11_RVALUE_REF_PRESENT
209 #endif // _WIN32||_WIN64
221 my_thread_id = x.my_thread_id;
222 #endif // _WIN32||_WIN64
248 template<
class charT,
class traits>
249 friend std::basic_ostream<charT, traits>&
259 __TBB_STATIC_ASSERT(
sizeof(
id.
my_id) <=
sizeof(
size_t),
"Implementation assumes that thread_id_type fits into machine word");
260 return tbb::tbb_hasher(
id.
my_id);
271 return id(my_thread_id);
274 #endif // _WIN32||_WIN64
284 return x.my_id == y.my_id;
288 return x.my_id != y.my_id;
292 return x.my_id < y.my_id;
296 return x.my_id <= y.my_id;
300 return x.my_id > y.my_id;
304 return x.my_id >= y.my_id;
319 inline
void move( tbb_thread& t1, tbb_thread& t2 ) {
326 std::swap(t1.my_thread_id, t2.my_thread_id);
330 namespace this_tbb_thread {
343 #undef __TBB_tbb_thread_H_include_area
void __TBB_EXPORTED_FUNC thread_sleep_v3(const tick_count::interval_t &i)
friend bool operator!=(tbb_thread_v3::id x, tbb_thread_v3::id y) __TBB_NOEXCEPT(true)
__TBB_DEPRECATED_IN_VERBOSE_MODE void sleep(const tick_count::interval_t &i)
The current thread blocks at least until the time specified.
void __TBB_EXPORTED_METHOD detach()
When detach() returns, *this no longer represents the possibly continuing thread of execution.
friend bool operator>=(tbb_thread_v3::id x, tbb_thread_v3::id y) __TBB_NOEXCEPT(true)
tbb_thread_v3(F f, X x)
Constructs an object and executes f(x) in a new thread.
void *__TBB_EXPORTED_FUNC allocate_closure_v3(size_t size)
Allocate a closure.
static __TBB_NATIVE_THREAD_ROUTINE start_routine(void *c)
thread_closure_1(const F &f, const X &x)
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 id
static __TBB_NATIVE_THREAD_ROUTINE start_routine(void *c)
Routine passed to Windows's _beginthreadex by thread::internal_start() inside tbb....
friend bool operator==(tbb_thread_v3::id x, tbb_thread_v3::id y) __TBB_NOEXCEPT(true)
static unsigned __TBB_EXPORTED_FUNC hardware_concurrency() __TBB_NOEXCEPT(true)
The number of hardware thread contexts.
tbb_thread_v3 & operator=(tbb_thread_v3 &&x) __TBB_NOEXCEPT(true)
void internal_move(tbb_thread_v3 &x) __TBB_NOEXCEPT(true)
friend tbb_thread_v3::id __TBB_EXPORTED_FUNC thread_get_id_v3()
bool operator<(const vector_iterator< Container, T > &i, const vector_iterator< Container, U > &j)
void __TBB_EXPORTED_FUNC free_closure_v3(void *)
Free a closure allocated by allocate_closure_v3.
friend bool operator<=(tbb_thread_v3::id x, tbb_thread_v3::id y) __TBB_NOEXCEPT(true)
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 size
native_handle_type my_handle
friend std::basic_ostream< charT, traits > & operator<<(std::basic_ostream< charT, traits > &out, tbb_thread_v3::id id)
__TBB_DEPRECATED_IN_VERBOSE_MODE void yield()
Offers the operating system the opportunity to schedule another thread.
bool operator==(const vector_iterator< Container, T > &i, const vector_iterator< Container, U > &j)
bool operator>=(const vector_iterator< Container, T > &i, const vector_iterator< Container, U > &j)
id get_id() const __TBB_NOEXCEPT(true)
bool operator!=(const vector_iterator< Container, T > &i, const vector_iterator< Container, U > &j)
Structure used to pass user function with 1 argument to thread.
friend id atomic_compare_and_swap(id &location, const id &value, const id &comparand)
thread_closure_2(const F &f, const X &x, const Y &y)
tbb_thread_v3(tbb_thread_v3 &&x) __TBB_NOEXCEPT(true)
native_handle_type native_handle()
void swap(tbb_thread_v3 &t) __TBB_NOEXCEPT(true)
#define __TBB_STATIC_ASSERT(condition, msg)
friend bool operator>(tbb_thread_v3::id x, tbb_thread_v3::id y) __TBB_NOEXCEPT(true)
void move(tbb_thread &t1, tbb_thread &t2)
class __TBB_DEPRECATED_IN_VERBOSE_MODE_MSG("tbb::aligned_space is deprecated, use std::aligned_storage") aligned_space
Block of space aligned sufficiently to construct an array T with N elements.
#define __TBB_NATIVE_THREAD_ROUTINE
__TBB_DEPRECATED_IN_VERBOSE_MODE tbb_thread::id get_id()
void __TBB_EXPORTED_FUNC thread_yield_v3()
friend bool operator<(tbb_thread_v3::id x, tbb_thread_v3::id y) __TBB_NOEXCEPT(true)
id() __TBB_NOEXCEPT(true)
void swap(internal::tbb_thread_v3 &t1, internal::tbb_thread_v3 &t2) __TBB_NOEXCEPT(true)
#define __TBB_EXPORTED_FUNC
bool joinable() const __TBB_NOEXCEPT(true)
tbb_thread_v3::id __TBB_EXPORTED_FUNC thread_get_id_v3()
void __TBB_EXPORTED_METHOD internal_start(__TBB_NATIVE_THREAD_ROUTINE_PTR(start_routine), void *closure)
bool operator<=(const vector_iterator< Container, T > &i, const vector_iterator< Container, U > &j)
void __TBB_EXPORTED_METHOD join()
The completion of the thread represented by *this happens before join() returns.
atomic< T > & as_atomic(T &t)
#define __TBB_NOEXCEPT(expression)
friend size_t tbb_hasher(const tbb_thread_v3::id &id)
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
void internal_wipe() __TBB_NOEXCEPT(true)
friend void __TBB_EXPORTED_FUNC move_v3(tbb_thread_v3 &t1, tbb_thread_v3 &t2)
#define __TBB_DEPRECATED_IN_VERBOSE_MODE
tbb_thread_v3(F f, X x, Y y)
Constructs an object and executes f(x,y) in a new thread.
#define __TBB_EXPORTED_METHOD
tbb_thread_v3(F f)
Constructs an object and executes f() in a new thread.
static __TBB_NATIVE_THREAD_ROUTINE start_routine(void *c)
Routine passed to Windows's _beginthreadex by thread::internal_start() inside tbb....
void swap(concurrent_hash_map< Key, T, HashCompare, A > &a, concurrent_hash_map< Key, T, HashCompare, A > &b)
void __TBB_EXPORTED_FUNC move_v3(tbb_thread_v3 &t1, tbb_thread_v3 &t2)
#define __TBB_NATIVE_THREAD_ROUTINE_PTR(r)
thread_closure_0(const F &f)
bool operator>(const vector_iterator< Container, T > &i, const vector_iterator< Container, U > &j)
tbb_thread_v3() __TBB_NOEXCEPT(true)
Constructs a thread object that does not represent a thread of execution.
pthread_t native_handle_type
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.