diff options
| author | ruki <[email protected]> | 2025-08-29 23:20:48 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2025-08-29 23:20:48 +0800 |
| commit | f1d54d70a80b86465c2df36eb95a0bcda8c26824 (patch) | |
| tree | a351724ed7b43246e21d20720b577557df764ba6 /core/src/xmake/thread/queue_init.c | |
| parent | 054c5764447dc51081d466c1bc2e26fda5906712 (diff) | |
add thread sharedata
Diffstat (limited to 'core/src/xmake/thread/queue_init.c')
| -rw-r--r-- | core/src/xmake/thread/queue_init.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/core/src/xmake/thread/queue_init.c b/core/src/xmake/thread/queue_init.c index 4c4e9a9f6..0c8af884d 100644 --- a/core/src/xmake/thread/queue_init.c +++ b/core/src/xmake/thread/queue_init.c @@ -33,12 +33,12 @@ /* ////////////////////////////////////////////////////////////////////////////////////// * private implementation */ -static tb_void_t xm_thread_queue_item_free(tb_element_ref_t element, tb_pointer_t buff) +static tb_void_t xm_thread_value_free(tb_element_ref_t element, tb_pointer_t buff) { - xm_thread_queue_item_t* item = (xm_thread_queue_item_t*)buff; + xm_thread_value_t* item = (xm_thread_value_t*)buff; if (item) { - if (item->kind == XM_THREAD_QUEUE_ITEM_STR) + if (item->kind == XM_THREAD_VALUE_STR) { if (item->u.string) tb_free((tb_pointer_t)item->u.string); item->u.string = tb_null; @@ -62,7 +62,7 @@ tb_int_t xm_thread_queue_init(lua_State* lua) tb_assert_and_check_break(thread_queue); thread_queue->refn = 1; - thread_queue->handle = tb_queue_init(0, tb_element_mem(sizeof(xm_thread_queue_item_t), xm_thread_queue_item_free, tb_null)); + thread_queue->handle = tb_queue_init(0, tb_element_mem(sizeof(xm_thread_value_t), xm_thread_value_free, tb_null)); tb_assert_and_check_break(thread_queue->handle); xm_lua_pushpointer(lua, (tb_pointer_t)thread_queue); |
