MPWaitTaskQ

Syntax

#include <cafe/mp.h>

BOOL MPWaitTaskQ(MPTaskQ *taskq, u32 wmask);

Parameters

taskq MPTaskQ to wait on.
wmask The mask that is used to wait on items entering the MPTaskQ. Items matching the mask that are available in the MPTaskQ cause this function to exit.

(1 << 0) MP_TASKQ_INIT
(1 << 1) MP_TASKQ_RUN
(1 << 2) MP_TASKQ_STOPPING
(1 << 3) MP_TASKQ_STOP
(1 << 4) MP_TASKQ_DONE

The following multiple or state masks are usable.
MP_WAIT_TASKQ_RUN | MP_WAIT_TASKQ_DONE
MP_WAIT_TASKQ_STOP | MP_WAIT_TASKQ_DONE

Return Values

TRUE: The specified MPTaskQ has MPTasks available based on the waitmask.
FALSE: The specified MPTaskQ has no MPTasks available based on the waitmask.

Description

MPWaitTaskQ waits on the specified MPTaskQ to contain MPTasks to run. The MPTasks can be added by any processor core that calls MPEnqueTask.

Do Not Call From

Multiple threads This function is not thread-safe.
Callbacks Do not call this function from any callback function.

See Also

MPDequeTask
MPDequeTasks
MPEnqueTask
MPGetTaskQInfo
MPInitTaskQ
MPResetTaskQ
MPRunTasksFromTaskQ
MPStartTaskQ
MPStopTaskQ
MPTermTaskQ
MPWaitTaskQWithTimeout

Revision History

2013-05-08 Automated cleanup pass.
2012-08-21 Cleanup Pass
2012-05-14 Fix See Also.
2012-04-04 Matched the actual prototype.
2010-08-23 Initial version.


CONFIDENTIAL