nn::os::ThreadLocalStorage Class

Header file: nn/os.h

Syntax

class ThreadLocalStorage

Description

Class that represents thread-local storage with the same size as uptr.

Thread-local storage comprises a fixed number of uptr slots that are reserved by the constructor. If reservation fails, the application is forced to terminate.

Data stored in thread-local storage can be obtained and set using the GetValue and SetValue functions, respectively.

When a thread is created, its entire thread-local storage region is initialized to 0.

Member Functions

ThreadLocalStorage Creates a thread-local storage object and allocates one slot.
~ThreadLocalStorage Frees the slots of a thread-local storage object and destroys the object.
GetValue Gets a value stored in thread-local storage.
SetValue Sets a value stored in thread-local storage.

Revision History

2010/01/07
Initial version.

CONFIDENTIAL