MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / helper

Function helper

examples/interrupt.c:26–35  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

24#include <time.h>
25
26static void *helper(void *_engine) {
27 wasm_engine_t *engine = _engine;
28 struct timespec sleep_dur;
29 sleep_dur.tv_sec = 1;
30 sleep_dur.tv_nsec = 0;
31 nanosleep(&sleep_dur, NULL);
32 printf("Sending an interrupt\n");
33 wasmtime_engine_increment_epoch(engine);
34 return 0;
35}
36
37static void spawn_interrupt(wasm_engine_t *engine) {
38 pthread_t child;

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected