|
Zth (libzth)
|
#include <libzth/init.h>#include <libzth/async.h>#include <libzth/config.h>#include <libzth/util.h>#include <libzth/worker.h>Go to the source code of this file.
Functions | |
| void | zth_init () |
| Perform one-time global initialization of the Zth library. | |
| int | zth_run (void(fiber)(void *), void *arg) |
| Start Zth given the given fiber function. | |
| int | zth_main (int argc, char **argv) |
| Default main function that runs main_fiber. | |
Variables | |
| struct zth_init_entry const * | zth_init_head = nullptr |
| struct zth_init_entry * | zth_init_tail = nullptr |
| void zth_init | ( | ) |
Perform one-time global initialization of the Zth library.
Initialization is only done once. It is safe to call it multiple times.
The initialization sequence is initialized by ZTH_INIT_CALL() and processed in the same order as normal static initializers are executed.
| int zth_main | ( | int | argc, |
| char ** | argv | ||
| ) |
Default main function that runs main_fiber.
Unless main() is defined in the application, this function is called by the default-provided weak main().
| int zth_run | ( | void(fiber)(void *) | , |
| void * | arg | ||
| ) |
Start Zth given the given fiber function.
It can be used instead of zth_main() or main(). In contrast, this function does not call zth_preinit() and zth_postdeinit().
| struct zth_init_entry const* zth_init_head = nullptr |
| struct zth_init_entry* zth_init_tail = nullptr |