man pages section 3: Basic Library Functions

Exit Print View

Updated: July 2014
 
 

td_thr_tlsbase(3C_DB)

Name

td_thr_tlsbase - get the base address of a thread's local storage (TLS) block

Synopsis

cc [ flag... ] file...  -lc_db [ library... ]
#include <proc_service.h>
#include <thread_db.h>

td_err_e td_thr_tlsbase(const td_thrhandle_t *th_p,ulong_t moduleid,
     void psaddr_t *base));

Description

The td_thr_tlsbase() function returns the base address of a threads local storage block for the object specified by moduleid for the thread identified by th_p. The base address is written into *base.

The moduleid is typically obtained by the rd_loadobj_iter() function found in the librtld_db (3LIB) library. See “Scanning Loadable Objects” in the Oracle Solaris 11.2 Linkers and Libraries Guide .

Return Values

TD_OK

The call completed successfully.

TD_ERR

The base argument was NULL, or a libc_db internal error occurred.

TD_BADTA

An invalid internal process handle was passed in.

TD_BADPH

There is a null external process handle associated with this internal process handle.

TD_DBERR

A call to one of the imported interface routines failed.

TD_NOTLS

There is no TLS in this module or moduleid is invalid.

TD_TLSDEFER

The module's TLS has not yet been allocated by the thread.

Attributes

See attributes(5) for descriptions of the following attributes:

ATTRIBUTE TYPE
ATTRIBUTE VALUE
MT-Level
Safe

See Also

libc_db(3LIB), rd_loadobj_iter(3EXT), rtld_db(3EXT), attributes (5)

Oracle Solaris 11.2 Linkers and Libraries Guide