Kore 3
Loading...
Searching...
No Matches
fiber.h
Go to the documentation of this file.
1#ifndef KORE_THREADS_FIBER_HEADER
2#define KORE_THREADS_FIBER_HEADER
3
4#include <kore3/global.h>
5
6#include <kore3/backend/fiber.h>
7
11
12#ifdef __cplusplus
13extern "C" {
14#endif
15
16typedef struct kore_fiber {
17 kore_fiber_impl impl;
19
25
32KORE_FUNC void kore_fiber_init(kore_fiber *fiber, void (*func)(void *param), void *param);
33
38KORE_FUNC void kore_fiber_destroy(kore_fiber *fiber);
39
44KORE_FUNC void kore_fiber_switch(kore_fiber *fiber);
45
46#ifdef __cplusplus
47}
48#endif
49
50#endif
KORE_FUNC void kore_fiber_init(kore_fiber *fiber, void(*func)(void *param), void *param)
Initializes a fiber.
KORE_FUNC void kore_fiber_init_current_thread(kore_fiber *fiber)
Uses the current thread as a fiber.
KORE_FUNC void kore_fiber_switch(kore_fiber *fiber)
Switch the current thread to a different fiber.
KORE_FUNC void kore_fiber_destroy(kore_fiber *fiber)
Destroys a fiber.
Provides basic functionality that's used all over the place. There's usually no need to manually incl...
Definition fiber.h:16