![]() |
RainbowBS Manual
v0.1.0
Written by QWQ([email protected])
|
Collaboration diagram for Local continuations:
![]() |
Files | |
file | lc-addrlabels.h |
file | lc-switch.h |
file | lc.h |
Typedefs | |
typedef void * | lc_t |
typedef unsigned short | lc_t |
Detailed Description
Local continuations form the basis for implementing protothreads. A local continuation can be set in a specific function to capture the state of the function. After a local continuation has been set can be resumed in order to restore the state of the function at the point where the local continuation was set.
Macro Definition Documentation
#define LC_RESUME | ( | s | ) |
Value:
do { \
if(s != NULL) { \
goto *s; \
} \
} while(0)
#define LC_SET | ( | s | ) |
Value:
do { \
LC_CONCAT(LC_LABEL, __LINE__): \
(s) = &&LC_CONCAT(LC_LABEL, __LINE__); \
} while(0)
Generated by
