OSSwitchFiberEx

Syntax

#include <revolution/os.h>

int OSSwitchFiberEx(register u32 arg0,
                    register u32 arg1,
                    register u32 arg2,
                    register u32 arg3,
                    register u32 pc, register u32 newsp);

Arguments

arg0, ..., arg3 Argument passed to the function specified by pc,
pc Location from where the specified function starts to run.
newsp Pointer to new stack (location of the highest possible address value).

Return Values

The result of the function indicated by pc.

Description

Executes the function indicated by pc using a new stack specified by newsp. When the function returns, the old stack pointer is restored.

Unlike OSSwitchFiber, four arguments can be passed to the function specified by pc. The type of the specified function's arguments does not need to be u32, as long as it can be passed to registers (such as a pointer). Also, the number of arguments may be less than four.

See Also

OSSwitchFiber

Revision History

2006/08/23 Initial version.


CONFIDENTIAL