tbb::internal::concurrent_monitor::thread_context Class Reference

`#include <concurrent_monitor.h>`

Inheritance diagram for tbb::internal::concurrent_monitor::thread_context:
Collaboration diagram for tbb::internal::concurrent_monitor::thread_context:

## Public Member Functions

| thread_context ()
| ~thread_context ()
binary_semaphore & | semaphore ()

## Private Member Functions

| __TBB_NOINLINE (void init())
| The method for lazy initialization of the thread_context's semaphore. More...
Private Member Functions inherited from tbb::internal::circular_doubly_linked_list_with_sentinel::node_t
| node_t ()
Private Member Functions inherited from tbb::internal::no_copy
| no_copy (const no_copy &)=delete
| no_copy ()=default

## Private Attributes

tbb::aligned_space< binary_semaphore > | sema
__TBB_atomic unsigned | epoch
tbb::atomic< bool > | in_waitset
bool | skipped_wakeup
bool | aborted
bool | ready
uintptr_t | context
Private Attributes inherited from tbb::internal::circular_doubly_linked_list_with_sentinel::node_t
node_t * | next
node_t * | prev

## Friends

class | concurrent_monitor

## Detailed Description

per-thread descriptor for concurrent_monitor

Definition at line 96 of file concurrent_monitor.h.

## Constructor & Destructor Documentation

## thread_context()

tbb::internal::concurrent_monitor::thread_context::thread_context | ( |  | ) |

inline

Definition at line 99 of file concurrent_monitor.h.

: skipped_wakeup(false), aborted(false), ready(false), context(0) {
epoch = 0;
in_waitset = false;
}

References epoch, and in_waitset.

## ~thread_context()

tbb::internal::concurrent_monitor::thread_context::~thread_context | ( |  | ) |

inline

Definition at line 103 of file concurrent_monitor.h.

{
if (ready) {
if( skipped_wakeup ) semaphore().P();
semaphore().~binary_semaphore();
}
}

References tbb::internal::binary_semaphore::P(), ready, semaphore(), skipped_wakeup, and tbb::internal::binary_semaphore::~binary_semaphore().

Here is the call graph for this function:

## Member Function Documentation

## __TBB_NOINLINE()

tbb::internal::concurrent_monitor::thread_context::__TBB_NOINLINE | ( | void | init() | ) |

private

The method for lazy initialization of the thread_context's semaphore.

## semaphore()

binary_semaphore& tbb::internal::concurrent_monitor::thread_context::semaphore | ( |  | ) |

inline

Definition at line 109 of file concurrent_monitor.h.

{ return *sema.begin(); }

References sema.

Referenced by tbb::internal::concurrent_monitor::abort_all_relaxed(), tbb::internal::concurrent_monitor::commit_wait(), tbb::internal::concurrent_monitor::notify_all_relaxed(), tbb::internal::concurrent_monitor::notify_one_relaxed(), tbb::internal::concurrent_monitor::notify_relaxed(), tbb::internal::concurrent_monitor::prepare_wait(), and ~thread_context().

Here is the caller graph for this function:

## Friends And Related Function Documentation

## concurrent_monitor

friend class concurrent_monitor

friend

Definition at line 97 of file concurrent_monitor.h.

## Member Data Documentation

## aborted

bool tbb::internal::concurrent_monitor::thread_context::aborted

private

Definition at line 119 of file concurrent_monitor.h.

Referenced by tbb::internal::concurrent_monitor::abort_all_relaxed(), and tbb::internal::concurrent_monitor::commit_wait().

## context

uintptr_t tbb::internal::concurrent_monitor::thread_context::context

private

Definition at line 121 of file concurrent_monitor.h.

Referenced by tbb::internal::concurrent_monitor::notify_relaxed(), and tbb::internal::concurrent_monitor::prepare_wait().

## epoch

__TBB_atomic unsigned tbb::internal::concurrent_monitor::thread_context::epoch

private

Definition at line 116 of file concurrent_monitor.h.

Referenced by tbb::internal::concurrent_monitor::commit_wait(), tbb::internal::concurrent_monitor::prepare_wait(), and thread_context().

## in_waitset

tbb::atomic<bool> tbb::internal::concurrent_monitor::thread_context::in_waitset

private

Definition at line 117 of file concurrent_monitor.h.

Referenced by tbb::internal::concurrent_monitor::abort_all_relaxed(), tbb::internal::concurrent_monitor::cancel_wait(), tbb::internal::concurrent_monitor::commit_wait(), tbb::internal::concurrent_monitor::notify_all_relaxed(), tbb::internal::concurrent_monitor::notify_one_relaxed(), tbb::internal::concurrent_monitor::notify_relaxed(), tbb::internal::concurrent_monitor::prepare_wait(), and thread_context().

## ready

bool tbb::internal::concurrent_monitor::thread_context::ready

private

Definition at line 120 of file concurrent_monitor.h.

Referenced by tbb::internal::concurrent_monitor::commit_wait(), tbb::internal::concurrent_monitor::prepare_wait(), and ~thread_context().

## sema

tbb::aligned_space<binary_semaphore> tbb::internal::concurrent_monitor::thread_context::sema

private

Definition at line 115 of file concurrent_monitor.h.

Referenced by semaphore().

## skipped_wakeup

bool tbb::internal::concurrent_monitor::thread_context::skipped_wakeup

private

Definition at line 118 of file concurrent_monitor.h.

Referenced by tbb::internal::concurrent_monitor::cancel_wait(), tbb::internal::concurrent_monitor::prepare_wait(), and ~thread_context().

The documentation for this class was generated from the following file:

- concurrent_monitor.h

tbb::internal::concurrent_monitor::thread_context::sema
tbb::aligned_space< binary_semaphore > sema
Definition: concurrent_monitor.h:115
tbb::internal::concurrent_monitor::thread_context::epoch
__TBB_atomic unsigned epoch
Definition: concurrent_monitor.h:116
tbb::internal::concurrent_monitor::thread_context::aborted
bool aborted
Definition: concurrent_monitor.h:119
tbb::internal::concurrent_monitor::thread_context::semaphore
binary_semaphore & semaphore()
Definition: concurrent_monitor.h:109
tbb::internal::concurrent_monitor::thread_context::skipped_wakeup
bool skipped_wakeup
Definition: concurrent_monitor.h:118
tbb::internal::concurrent_monitor::thread_context::ready
bool ready
Definition: concurrent_monitor.h:120
tbb::internal::concurrent_monitor::thread_context::context
uintptr_t context
Definition: concurrent_monitor.h:121
tbb::internal::binary_semaphore::~binary_semaphore
~binary_semaphore()
dtor
Definition: semaphore.h:230
tbb::internal::binary_semaphore::P
void P()
wait/acquire
Definition: semaphore.h:235
tbb::internal::concurrent_monitor::thread_context::in_waitset
tbb::atomic< bool > in_waitset
Definition: concurrent_monitor.h:117

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.