Pin
|
Public Member Functions | |
TLS_KEY | AllocateKey (DESTRUCTFUN destructFun=NULL) |
BOOL | FreeKey (TLS_KEY tlsKey) |
BOOL | IsKeyAllocated (TLS_KEY tlsKey) |
VOID | InitCurrentTls (THREADID currentThreadId) |
VOID | DestructThreadTls (THREADID threadId) |
BOOL | IsCurrentTlsAllocated (THREADID currentThreadId) |
Static Public Member Functions | |
static VOID * | GetData (TLS_KEY tlsKey, THREADID threadId) |
static BOOL | SetData (TLS_KEY tlsKey, const VOID *value, THREADID threadId) |
static BOOL | IsValidTlsKey (TLS_KEY tlsKey, THREADID threadId) |
static CLIENT_TLS * | Instance () |
Friends | |
class | DUMMY_GCC32 |
Singleton that keeps client's TLS data for all active threads
TLS_KEY LEVEL_PINCLIENT::CLIENT_TLS::AllocateKey | ( | DESTRUCTFUN | destructFun = NULL | ) |
Allocate a new TLS key and associate it with a given data destruction function. See PIN_CreateThreadDataKey() description.
VOID LEVEL_PINCLIENT::CLIENT_TLS::DestructThreadTls | ( | THREADID | threadId | ) |
Destruct all per-thread data stored in TLS slots of the given thread. This function is called when the given thread is about to exit, just after notifying the client about thread exit.
[in] | threadId | ID of the exiting thread assigned by pin. |
BOOL LEVEL_PINCLIENT::CLIENT_TLS::FreeKey | ( | TLS_KEY | tlsKey | ) |
Release TLS key, allocated by a previous call to the CreateThreadDataKey() function. See PIN_DeleteThreadDataKey() description.
|
inlinestatic |
Get/Set the value of the specified TLS slot of the given thread. See PIN_GetThreadData() and PIN_SetThreadData() description.
[in] | threadId | Thread ID assigned by pin of the thread for which TLS access is desired, not necessarily the current thread. This ID can be obtained by the PIN_ThreadId() function call or received as the value of the IARG_THREAD_ID argument. |
VOID LEVEL_PINCLIENT::CLIENT_TLS::InitCurrentTls | ( | THREADID | currentThreadId | ) |
Zero-initialize all TLS slots in the current thread. This function should be called on the thread start but before the client is notified about the new thread.
[in] | currentThreadId | ID of the new (current) thread assigned by pin. |
|
static |
Return single instance of this class.
BOOL LEVEL_PINCLIENT::CLIENT_TLS::IsCurrentTlsAllocated | ( | THREADID | currentThreadId | ) |
Return TRUE if TLS slots are allocated for current thread, FALSE otherwise.
[in] | currentThreadId | ID of the current thread assigned by pin. |
BOOL LEVEL_PINCLIENT::CLIENT_TLS::IsKeyAllocated | ( | TLS_KEY | tlsKey | ) |
Return TRUE if TLS key is allocated by a previous call to the CreateThreadDataKey() function, FALSE otherwise
|
inlinestatic |
Check whether the input TLS_KEY is valid.
[in] | tlsKey | The TLS key |
[in] | currentThreadId | ID of the current thread assigned by pin. |
|
inlinestatic |
Get/Set the value of the specified TLS slot of the current/given thread. See above.