Zth (libzth)
main.cpp File Reference
#include <libzth/async.h>
#include <libzth/config.h>
#include <libzth/worker.h>

Go to the source code of this file.

Functions

int main_fiber (int argc, char **argv)
 
void zth_preinit ()
 Initialization function to be called by the default-supplied main(), before doing anything else. More...
 
int zth_postdeinit ()
 Initialization function to be called by the default-supplied main(), just before shutting down. More...
 
int main (int argc, char **argv)
 

Function Documentation

◆ main()

int main ( int  argc,
char **  argv 
)
Examples
socks.cpp.

Definition at line 50 of file main.cpp.

◆ main_fiber()

int main_fiber ( int  argc,
char **  argv 
)

Definition at line 14 of file main.cpp.

◆ zth_postdeinit()

int zth_postdeinit ( )

Initialization function to be called by the default-supplied main(), just before shutting down.

This function can be used to run machine/board-specific cleanup in main() before returning. The default (weak) implementation does nothing.

Returns
the exit code of the application, which overrides the returned value from main_fiber() when non-zero

Definition at line 42 of file main.cpp.

◆ zth_preinit()

void zth_preinit ( )

Initialization function to be called by the default-supplied main(), before doing anything else.

This function can be used to run machine/board-specific initialization in main() even before zth_init() is invoked. The default (weak) implementation does nothing.

Definition at line 30 of file main.cpp.