OSGetThreadAffinity

Syntax

#include <cafe/os.h>
    
u16 OSGetThreadAffinity(OSThread* thread);

Parameters

thread Pointer to the thread control block.

Return Values

Return the thread core affinity.

Description

Gets the thread core affinity that was set via either OSCreateThread or OSSetThreadAffinity.

The returned value is the bitmask composed of the affinity settings previously set. The value can be used to check whether a thread is allowed to run on a specific core, to ensure a new thread has the same affinity as another thread, etc.

OS_THREAD_ATTR_AFFINITY_CORE0
OS_THREAD_ATTR_AFFINITY_CORE1
OS_THREAD_ATTR_AFFINITY_CORE2

Do Not Call From

None.

See Also

OSCreateThread
OSSetThreadAffinity

Revision History

2013/05/08 Automated cleanup pass.
2012/08/01 Cleanup pass.
2010/12/27 Initial version.


CONFIDENTIAL