PinCRT
|
Typedefs | |
typedef VOID(* | TLS_DESTRUCTOR) (VOID *) |
typedef ADDRINT | PIN_TLS_INDEX |
Functions | |
VOID * | OS_TlsGetBaseAddress () |
PIN_TLS_INDEX | OS_TlsAlloc (TLS_DESTRUCTOR dest) |
BOOL_T | OS_TlsFree (PIN_TLS_INDEX idx) |
VOID * | OS_TlsGetValue (PIN_TLS_INDEX idx) |
VOID * | OS_TlsGetValueForThread (PIN_TLS_INDEX idx, NATIVE_TID ntid) |
VOID ** | OS_TlsGetArrayAddress (void) |
VOID ** | OS_TlsGetArrayAddressForThread (NATIVE_TID ntid) |
BOOL_T | OS_TlsSetValue (PIN_TLS_INDEX idx, VOID *val) |
BOOL_T | OS_TlsSetValueForThread (PIN_TLS_INDEX idx, NATIVE_TID ntid, VOID *val) |
VOID | OS_TlsFreeThreadTls (NATIVE_TID ntid) |
BOOL_T | OS_TlsAddStaticTlsDestructor (TLS_DESTRUCTOR destructor) |
typedef ADDRINT PIN_TLS_INDEX |
Type for index inside the dynamic TLS.
typedef VOID(* TLS_DESTRUCTOR) (VOID *) |
Prototype for TLS value destructor function. The only argument for this function is the value stored in TLS.
BOOL_T OS_TlsAddStaticTlsDestructor | ( | TLS_DESTRUCTOR | destructor | ) |
Add a destructor for all threads' static TLS. The destructor for static TLS is called on each thread termination, provided that the thread had an allocated static TLS.
[in] | destructor | Destructor function that will be called with the pointer to the fixed TLS when a thread terminates. |
PIN_TLS_INDEX OS_TlsAlloc | ( | TLS_DESTRUCTOR | dest | ) |
Allocates a new slot in the dynamic TLS.
[in] | dest | Optional destructor function that will be called on each value stores in TLS when its corresponding thread dies. |
BOOL_T OS_TlsFree | ( | PIN_TLS_INDEX | idx | ) |
Free a previously allocated slot in the dynamic TLS.
[in] | idx | The index to free. |
VOID OS_TlsFreeThreadTls | ( | NATIVE_TID | ntid | ) |
Free all resources that are used for a particular thread's TLS. This function is usually called when a thread is about to exit.
[in] | ntid | The thread ID for which the TLS need to be freed. |
VOID** OS_TlsGetArrayAddress | ( | void | ) |
Return the address of the static TLS for the current thread
VOID** OS_TlsGetArrayAddressForThread | ( | NATIVE_TID | ntid | ) |
Return the address of the static TLS for a particular thread
[in] | ntid | The thread ID for which the static TLS will be retrieved. |
VOID* OS_TlsGetBaseAddress | ( | ) |
Return the base address for the application-wide TLS data structure. The TLS data structure is used to implement a TLS which is not based on segment registers.
VOID* OS_TlsGetValue | ( | PIN_TLS_INDEX | idx | ) |
Get the value associated with a particular index from the current thread's dynamic TLS.
[in] | idx | The index of the value to get. |
VOID* OS_TlsGetValueForThread | ( | PIN_TLS_INDEX | idx, |
NATIVE_TID | ntid | ||
) |
Get the value associated with a particular index of a particular thread's dynamic TLS.
[in] | idx | The index of the value to get. |
[in] | ntid | The thread ID for which the TLS value will be retrieved. |
BOOL_T OS_TlsSetValue | ( | PIN_TLS_INDEX | idx, |
VOID * | val | ||
) |
Set the value associated with a particular index in the current thread's dynamic TLS.
[in] | idx | The index of the value to set. |
[in] | val | The new value to set. |
BOOL_T OS_TlsSetValueForThread | ( | PIN_TLS_INDEX | idx, |
NATIVE_TID | ntid, | ||
VOID * | val | ||
) |
Set the value associated with a particular index in of a particular thread's dynamic TLS.
[in] | idx | The index of the value to set. |
[in] | ntid | The thread ID for which the value will be set in its TLS. |
[in] | val | The new value to set. |