'\" te .\" Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved. .TH td_thr_tlsbase 3C_DB "23 April 2014" "SunOS 5.11" "Threads Debugging Library Functions" .SH NAME td_thr_tlsbase \- get the base address of a thread's local storage (TLS) block .SH SYNOPSIS .LP .nf cc [ \fIflag\fR... ] \fIfile\fR... -lc_db [ \fIlibrary\fR... ] #include #include td_err_e td_thr_tlsbase(const td_thrhandle_t *\fIth_p\fR, ulong_t \fImoduleid\fR, void psaddr_t *\fIbase\fR); .fi .SH DESCRIPTION .sp .LP The \fBtd_thr_tlsbase()\fR function returns the base address of a threads local storage block for the object specified by \fImoduleid\fR for the thread identified by \fIth_p\fR. The base address is written into *\fIbase\fR. .sp .LP The \fImoduleid\fR is typically obtained by the \fBrd_loadobj_iter()\fR function found in the \fBlibrtld_db\fR(3LIB) library. See \fIScanning Loadable Objects\fR in \fIOracle Solaris 11.3 Linkers and Libraries Guide\fR. .SH RETURN VALUES .sp .ne 2 .mk .na \fB\fBTD_OK\fR\fR .ad .RS 15n .rt The call completed successfully. .RE .sp .ne 2 .mk .na \fB\fBTD_ERR\fR\fR .ad .RS 15n .rt The base argument was \fINULL\fR, or a \fBlibc_db\fR internal error occurred. .RE .sp .ne 2 .mk .na \fB\fBTD_BADTA\fR\fR .ad .RS 15n .rt An invalid internal process handle was passed in. .RE .sp .ne 2 .mk .na \fB\fBTD_BADPH\fR\fR .ad .RS 15n .rt There is a null external process handle associated with this internal process handle. .RE .sp .ne 2 .mk .na \fB\fBTD_DBERR\fR\fR .ad .RS 15n .rt A call to one of the imported interface routines failed. .RE .sp .ne 2 .mk .na \fB\fBTD_NOTLS\fR\fR .ad .RS 15n .rt There is no TLS in this module or \fImoduleid\fR is invalid. .RE .sp .ne 2 .mk .na \fB\fBTD_TLSDEFER\fR\fR .ad .RS 15n .rt The module's TLS has not yet been allocated by the thread. .RE .SH ATTRIBUTES .sp .LP See \fBattributes\fR(5) for descriptions of the following attributes: .sp .sp .TS tab() box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) . ATTRIBUTE TYPEATTRIBUTE VALUE _ MT-LevelSafe .TE .SH SEE ALSO .sp .LP \fBlibc_db\fR(3LIB), \fBrd_loadobj_iter\fR(3EXT), \fBrtld_db\fR(3EXT), \fBattributes\fR(5) .sp .LP \fIOracle Solaris 11.3 Linkers and Libraries Guide\fR