tbb::internal::basic_tls< T > Class Template Reference

Basic cross-platform wrapper class for TLS operations. More...

`#include <tls.h>`

Inheritance diagram for tbb::internal::basic_tls< T >:
Collaboration diagram for tbb::internal::basic_tls< T >:

## Public Member Functions

int | create ()
int | destroy ()
void | set (T value)
T | get ()

## Private Types

typedef DWORD | tls_key_t

## Private Attributes

tls_key_t | my_key

## Detailed Description

### template<typename T>
class tbb::internal::basic_tls< T >

Basic cross-platform wrapper class for TLS operations.

Definition at line 34 of file tls.h.

## Member Typedef Documentation

## tls_key_t

template<typename T>

typedef DWORD tbb::internal::basic_tls< T >::tls_key_t

private

Definition at line 45 of file tls.h.

## Member Function Documentation

## create()

template<typename T>

int tbb::internal::basic_tls< T >::create | ( |  | ) |

inline

Definition at line 48 of file tls.h.

{
tls_key_t tmp = TlsAlloc();
if( tmp==TLS_OUT_OF_INDEXES )
return TLS_OUT_OF_INDEXES;
my_key = tmp;
return 0;
}

Referenced by tbb::internal::governor::acquire_resources(), and tbb::internal::input_buffer::create_my_tls().

Here is the caller graph for this function:

## destroy()

template<typename T>

int tbb::internal::basic_tls< T >::destroy | ( |  | ) |

inline

Definition at line 55 of file tls.h.

{ TlsFree(my_key); my_key=0; return 0; }

Referenced by tbb::internal::input_buffer::destroy_my_tls(), and tbb::internal::governor::release_resources().

Here is the caller graph for this function:

## get()

template<typename T>

T tbb::internal::basic_tls< T >::get | ( |  | ) |

inline

Definition at line 57 of file tls.h.

{ return (T)TlsGetValue(my_key); }

Referenced by tbb::internal::governor::init_scheduler(), tbb::internal::governor::is_set(), tbb::internal::governor::local_scheduler(), tbb::internal::governor::local_scheduler_if_initialized(), tbb::internal::governor::local_scheduler_weak(), tbb::internal::input_buffer::my_tls_end_of_input(), and tbb::internal::governor::release_resources().

Here is the caller graph for this function:

## set()

template<typename T>

void tbb::internal::basic_tls< T >::set | ( | T | value | ) |

inline

Definition at line 56 of file tls.h.

{ TlsSetValue(my_key, (LPVOID)value); }

Referenced by tbb::internal::governor::assume_scheduler(), and tbb::internal::input_buffer::set_my_tls_end_of_input().

Here is the caller graph for this function:

## Member Data Documentation

## my_key

template<typename T>

tls_key_t tbb::internal::basic_tls< T >::my_key

private

Definition at line 72 of file tls.h.

Referenced by tbb::internal::basic_tls< uintptr_t >::create(), tbb::internal::basic_tls< uintptr_t >::destroy(), tbb::internal::basic_tls< uintptr_t >::get(), and tbb::internal::basic_tls< uintptr_t >::set().

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

- tls.h

tbb::internal::basic_tls::tls_key_t
DWORD tls_key_t
Definition: tls.h:45
tbb::internal::basic_tls::my_key
tls_key_t my_key
Definition: tls.h:72
value
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
Definition: ittnotify_static.h:192

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.