3 #ifndef INCLUDE_NN_NLIB_THREADING_TLS_H_
4 #define INCLUDE_NN_NLIB_THREADING_TLS_H_
16 if (m_IdxValid)
return EALREADY;
18 if (e == 0) m_IdxValid =
true;
30 if (e != 0)
return NULL;
31 return reinterpret_cast<T*
>(p);
50 delete reinterpret_cast<T*
>(p);
59 #endif // INCLUDE_NN_NLIB_THREADING_TLS_H_
#define NLIB_NOEXCEPT
Defines noexcept geared to the environment, or the equivalent.
#define NLIB_FINAL
Defines final if it is available for use. If not, holds an empty string.
errno_t Reset(T *p=0) noexcept
Releases the pointer to the specified thread.
T * Release() noexcept
Releases the pointer to the specified thread.
T * Get() const noexcept
Gets a pointer to the specified thread.
errno_t Init() noexcept
Initializes thread local storage.
#define NLIB_CEXPR
Defines constexpr if it is available for use. If not, holds an empty string.
Class for handling thread local storage.
constexpr Tls() noexcept
Instantiates the object with default parameters (default constructor).
~Tls() noexcept
Destructor. The pointer will be deleted.
A file that contains the configuration information for each development environment.
T & operator*() const noexcept
Dereferences the pointer.
T * operator->() const noexcept
Returns the pointer.