JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Linker and Libraries Guide
search filter icon
search icon

Document Information

Preface

1.  Introduction to the Oracle Solaris Link Editors

2.  Link-Editor

3.  Runtime Linker

4.  Shared Objects

5.  Application Binary Interfaces and Versioning

6.  Support Interfaces

7.  Object File Format

8.  Thread-Local Storage

C/C++ Programming Interface

Thread-Local Storage Section

Runtime Allocation of Thread-Local Storage

Program Startup

Thread Creation

Post-Startup Dynamic Loading

Deferred Allocation of Thread-Local Storage Blocks

Thread-Local Storage Access Models

SPARC: Thread-Local Variable Access

SPARC: General Dynamic (GD)

SPARC: Local Dynamic (LD)

32-bit SPARC: Initial Executable (IE)

64-bit SPARC: Initial Executable (IE)

SPARC: Local Executable (LE)

SPARC: Thread-Local Storage Relocation Types

32-bit x86: Thread-Local Variable Access

32-bit x86: General Dynamic (GD)

x86: Local Dynamic (LD)

32-bit x86: Initial Executable (IE)

32-bit x86: Local Executable (LE)

32-bit x86: Thread-Local Storage Relocation Types

x64: Thread-Local Variable Access

x64: General Dynamic (GD)

x64: Local Dynamic (LD)

x64: Initial Executable (IE)

x64: Local Executable (LE)

x64: Thread-Local Storage Relocation Types

9.  Mapfiles

A.  Link-Editor Quick Reference

B.  Versioning Quick Reference

C.  Establishing Dependencies with Dynamic String Tokens

D.  Direct Bindings

E.  System V Release 4 (Version 1) Mapfiles

F.  Linker and Libraries Updates and New Features

Index

Chapter 8

Thread-Local Storage

The compilation environment supports the declaration of thread-local data. This data is sometimes referred to as thread-specific, or thread-private data, but more typically by the acronym TLS. By declaring variables to be thread-local, the compiler automatically arranges for these variables to be allocated on a per-thread basis.

The built-in support for this feature serves three purposes.