|
Barracuda Application Server C/C++ Reference
Native APIs, integration guides, and platform interfaces
|
The SeCtx library makes it possible to use sequential functions in an event driven system such as a bare metal (non RTOS) system.
It does so by implementing a method for saving and restoring the stack by using the standard C library functions setjmp/longjmp.
See Bare Metal Systems for an introduction.

Classes | |
| struct | SeCtx |
| SeCtx structure: See Context Manager and Bare Metal Systems for details. More... | |
Macros | |
| #define | SeCtx_destructor(o) |
| No operation for a context using a caller-supplied static stack buffer. More... | |
Typedefs | |
| typedef void(* | SeCtxTask) (struct SeCtx *ctx) |
| The task/thread entry point. More... | |
| typedef struct SeCtx | SeCtx |
| SeCtx structure: See Context Manager and Bare Metal Systems for details. More... | |
Functions | |
| void | SeCtx_constructor (SeCtx *o, SeCtxTask t, void *buf, int bufLen) |
| Create a Context Manager instance. More... | |
| void | SeCtx_panic (SeCtx *o, U32 size) |
| Function you must implement. More... | |
| #define SeCtx_destructor | ( | o | ) |
No operation for a context using a caller-supplied static stack buffer.
| o | SeCtx *; initialized context. Retire it from the scheduler before releasing its caller-owned storage. With DYNAMIC_SE_CTX, this name is a function that releases the dynamically allocated stack buffer. |
SeCtx structure: See Context Manager and Bare Metal Systems for details.
| typedef void(* SeCtxTask) (struct SeCtx *ctx) |
The task/thread entry point.
Create a Context Manager instance.
| o | uninitialized data of size sizeof(SeCtx). |
| t | the task/thread to call |
| buf | buffer used for storing the stack when switching from sequential mode to event driven mode. |
| bufLen | buffer length. |
Function you must implement.
This function is called if the buffer provided in SeCtx_constructor is too small.
| o | Context whose stack buffer could not be allocated or is too small; NULL for a dynamic stack request exceeding 40 KiB. |
| size | Required stack-save size in bytes. |