OSRunThread

Syntax

#include <cafe/os.h>

typedef int (*OSThread_Proc)(int intArg, void *ptrArg);

BOOL OSRunThread(OSThread* thread, OSThread_Proc func, int intArg, void* ptrArg);

Parameters

thread Pointer to the thread to resume.
func Pointer to the function to call.
intArg Number of arguments to pass to the function.
prtArg Arguments to pass to the function.

Return Values

TRUE if the function will be called by the specified thread. FALSE if the thread could not be used.

Description

Runs a specific function on a thread. OSRunThread can be used to cause otherwise idle threads to execute on other processor cores, such as the OSDefaultThread for each processor core. OSRunThread can also be used to run functions asynchronously where such behavior is desirable, such as for the construction of thread pools.

Do Not Call From

None.

See Also

OSIsThreadSuspended
OSSuspendThread
OSCreateThreadType
OSGetDefaultThread

Revision History

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


CONFIDENTIAL