CMSIS2000  0.0.7
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
cr.h File Reference

Use this file as a start point to other files. More...

#include "context.h"
Include dependency graph for cr.h:

Go to the source code of this file.

Macros

#define CO_ROUTINE(name_and_args)   cr_cntx_t name_and_args
#define CR_ABORT(cr, error)   CR_CONTEXT_ERROR(cr,error)
 ABORT CR EXECUTION with negative return value next CR call will start execution from CR_BEGIN() point.
#define CR_BEGIN(cr)   CR_CONTEXT_RESTORE(cr)
 begin execution of CR here at first call time
#define CR_END(cr)   CR_CONTEXT_END(cr); CR_CONTEXT_RESET_AND_RETURN(cr)
 end of CR next CR call will start execution from CR_BEGIN() point
#define CR_EXIT(cr)   CR_CONTEXT_RESET_AND_RETURN(cr)
 return from CR next CR call will start execution from CR_BEGIN() point
#define CR_RETURN(cr)   CR_CONTEXT_SAVE_AND_RETURN(cr)
 return from CR next CR call will start execution here
#define CR_RETURN_WHILE(condition, cr)
 return from CR while condition is true *next CR call will start execution from CR_BEGIN() point
#define CR_WAIT_CR(run_cr, cr)   CR_RETURN_WHILE (CR_EXECUTING(run_cr),(cr))
 return from cr while run_cr is executing
#define THIS_IS_STATIC_CR(cr)   static cr_cntx_t cr = CR_CONTEXT_INIT_VALUE

Detailed Description

Use this file as a start point to other files.

Author
Dmitriy Cherepanov
Date
2011

Definition in file cr.h.

Macro Definition Documentation

#define CO_ROUTINE (   name_and_args)    cr_cntx_t name_and_args

Definition at line 48 of file cr.h.

#define CR_ABORT (   cr,
  error 
)    CR_CONTEXT_ERROR(cr,error)

ABORT CR EXECUTION with negative return value next CR call will start execution from CR_BEGIN() point.

Warning
erorr code MUST be less than 0.
only static CR can start execution from CR_BEGIN() point automatically

Definition at line 73 of file cr.h.

#define CR_BEGIN (   cr)    CR_CONTEXT_RESTORE(cr)

begin execution of CR here at first call time

Definition at line 54 of file cr.h.

#define CR_END (   cr)    CR_CONTEXT_END(cr); CR_CONTEXT_RESET_AND_RETURN(cr)

end of CR next CR call will start execution from CR_BEGIN() point

Definition at line 66 of file cr.h.

#define CR_EXIT (   cr)    CR_CONTEXT_RESET_AND_RETURN(cr)

return from CR next CR call will start execution from CR_BEGIN() point

Definition at line 62 of file cr.h.

#define CR_RETURN (   cr)    CR_CONTEXT_SAVE_AND_RETURN(cr)

return from CR next CR call will start execution here

Definition at line 58 of file cr.h.

#define CR_RETURN_WHILE (   condition,
  cr 
)
Value:
while ((condition)) { \
CR_RETURN(cr); \
}

return from CR while condition is true *next CR call will start execution from CR_BEGIN() point

Definition at line 78 of file cr.h.

#define CR_WAIT_CR (   run_cr,
  cr 
)    CR_RETURN_WHILE (CR_EXECUTING(run_cr),(cr))

return from cr while run_cr is executing

Definition at line 85 of file cr.h.

#define THIS_IS_STATIC_CR (   cr)    static cr_cntx_t cr = CR_CONTEXT_INIT_VALUE

Definition at line 50 of file cr.h.