OSGetThreadSpecific/OSSetThreadSpecific

Syntax

#include <cafe/os.h>

#define OS_THREAD_SPECIFIC_MAX 16

void* OSGetThreadSpecific ( s32 index );
void  OSSetThreadSpecific ( s32 index, void* ptr );

Parameters

index Index to the thread-specific data.
ptr Thread-specific data to set (OSSetThreadSpecific).

Return Values

OSGetThreadSpecific returns the thread-specific data at index.
OSSetThreadSpecific does not have return values.

Description

Gets/sets data specific to the thread that calls this function. Up to a maximum of OS_THREAD_SPECIFIC_MAX void type pointers can be stored separately for each thread in the OSThread structure. When threads are created, thread-specific data is zeroed out.

Do Not Call From

OSGetThreadSpecific

None.

OSSetThreadSpecific

None.

See Also

OSCreateThread
OSGetThreadPriority

Revision History

2013-05-08 Automated cleanup pass.
2012-08-01 Cleanup pass.
2010-08-30 Initial version.


CONFIDENTIAL