![]() | Fun 0.41.5 The programming language that makes You have fun |
Cross-platform thread helpers and registry used by OP_THREAD_SPAWN/OP_THREAD_JOIN. More...
#include <stdint.h>#include <time.h>#include <pthread.h>#include <unistd.h>

Go to the source code of this file.
Data Structures | |
| struct | FunThreadEntry |
| struct | FunTask |
Macros | |
| #define | FUN_THREAD_CALL |
| #define | FUN_MAX_THREADS 64 |
Typedefs | |
| typedef pthread_t | fun_thread_handle_t |
| typedef void * | fun_thread_ret_t |
Cross-platform thread helpers and registry used by OP_THREAD_SPAWN/OP_THREAD_JOIN.
This file provides a tiny cross-platform threading layer (Windows/UNIX) embedded into the VM translation unit. It exposes utilities used by VM opcodes to spawn a function call in a background thread and later join it to retrieve the result.
Notes:
Definition in file thread_common.c.
| #define FUN_MAX_THREADS 64 |
Definition at line 51 of file thread_common.c.
| #define FUN_THREAD_CALL |
Definition at line 40 of file thread_common.c.
| typedef pthread_t fun_thread_handle_t |
Definition at line 38 of file thread_common.c.
| typedef void* fun_thread_ret_t |
Definition at line 39 of file thread_common.c.