skip to content
[readonly]
==> src/rt_internal.h <==
1/* What the executor's files share. */
2#ifndef MESH_EXEC_WASM_RT_INTERNAL_H
3#define MESH_EXEC_WASM_RT_INTERNAL_H
4
5#include <pthread.h>
6#include <stdatomic.h>
7#include <stdbool.h>
8#include <stdint.h>
9
10struct mesh_wasm_rt {
11    char *cache;            /* --wasm-cache DIR, or NULL */
12    _Atomic uint64_t epoch; /* ticks every ms while lanes run */
13    _Atomic uint32_t lanes; /* lanes alive (the epoch thread ticks only while some are) */
14    _Atomic bool stop;
15    pthread_t thread;
16};
17
18/* A malloc'd printf. */
19char *mesh_wasm_fmt(const char *fmt, ...) __attribute__((format(printf, 1, 2)));
20
21#endif