summaryrefslogtreecommitdiff
path: root/core/src/xmake/thread/semaphore_post.c
diff options
context:
space:
mode:
authorruki <[email protected]>2025-11-09 19:11:32 +0800
committerruki <[email protected]>2025-11-09 19:44:18 +0800
commitc89c94bf89e98c8e42e786aacc0b334a57474179 (patch)
tree60b4964d58a5289e1444b2375ec5db1a93eccdd6 /core/src/xmake/thread/semaphore_post.c
parent3f9c6f27ee8f99d5c4393433e8863fec93da43e7 (diff)
format code
Diffstat (limited to 'core/src/xmake/thread/semaphore_post.c')
-rw-r--r--core/src/xmake/thread/semaphore_post.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/core/src/xmake/thread/semaphore_post.c b/core/src/xmake/thread/semaphore_post.c
index 9ca94bda5..d709e5a5e 100644
--- a/core/src/xmake/thread/semaphore_post.c
+++ b/core/src/xmake/thread/semaphore_post.c
@@ -22,8 +22,8 @@
/* //////////////////////////////////////////////////////////////////////////////////////
* trace
*/
-#define TB_TRACE_MODULE_NAME "thread_semaphore"
-#define TB_TRACE_MODULE_DEBUG (0)
+#define TB_TRACE_MODULE_NAME "thread_semaphore"
+#define TB_TRACE_MODULE_DEBUG (0)
/* //////////////////////////////////////////////////////////////////////////////////////
* includes
@@ -33,15 +33,13 @@
/* //////////////////////////////////////////////////////////////////////////////////////
* implementation
*/
-tb_int_t xm_thread_semaphore_post(lua_State* lua)
-{
+tb_int_t xm_thread_semaphore_post(lua_State *lua) {
tb_assert_and_check_return_val(lua, 0);
- xm_thread_semaphore_t* thread_semaphore = xm_thread_semaphore_get(lua, 1);
+ xm_thread_semaphore_t *thread_semaphore = xm_thread_semaphore_get(lua, 1);
tb_assert_and_check_return_val(thread_semaphore && thread_semaphore->handle, 0);
tb_long_t value = (tb_long_t)luaL_checknumber(lua, 2);
lua_pushboolean(lua, tb_semaphore_post(thread_semaphore->handle, value));
return 1;
}
-