diff options
| author | ruki <[email protected]> | 2025-04-16 22:48:10 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2025-08-28 11:35:53 +0800 |
| commit | 91c6ceedf1acc7ce856130913474ec55750fd8bb (patch) | |
| tree | 7045acdd4b32479bfe1d9cc26bd8033b534c6fae /core/src | |
| parent | 28e35d67e2cf08069c971c2235845389143b5f0e (diff) | |
load engine
Diffstat (limited to 'core/src')
| -rw-r--r-- | core/src/xmake/thread/thread_init.c | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/core/src/xmake/thread/thread_init.c b/core/src/xmake/thread/thread_init.c index 03c62e909..a050066e8 100644 --- a/core/src/xmake/thread/thread_init.c +++ b/core/src/xmake/thread/thread_init.c @@ -29,13 +29,33 @@ * includes */ #include "prefix.h" +#include "../engine.h" + +/* ////////////////////////////////////////////////////////////////////////////////////// + * macros + */ +#define XM_THREAD_ENGINE_NAME "xmake" /* ////////////////////////////////////////////////////////////////////////////////////// * private implementation */ + +static tb_void_t xm_thread_lni_initalizer(xm_engine_ref_t engine, lua_State* lua) +{ + tb_trace_i("thread: initializer"); +} + static tb_int_t xm_thread_func(tb_cpointer_t priv) { - tb_trace_i("thread .."); + tb_trace_i("thread: start .."); + xm_engine_ref_t engine = xm_engine_init(XM_THREAD_ENGINE_NAME, xm_thread_lni_initalizer); + if (engine) + { + tb_char_t* argv[] = {XM_THREAD_ENGINE_NAME, tb_null}; + xm_engine_main(engine, 1, argv, tb_null); + xm_engine_exit(engine); + } + tb_trace_i("thread: end"); return 0; } |
