summaryrefslogtreecommitdiff
path: root/core/src/xmake/thread/thread_suspend.c
diff options
context:
space:
mode:
authorruki <[email protected]>2025-04-17 22:46:06 +0800
committerruki <[email protected]>2025-08-28 11:35:53 +0800
commit6eccd1efa540d634e35eb29cf923025e0667aa0c (patch)
treecd33e9f7ff6e0ab31698ce01e53f7eb79ebf1cce /core/src/xmake/thread/thread_suspend.c
parentcd6a9a33613a0a8449c026dd4e4bd77934e29e90 (diff)
improve thread context
Diffstat (limited to 'core/src/xmake/thread/thread_suspend.c')
-rw-r--r--core/src/xmake/thread/thread_suspend.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/core/src/xmake/thread/thread_suspend.c b/core/src/xmake/thread/thread_suspend.c
index 825155b5e..7bc4ce11b 100644
--- a/core/src/xmake/thread/thread_suspend.c
+++ b/core/src/xmake/thread/thread_suspend.c
@@ -43,11 +43,11 @@ tb_int_t xm_thread_suspend(lua_State* lua)
return 0;
// get thread
- tb_thread_ref_t thread = (tb_thread_ref_t)xm_lua_topointer(lua, 1);
- tb_check_return_val(thread, 0);
+ xm_thread_t* thread = (xm_thread_t*)xm_lua_topointer(lua, 1);
+ tb_check_return_val(thread && thread->handle, 0);
// suspend thread
- lua_pushboolean(lua, tb_thread_suspend(thread));
+ lua_pushboolean(lua, tb_thread_suspend(thread->handle));
return 1;
}