SwitchToFiber

Windows Mobile 6.5
A version of this page is also available for
4/8/2010

This function schedules a fiber. The caller must be a fiber.


VOID WINAPI SwitchToFiber(
  LPVOID lpFiber
);

lpFiber

[in] Specifies the address of the fiber to be scheduled.

Create fibers with CreateFiber.

Before you can schedule fibers associated with a thread, you must call ConvertThreadToFiber to set up an area to save the fiber state information in. The thread becomes the currently executing fiber.

The SwitchToFiber function saves the state information of the current fiber and restores the state of the specified fiber.

You can call SwitchToFiber with the address of a fiber created by a different thread. To do this, you must have the address returned to the other thread when it called CreateFiber and you must use proper synchronization.

If you call SwitchToFiber with an invalid pointer or a NULL pointer, the result is undefined.

Avoid making the following call:

SwitchToFiber( GetCurrentFiber() );
Aa911420.note(en-us,MSDN.10).gifNote:
This call is a no-operation instruction in Windows Embedded CE.

Headerwinbase.h
Librarycoredll.lib
Windows Embedded CEWindows CE .NET 4.0 and later
Windows MobileWindows Mobile Version 5.0 and later

Community Additions

Show: