OSGetThreadSpecific/OSSetThreadSpecific

C Specification

#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 Thread-specific data to set (OSSetThreadSpecific).

Return Values

The OSGetThreadSpecific function returns the thread-specific data at index. The OSSetThreadSpecific function 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 separately stored for each thread in the OSThread structure. When threads are created, thread-specific data is zeroed out.

See Also

Thread Functions, Thread Synchronization Functions, OSCreateThreadOSGetThreadPriority

Revision History

03/01/2006 Initial version.