SharkSSL™ Embedded SSL/TLS Stack

Detailed Description

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.

Data Structures

struct  SeCtx
 SeCtx structure: See Context Manager and Bare Metal Systems for details. More...
 

Typedefs

typedef void(* SeCtxTask) (struct SeCtx *ctx)
 The task/thread entry point.
 
typedef struct SeCtx SeCtx
 SeCtx structure: See Context Manager and Bare Metal Systems for details.
 

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...
 

Function Documentation

◆ SeCtx_constructor()

void SeCtx_constructor ( SeCtx o,
SeCtxTask  t,
void *  buf,
int  bufLen 
)

Create a Context Manager instance.

Parameters
ouninitialized data of size sizeof(SeCtx).
tthe task/thread to call
bufbuffer used for storing the stack when switching from sequential mode to event driven mode.
bufLenbuffer length.
See also
SeCtx_panic

◆ SeCtx_panic()

void SeCtx_panic ( SeCtx o,
U32  size 
)

Function you must implement.

This function is called if the buffer provided in SeCtx_constructor is too small.