Coroutine Class Reference

Internal coroutine interface class. More...

#include <coroutine_decls.h>

Inheritance diagram for Coroutine:

NewCoroutine Runner Microthread BaseScheduler EpollScheduler SelectScheduler List of all members.

Public Member Functions

void acquire ()
 Acquires this coroutine before a swapto() or returnto() when other datastructures need to be modified.
void swapto (Coroutine &o, bool acquired=false)
 Swaps the context from this coroutine to the given coroutine.

Protected Member Functions

virtual void destroyme ()
 Internal function return interface.

Protected Attributes

ucontext_t context
 Internal context datastructure.

Friends

class NewCoroutine

Detailed Description

Internal coroutine interface class.


Member Function Documentation

void Coroutine::destroyme (  )  [protected, virtual]

Internal function return interface.

Do not use.

void Coroutine::acquire (  )  [inline]

Acquires this coroutine before a swapto() or returnto() when other datastructures need to be modified.

The acquired parameter of the next swapto() or returnto() must be true.

void Coroutine::swapto ( Coroutine o,
bool  acquired = false 
)

Swaps the context from this coroutine to the given coroutine.

Parameters:
o is the coroutine being swapped to
acquired must be true if this object was previously acquired using acquire()


Member Data Documentation

ucontext_t Coroutine::context [protected]

Internal context datastructure.

It is not private because it is accessed in NewCoroutine.


The documentation for this class was generated from the following files:
Generated on Thu Feb 14 13:30:30 2008 by  doxygen 1.5.1