Welcome to TinyFiber’s documentation!¶
Reference documentation¶
-
struct
TfbJobDeclaration
¶ - #include <tinyfiber.h>
-
struct
TfbWaitHandle
¶ - #include <tinyfiber.h>
-
file
tinyfiber.h
- #include <stdint.h>#include <stddef.h>
Typedefs
-
typedef struct TfbContext
TfbContext
¶
Functions
-
int
tfb_init_ext
(TfbContext **fiber_system, int max_threads)¶ Creates a new fiber system context.
TfbContext* fiber_system = NULL; tfb_init_ext(&fiber_system, TFB_ALL_CORES); tfb_free_ext&fiber_system);
- Return
0 if successful, otherwise the error code.
- See
- See
rfb_free_ext()
- Parameters
fiber_system
: is your in-out pointer to a TfbContext pointer. Initialize to NULL before use.max_threads
: descibes how many working threads your fiber system should have.
-
int
tfb_init
()¶
-
int
tfb_free_ext
(TfbContext **fiber_system)¶
-
int
tfb_free
()¶
-
int
tfb_add_jobdecl_ext
(TfbContext *fiber_system, TfbJobDeclaration *job_declaration)¶
-
int
tfb_add_jobdecl
(TfbJobDeclaration *job_declaration)¶
-
int
tfb_add_jobdecls_ext
(TfbContext *fiber_system, TfbJobDeclaration jobs[], int64_t elements)¶
-
int
tfb_add_jobdecls
(TfbJobDeclaration jobs[], int64_t elements)¶
-
int
tfb_add_job_ext
(TfbContext *fiber_system, void (*func)(void*), void *user_data, TfbWaitHandle *wh, )¶
-
int
tfb_add_job
(void (*func)(void*), void *user_data, TfbWaitHandle *wh, )¶
-
int
tfb_await_ext
(TfbContext *fiber_system, TfbWaitHandle *wait_handle)¶
-
int
tfb_await
(TfbWaitHandle *wait_handle)¶
-
typedef struct TfbContext
-
dir
/home/docs/checkouts/readthedocs.org/user_builds/tinyfiber/checkouts/latest/src