Header file for the Contiki process interface. More...
#include "sys/pt.h"
#include "sys/cc.h"
Go to the source code of this file.
Defines | |
Return values | |
#define | PROCESS_ERR_OK 0 |
Return value indicating that an operation was successful. | |
#define | PROCESS_ERR_FULL 1 |
Return value indicating that the event queue was full. | |
Process protothread functions | |
#define | PROCESS_BEGIN() |
Define the beginning of a process. | |
#define | PROCESS_END() |
Define the end of a process. | |
#define | PROCESS_WAIT_EVENT() |
Wait for an event to be posted to the process. | |
#define | PROCESS_WAIT_EVENT_UNTIL(c) |
Wait for an event to be posted to the process, with an extra condition. | |
#define | PROCESS_YIELD() |
Yield the currently running process. | |
#define | PROCESS_YIELD_UNTIL(c) |
Yield the currently running process until a condition occurs. | |
#define | PROCESS_WAIT_UNTIL(c) |
Wait for a condition to occur. | |
#define | PROCESS_WAIT_WHILE(c) PT_WAIT_WHILE(process_pt, c) |
#define | PROCESS_EXIT() |
Exit the currently running process. | |
#define | PROCESS_PT_SPAWN(pt, thread) |
Spawn a protothread from the process. | |
#define | PROCESS_PAUSE() |
Yield the process for a short while. | |
Poll and exit handlers | |
#define | PROCESS_POLLHANDLER(handler) |
Specify an action when a process is polled. | |
#define | PROCESS_EXITHANDLER(handler) |
Specify an action when a process exits. | |
Process declaration and definition | |
#define | PROCESS_THREAD(name, ev, data) |
Define the body of a process. | |
#define | PROCESS_NAME(name) |
Declare the name of a process. | |
#define | PROCESS(name, strname) |
Declare a process. | |
Functions | |
Functions called from device drivers | |
void | process_poll (struct process *p) |
Request a process to be polled. | |
Functions called by the system and boot-up code | |
void | process_init (void) |
Initialize the process module. | |
int | process_run (void) |
Run the system once - call poll handlers and process one event. | |
int | process_is_running (struct process *p) |
Check if a process is running. | |
int | process_nevents (void) |
Number of events waiting to be processed. | |
Functions called from application programs | |
| |
#define | PROCESS_CURRENT() |
Get a pointer to the currently running process. | |
#define | PROCESS_CONTEXT_BEGIN(p) |
Switch context to another process. | |
#define | PROCESS_CONTEXT_END(p) process_current = tmp_current; } |
End a context switch. | |
CCIF struct process * | process_current |
void | process_start (struct process *p, const char *arg) |
Start a process. | |
int | process_post (struct process *p, process_event_t ev, void *data) |
Post an asynchronous event. | |
void | process_post_synch (struct process *p, process_event_t ev, void *data) |
Post a synchronous event to a process. | |
void | process_exit (struct process *p) |
Cause a process to exit. | |
process_event_t | process_alloc_event (void) |
Allocate a global event number. |
Header file for the Contiki process interface.
Definition in file process.h.