LLVM API Documentation

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | List of all members
llvm::sys::ThreadLocal< T > Class Template Reference

#include <ThreadLocal.h>

Inheritance diagram for llvm::sys::ThreadLocal< T >:
Inheritance graph
[legend]
Collaboration diagram for llvm::sys::ThreadLocal< T >:
Collaboration graph
[legend]

Public Member Functions

 ThreadLocal ()
 
Tget ()
 
void set (T *d)
 
void erase ()
 
- Public Member Functions inherited from llvm::sys::ThreadLocalImpl
 ThreadLocalImpl ()
 
virtual ~ThreadLocalImpl ()
 
void setInstance (const void *d)
 
const void * getInstance ()
 
void removeInstance ()
 

Detailed Description

template<class T>
class llvm::sys::ThreadLocal< T >

ThreadLocal - A class used to abstract thread-local storage. It holds, for each thread, a pointer a single object of type T.

Definition at line 46 of file ThreadLocal.h.

Constructor & Destructor Documentation

template<class T >
llvm::sys::ThreadLocal< T >::ThreadLocal ( )
inline

Definition at line 48 of file ThreadLocal.h.

Member Function Documentation

template<class T >
void llvm::sys::ThreadLocal< T >::erase ( )
inline

Definition at line 58 of file ThreadLocal.h.

References llvm::sys::ThreadLocalImpl::removeInstance().

template<class T >
T* llvm::sys::ThreadLocal< T >::get ( )
inline

get - Fetches a pointer to the object associated with the current thread. If no object has yet been associated, it returns NULL;

Definition at line 52 of file ThreadLocal.h.

References llvm::sys::ThreadLocalImpl::getInstance().

template<class T >
void llvm::sys::ThreadLocal< T >::set ( T d)
inline

Definition at line 55 of file ThreadLocal.h.

References llvm::sys::ThreadLocalImpl::setInstance().


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