OSJoinThread

Syntax

#include <cafe/os.h>

BOOL OSJoinThread (OSThread* thread, int* val);

Parameters

thread Pointer to the thread to join.
val Pointer to an int into which the thread's exit value is copied. Specify NULL if the thread's exit value is unnecessary.

Return Values

Returns TRUE if the specified thread does not have the detached attribute and has ended normally. Otherwise, returns FALSE.

Description

If the specified thread does not have the detached attribute (see the OSDetachThread function), the OSJoinThread function will wait until the specified thread ends, and then generate information about the ended thread.

Multiple threads cannot wait for the same thread to end. Success is guaranteed for only one thread. FALSE is returned for all other threads.

Do Not Call From

Callbacks Do not call this function from any callback function.

See Also

OSDetachThread
OSExitThread
OSIsThreadTerminated
OSCreateThread
OSCreateThreadType

Revision History

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


CONFIDENTIAL