NWC24TrySuspendScheduler

Syntax

#include <revolution/nwc24.h>
s32 NWC24TrySuspendScheduler( void );

Description

Attempts to pause the auto-scheduler. Although there is no blocking until paused, this function will fail if a scheduler process is underway.

If the automatic scheduler is already in a suspended state, the suspend counter maintained within the library will be incremented.
To release the suspended state, this must be matched by an equal number of calls to the NWC24ResumeScheduler function.

Arguments

None.

Return Values

Returns a suspend counter if the pause is successful.

When 0 is returned, it indicates that the auto-schedule was in an executable state before the process began.
When a positive number is returned. it indicates it was paused before the process began.
One of the following is returned when the process fails:

NWC24_ERR_FATAL: Fatal error
NWC24_ERR_INTERNAL_IPC: Problem with internal process.
NWC24_ERR_INPROGRESS: Scheduler has not started.
NWC24_ERR_MUTEX: There is another context calling a scheduler function.
NWC24_ERR_BUSY: The scheduler is executing an automatic process.

See Also

NWC24SuspendScheduler, NWC24ResumeScheduler

Revision History

2007/12/13 Described internal counter operations.
2006/09/01 Initial version.


CONFIDENTIAL