33static int LuaUtilThreadInfo(
lua_State *luastate)
41 lua_newtable(luastate);
43 lua_pushstring(luastate,
"id");
44 lua_pushinteger(luastate, (lua_Integer)tid);
45 lua_settable(luastate, -3);
47 lua_pushstring(luastate,
"name");
48 lua_pushstring(luastate,
tv->
name);
49 lua_settable(luastate, -3);
51 lua_pushstring(luastate,
"group_name");
53 lua_settable(luastate, -3);
58static const struct luaL_Reg utillib[] = {
59 {
"thread_info", LuaUtilThreadInfo },
65 luaL_newlib(L, utillib);
Per thread variable structure.
struct lua_State lua_State
#define SCGetThreadIdLong(...)
int LuaCallbackError(lua_State *luastate, const char *msg)
int SCLuaLoadUtilLib(lua_State *L)
ThreadVars * LuaStateGetThreadVars(lua_State *luastate)
get tv pointer from the lua state