См. документацию.
44 #ifndef _CR_COROUTINE_H_
45 #define _CR_COROUTINE_H_ 1
48 #define CO_ROUTINE(name_and_args) cr_cntx_t name_and_args
50 #define THIS_IS_STATIC_CR(cr) static cr_cntx_t cr = CR_CONTEXT_INIT_VALUE
54 #define CR_BEGIN(cr) CR_CONTEXT_RESTORE(cr)
58 #define CR_RETURN(cr) CR_CONTEXT_SAVE_AND_RETURN(cr)
62 #define CR_EXIT(cr) CR_CONTEXT_RESET_AND_RETURN(cr)
66 #define CR_END(cr) CR_CONTEXT_END(cr); CR_CONTEXT_RESET_AND_RETURN(cr)
73 #define CR_ABORT(cr,error) CR_CONTEXT_ERROR(cr,error)
78 #define CR_RETURN_WHILE(condition,cr) while ((condition)) { \
85 #define CR_WAIT_CR(run_cr,cr) CR_RETURN_WHILE (CR_EXECUTING(run_cr),(cr))