OSGetThreadSpecific/OSSetThreadSpecific

Syntax

#include <revolution/os.h>

#define OS_THREAD_SPECIFIC_MAX 2

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

Arguments

index Index to the thread-specific data (zero or one).
ptr The thread specific data to set (OSSetThreadSpecific)

Return Values

The OSGetThreadSpecific function returns the thread-specific data at index. The OSSetThreadSpecific function does not have a return value.

Description

Gets/sets data specific to the thread that called this function. Each thread can store up to OS_THREAD_SPECIFIC_MAX void pointers in the OSThread structure. When threads are created, thread-specific data is cleared to zero.

See Also

Thread Functions, Thread Synchronization Functions, OSCreateThread, OSGetThreadPriority

Revision History

2006/03/01 Initial version.


CONFIDENTIAL