MPInitTaskQ

Syntax

#include <cafe/mp.h>

void MPInitTaskQ(MPTaskQ* tq, MPTaskPtr* qlist, u32 q_len);

Parameters

tq MPTaskQ to initialize.
qlist Pointer to base of memory to use for the MPTask array.
q_len Number of entries in the MPTask array.

Return Values

None.

Description

Initializes an MPTaskQ for first use. The MPTaskQ structure must be preallocated. The memory for the MPTask array must also be preallocated. Care should be taken not to use stack-allocated memory for these items.

The state of the MPTaskQ is adjusted by both MPInitTaskQ and MPRunTasksFromTaskQ. Do not have any tasks running on a MPTaskQ and then call MPInitTaskQ to initialize the queue. An MPTaskQ should be in the "done" or "stop" state before MPInitTaskQ is called.

Do Not Call From

Multiple threads This function is not thread-safe.

See Also

MPDequeTask
MPDequeTasks
MPEnqueTask
MPGetTaskQInfo
MPResetTaskQ
MPRunTasksFromTaskQ
MPStartTaskQ
MPStopTaskQ
MPTermTaskQ
MPWaitTaskQ
MPWaitTaskQWithTimeout

Revision History

2013/05/08 Automated cleanup pass.
2012/05/14 Fixed See Also.
2012/05/04 Matched the actual prototype.
2010/08/23 Initial version.


CONFIDENTIAL