#include <critical_section.h>
Definition at line 50 of file critical_section.h.
◆ critical_section_v4()
tbb::internal::critical_section_v4::critical_section_v4 |
( |
| ) |
|
|
inline |
◆ ~critical_section_v4()
tbb::internal::critical_section_v4::~critical_section_v4 |
( |
| ) |
|
|
inline |
Definition at line 70 of file critical_section.h.
73 DeleteCriticalSection(&
my_impl);
75 pthread_mutex_destroy(&
my_impl);
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
#define __TBB_ASSERT(predicate, comment)
No-op version of __TBB_ASSERT.
References __TBB_ASSERT, id, my_impl, and my_tid.
◆ internal_construct()
void tbb::internal::critical_section_v4::internal_construct |
( |
| ) |
|
◆ lock()
void tbb::internal::critical_section_v4::lock |
( |
| ) |
|
|
inline |
Definition at line 92 of file critical_section.h.
96 EnterCriticalSection( &
my_impl );
98 int rval = pthread_mutex_lock(&
my_impl);
99 __TBB_ASSERT_EX(!rval,
"critical_section::lock: pthread_mutex_lock failed");
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
__TBB_DEPRECATED_IN_VERBOSE_MODE tbb_thread::id get_id()
#define __TBB_ASSERT_EX(predicate, comment)
"Extended" version is useful to suppress warnings if a variable is only used with an assert
#define __TBB_ASSERT(predicate, comment)
No-op version of __TBB_ASSERT.
void throw_exception(exception_id eid)
Versionless convenience wrapper for throw_exception_v4()
References __TBB_ASSERT, __TBB_ASSERT_EX, tbb::internal::eid_improper_lock, tbb::this_tbb_thread::get_id(), id, my_impl, my_tid, and tbb::internal::throw_exception().
Referenced by tbb::internal::critical_section_v4::scoped_lock::scoped_lock().
◆ try_lock()
bool tbb::internal::critical_section_v4::try_lock |
( |
| ) |
|
|
inline |
Definition at line 105 of file critical_section.h.
108 if(local_tid ==
my_tid)
return false;
110 gotlock = TryEnterCriticalSection( &
my_impl ) != 0;
112 int rval = pthread_mutex_trylock(&
my_impl);
114 __TBB_ASSERT(rval == 0 || rval == EBUSY,
"critical_section::trylock: pthread_mutex_trylock failed");
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
__TBB_DEPRECATED_IN_VERBOSE_MODE tbb_thread::id get_id()
#define __TBB_ASSERT(predicate, comment)
No-op version of __TBB_ASSERT.
References __TBB_ASSERT, tbb::this_tbb_thread::get_id(), id, my_impl, and my_tid.
◆ unlock()
void tbb::internal::critical_section_v4::unlock |
( |
| ) |
|
|
inline |
Definition at line 123 of file critical_section.h.
127 LeaveCriticalSection( &
my_impl );
129 int rval = pthread_mutex_unlock(&
my_impl);
130 __TBB_ASSERT_EX(!rval,
"critical_section::unlock: pthread_mutex_unlock failed");
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
__TBB_DEPRECATED_IN_VERBOSE_MODE tbb_thread::id get_id()
#define __TBB_ASSERT_EX(predicate, comment)
"Extended" version is useful to suppress warnings if a variable is only used with an assert
#define __TBB_ASSERT(predicate, comment)
No-op version of __TBB_ASSERT.
References __TBB_ASSERT, __TBB_ASSERT_EX, tbb::this_tbb_thread::get_id(), id, my_impl, and my_tid.
Referenced by tbb::internal::critical_section_v4::scoped_lock::~scoped_lock().
◆ is_fair_mutex
const bool tbb::internal::critical_section_v4::is_fair_mutex = true |
|
static |
◆ is_recursive_mutex
const bool tbb::internal::critical_section_v4::is_recursive_mutex = false |
|
static |
◆ is_rw_mutex
const bool tbb::internal::critical_section_v4::is_rw_mutex = false |
|
static |
◆ my_impl
pthread_mutex_t tbb::internal::critical_section_v4::my_impl |
|
private |
◆ my_tid
The documentation for this class was generated from the following files: