Contiki 2.6
|
Protothreads implementation. More...
#include "sys/lc.h"
Go to the source code of this file.
Defines | |
Initialization | |
#define | PT_INIT(pt) |
Initialize a protothread. | |
Declaration and definition | |
#define | PT_THREAD(name_args) |
Declaration of a protothread. | |
#define | PT_BEGIN(pt) |
Declare the start of a protothread inside the C function implementing the protothread. | |
#define | PT_END(pt) |
Declare the end of a protothread. | |
Blocked wait | |
#define | PT_WAIT_UNTIL(pt, condition) |
Block and wait until condition is true. | |
#define | PT_WAIT_WHILE(pt, cond) |
Block and wait while condition is true. | |
Hierarchical protothreads | |
#define | PT_WAIT_THREAD(pt, thread) |
Block and wait until a child protothread completes. | |
#define | PT_SPAWN(pt, child, thread) |
Spawn a child protothread and wait until it exits. | |
Exiting and restarting | |
#define | PT_RESTART(pt) |
Restart the protothread. | |
#define | PT_EXIT(pt) |
Exit the protothread. | |
Calling a protothread | |
#define | PT_SCHEDULE(f) |
Schedule a protothread. | |
Yielding from a protothread | |
#define | PT_YIELD(pt) |
Yield from the current protothread. | |
#define | PT_YIELD_UNTIL(pt, cond) |
Yield from the protothread until a condition occurs. |
Protothreads implementation.
Definition in file pt.h.