mirror of
https://github.com/DarkFlippers/unleashed-firmware
synced 2024-11-23 04:53:08 +00:00
17 lines
402 B
C
17 lines
402 B
C
|
#pragma once
|
||
|
|
||
|
typedef struct JsThread JsThread;
|
||
|
|
||
|
typedef enum {
|
||
|
JsThreadEventDone,
|
||
|
JsThreadEventError,
|
||
|
JsThreadEventPrint,
|
||
|
JsThreadEventErrorTrace,
|
||
|
} JsThreadEvent;
|
||
|
|
||
|
typedef void (*JsThreadCallback)(JsThreadEvent event, const char* msg, void* context);
|
||
|
|
||
|
JsThread* js_thread_run(const char* script_path, JsThreadCallback callback, void* context);
|
||
|
|
||
|
void js_thread_stop(JsThread* worker);
|