FixTask Documentation

Back to summary

C API

Types

typedef Heap *(*HeapCreateFunc)(void *data);
Callback to create a heap for a new thread.
typedef void (*ComputeHeapRunFunc)(Heap *heap, int core_id, void *data);
Callback to run code on compute threads.

Functions

void fixtask_register_functions(Heap *heap, HeapCreateFunc create_func, void *create_data, LoadScriptFunc load_func, void *load_data);
Registers task functions to given heap. You have to provide callbacks to create a heap for a new thread and also a load function for loading of the scripts.
void fixtask_get_script_load_function(Heap *heap, LoadScriptFunc *load_func, void **load_data);
Returns the script load function for the heap.
int fixtask_get_core_count(Heap *heap);
Returns the number of CPU cores.
void fixtask_run_on_compute_threads(Heap *heap, Value *error, ComputeHeapRunFunc func, void *data);
Runs code on compute threads.
void *fixtask_get_atomic_mutex(void *ptr);
Returns a mutex used for custom (or emulated) atomic operations for given pointer.
void fixtask_integrate_io_event_loop(Heap *heap);
Enables support for integration of FixIO async loop with Dispatcher. This needs to be also explicitly enabled using the Dispatcher::integrate_async function for the integration to be actually enabled for given heap.