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.
|
file | lc-addrlabels.h |
| Implementation of local continuations based on the "Labels as
values" feature of gcc.
|
|
file | lc-switch.h |
| Implementation of local continuations based on switch() statement.
|
|
file | lc.h |
| Local continuations.
|
|
|
typedef void * | lc_t |
|
typedef unsigned short | lc_t |
|
#define LC_INIT |
( |
|
s | ) |
s = 0; |
#define LC_RESUME |
( |
|
s | ) |
switch(s) { case 0: |
Value:
} \
} while(0)
#define NULL
Definition: def.h:47
if(memp!=NULL)
Definition: memp.c:407
PSOCK_END & s
Definition: wireless/SmartConnect_6LoWPAN/apps/ip64-webserver/httpd.c:132
#define LC_SET |
( |
|
s | ) |
s = __LINE__; case __LINE__: |
#define LC_SET |
( |
|
s | ) |
do { ({ __label__ resume; resume: (s) = &&resume; }); }while(0) |
typedef unsigned short lc_t |