From 49ef9d50d475921aab0c50b13b857f8cb990fcc0 Mon Sep 17 00:00:00 2001 From: Benoit Germain Date: Wed, 9 Mar 2022 14:11:21 +0100 Subject: moonjit support --- src/compat.h | 25 +++++++++++++++++++++++++ src/keeper.c | 12 ++++++------ src/lanes.c | 44 ++++++++++++++++++++++---------------------- src/lanes_private.h | 5 +++-- src/linda.c | 12 ++++++------ src/macros_and_utils.h | 20 +++++--------------- src/state.c | 15 ++++++++------- src/tools.c | 4 ++-- src/uniquekey.h | 8 ++++---- src/universe.h | 11 ++++++----- 10 files changed, 87 insertions(+), 69 deletions(-) (limited to 'src') diff --git a/src/compat.h b/src/compat.h index eaa9f85..e44f827 100644 --- a/src/compat.h +++ b/src/compat.h @@ -5,13 +5,29 @@ #include "lualib.h" #include "lauxlib.h" +// try to detect if we are building against LuaJIT or MoonJIT +#if defined(LUA_JITLIBNAME) +#include "luajit.h" +#if (defined(__x86_64__) || defined(_M_X64) || defined(__LP64__)) +#define LUAJIT_FLAVOR() 64 +#else // 64 bits +#define LUAJIT_FLAVOR() 32 +#endif // 64 bits +#else // LUA_JITLIBNAME +#define LUAJIT_FLAVOR() 0 +#endif // LUA_JITLIBNAME + + // code is now preferring Lua 5.4 API // add some Lua 5.3-style API when building for Lua 5.1 #if LUA_VERSION_NUM == 501 + #define lua501_equal lua_equal #define lua_absindex( L, idx) (((idx) >= 0 || (idx) <= LUA_REGISTRYINDEX) ? (idx) : lua_gettop(L) + (idx) +1) +#if LUAJIT_VERSION_NUM < 20200 // moonjit is 5.1 plus bits of 5.2 that we don't need to wrap #define lua_pushglobaltable(L) lua_pushvalue( L, LUA_GLOBALSINDEX) +#endif // LUAJIT_VERSION_NUM #define lua_setuservalue lua_setfenv #define lua_getuservalue lua_getfenv #define lua_rawlen lua_objlen @@ -21,10 +37,12 @@ void luaL_requiref (lua_State* L, const char* modname, lua_CFunction openf, int glb); // implementation copied from Lua 5.2 sources #define lua504_dump( L, writer, data, strip) lua_dump( L, writer, data) #define LUA_LOADED_TABLE "_LOADED" // // doesn't exist in Lua 5.1 + #endif // LUA_VERSION_NUM == 501 // wrap Lua 5.2 calls under Lua 5.1 API when it is simpler that way #if LUA_VERSION_NUM == 502 + #ifndef lua501_equal // already defined when compatibility is active in luaconf.h #define lua501_equal( L, a, b) lua_compare( L, a, b, LUA_OPEQ) #endif // lua501_equal @@ -34,10 +52,12 @@ void luaL_requiref (lua_State* L, const char* modname, lua_CFunction openf, int #define luaG_registerlibfuncs( L, _funcs) luaL_setfuncs( L, _funcs, 0) #define lua504_dump( L, writer, data, strip) lua_dump( L, writer, data) #define LUA_LOADED_TABLE "_LOADED" // // doesn't exist in Lua 5.2 + #endif // LUA_VERSION_NUM == 502 // wrap Lua 5.3 calls under Lua 5.1 API when it is simpler that way #if LUA_VERSION_NUM == 503 + #ifndef lua501_equal // already defined when compatibility is active in luaconf.h #define lua501_equal( L, a, b) lua_compare( L, a, b, LUA_OPEQ) #endif // lua501_equal @@ -47,16 +67,20 @@ void luaL_requiref (lua_State* L, const char* modname, lua_CFunction openf, int #define luaG_registerlibfuncs( L, _funcs) luaL_setfuncs( L, _funcs, 0) #define lua504_dump lua_dump #define luaL_optint(L,n,d) ((int)luaL_optinteger(L, (n), (d))) + #endif // LUA_VERSION_NUM == 503 #if LUA_VERSION_NUM < 504 + void *lua_newuserdatauv( lua_State* L, size_t sz, int nuvalue); int lua_getiuservalue( lua_State* L, int idx, int n); int lua_setiuservalue( lua_State* L, int idx, int n); + #endif // LUA_VERSION_NUM < 504 // wrap Lua 5.4 calls under Lua 5.1 API when it is simpler that way #if LUA_VERSION_NUM == 504 + #ifndef lua501_equal // already defined when compatibility is active in luaconf.h #define lua501_equal( L, a, b) lua_compare( L, a, b, LUA_OPEQ) #endif // lua501_equal @@ -66,6 +90,7 @@ int lua_setiuservalue( lua_State* L, int idx, int n); #define luaG_registerlibfuncs( L, _funcs) luaL_setfuncs( L, _funcs, 0) #define lua504_dump lua_dump #define luaL_optint(L,n,d) ((int)luaL_optinteger(L, (n), (d))) + #endif // LUA_VERSION_NUM == 504 #endif // __COMPAT_H__ diff --git a/src/keeper.c b/src/keeper.c index 3211c1b..19b9e1a 100644 --- a/src/keeper.c +++ b/src/keeper.c @@ -612,14 +612,14 @@ void close_keepers( Universe* U, lua_State* L) // free the keeper bookkeeping structure { // don't hijack the state allocator when running LuaJIT because it looks like LuaJIT does not expect it and might invalidate the memory unexpectedly -#if USE_LUA_STATE_ALLOCATOR +#if USE_LUA_STATE_ALLOCATOR() { AllocatorDefinition* const allocD = &U->protected_allocator.definition; allocD->allocF( allocD->allocUD, U->keepers, sizeof( Keepers) + (nbKeepers - 1) * sizeof( Keeper), 0); } -#else // USE_LUA_STATE_ALLOCATOR +#else // USE_LUA_STATE_ALLOCATOR() free(U->keepers); -#endif // USE_LUA_STATE_ALLOCATOR +#endif // USE_LUA_STATE_ALLOCATOR() U->keepers = NULL; } } @@ -654,14 +654,14 @@ void init_keepers( Universe* U, lua_State* L) { size_t const bytes = sizeof( Keepers) + (nb_keepers - 1) * sizeof( Keeper); // don't hijack the state allocator when running LuaJIT because it looks like LuaJIT does not expect it and might invalidate the memory unexpectedly -#if USE_LUA_STATE_ALLOCATOR +#if USE_LUA_STATE_ALLOCATOR() { AllocatorDefinition* const allocD = &U->protected_allocator.definition; U->keepers = (Keepers*) allocD->allocF( allocD->allocUD, NULL, 0, bytes); } -#else // USE_LUA_STATE_ALLOCATOR +#else // USE_LUA_STATE_ALLOCATOR() U->keepers = (Keepers*)malloc(bytes); -#endif // USE_LUA_STATE_ALLOCATOR +#endif // USE_LUA_STATE_ALLOCATOR() if( U->keepers == NULL) { (void) luaL_error( L, "init_keepers() failed while creating keeper array; out of memory"); diff --git a/src/lanes.c b/src/lanes.c index f702685..cd1d4f1 100644 --- a/src/lanes.c +++ b/src/lanes.c @@ -174,7 +174,7 @@ static bool_t push_registry_table( lua_State* L, UniqueKey key, bool_t create) return TRUE; // table pushed } -#if HAVE_LANE_TRACKING +#if HAVE_LANE_TRACKING() // The chain is ended by '(Lane*)(-1)', not NULL: // 'tracking_first -> ... -> ... -> (-1)' @@ -231,7 +231,7 @@ static bool_t tracking_remove( Lane* s) return found; } -#endif // HAVE_LANE_TRACKING +#endif // HAVE_LANE_TRACKING() //--- // low-level cleanup @@ -245,23 +245,23 @@ static void lane_cleanup( Lane* s) MUTEX_FREE( &s->done_lock); #endif // THREADWAIT_METHOD == THREADWAIT_CONDVAR -#if HAVE_LANE_TRACKING +#if HAVE_LANE_TRACKING() if( s->U->tracking_first != NULL) { // Lane was cleaned up, no need to handle at process termination tracking_remove( s); } -#endif // HAVE_LANE_TRACKING +#endif // HAVE_LANE_TRACKING() // don't hijack the state allocator when running LuaJIT because it looks like LuaJIT does not expect it and might invalidate the memory unexpectedly -#if USE_LUA_STATE_ALLOCATOR +#if USE_LUA_STATE_ALLOCATOR() { AllocatorDefinition* const allocD = &s->U->protected_allocator.definition; allocD->allocF(allocD->allocUD, s, sizeof(Lane), 0); } -#else // USE_LUA_STATE_ALLOCATOR +#else // USE_LUA_STATE_ALLOCATOR() free(s); -#endif // USE_LUA_STATE_ALLOCATOR +#endif // USE_LUA_STATE_ALLOCATOR() } /* @@ -589,9 +589,9 @@ static int selfdestruct_gc( lua_State* L) // remove the protected allocator, if any cleanup_allocator_function( U, L); -#if HAVE_LANE_TRACKING +#if HAVE_LANE_TRACKING() MUTEX_FREE( &U->tracking_cs); -#endif // HAVE_LANE_TRACKING +#endif // HAVE_LANE_TRACKING() // Linked chains handling MUTEX_FREE( &U->selfdestruct_cs); MUTEX_FREE( &U->require_cs); @@ -844,7 +844,7 @@ LUAG_FUNC( set_thread_affinity) return 0; } -#if USE_DEBUG_SPEW +#if USE_DEBUG_SPEW() // can't use direct LUA_x errcode indexing because the sequence is not the same between Lua 5.1 and 5.2 :-( // LUA_ERRERR doesn't have the same value struct errcode_name @@ -875,7 +875,7 @@ static char const* get_errcode_name( int _code) } return ""; } -#endif // USE_DEBUG_SPEW +#endif // USE_DEBUG_SPEW() #if THREADWAIT_METHOD == THREADWAIT_CONDVAR // implies THREADAPI == THREADAPI_PTHREAD static void thread_cleanup_handler( void* opaque) @@ -1231,14 +1231,14 @@ LUAG_FUNC( lane_new) // a Lane full userdata needs a single uservalue ud = lua_newuserdatauv( L, sizeof( Lane*), 1); // func libs priority globals package required gc_cb lane // don't hijack the state allocator when running LuaJIT because it looks like LuaJIT does not expect it and might invalidate the memory unexpectedly -#if USE_LUA_STATE_ALLOCATOR +#if USE_LUA_STATE_ALLOCATOR() { AllocatorDefinition* const allocD = &U->protected_allocator.definition; s = *ud = (Lane*)allocD->allocF(allocD->allocUD, NULL, 0, sizeof(Lane)); } -#else // USE_LUA_STATE_ALLOCATOR +#else // USE_LUA_STATE_ALLOCATOR() s = *ud = (Lane*) malloc(sizeof(Lane)); -#endif // USE_LUA_STATE_ALLOCATOR +#endif // USE_LUA_STATE_ALLOCATOR() if( s == NULL) { return luaL_error( L, "could not create lane: out of memory"); @@ -1257,13 +1257,13 @@ LUAG_FUNC( lane_new) #endif // THREADWAIT_METHOD == THREADWAIT_CONDVAR s->mstatus = NORMAL; s->selfdestruct_next = NULL; -#if HAVE_LANE_TRACKING +#if HAVE_LANE_TRACKING() s->tracking_next = NULL; if( s->U->tracking_first) { tracking_add( s); } -#endif // HAVE_LANE_TRACKING +#endif // HAVE_LANE_TRACKING() // Set metatable for the userdata // @@ -1662,7 +1662,7 @@ LUAG_FUNC( thread_index) return 0; } -#if HAVE_LANE_TRACKING +#if HAVE_LANE_TRACKING() //--- // threads() -> {}|nil // @@ -1695,7 +1695,7 @@ LUAG_FUNC( threads) MUTEX_UNLOCK( &U->tracking_cs); return lua_gettop( L) - top; // 0 or 1 } -#endif // HAVE_LANE_TRACKING +#endif // HAVE_LANE_TRACKING() /* * ############################################################################################### @@ -1893,12 +1893,12 @@ LUAG_FUNC( configure) lua_getfield( L, 1, "demote_full_userdata"); // settings demote_full_userdata U->demoteFullUserdata = lua_toboolean( L, -1); lua_pop( L, 1); // settings -#if HAVE_LANE_TRACKING +#if HAVE_LANE_TRACKING() MUTEX_INIT( &U->tracking_cs); lua_getfield( L, 1, "track_lanes"); // settings track_lanes U->tracking_first = lua_toboolean( L, -1) ? TRACKING_END : NULL; lua_pop( L, 1); // settings -#endif // HAVE_LANE_TRACKING +#endif // HAVE_LANE_TRACKING() // Linked chains handling MUTEX_INIT( &U->selfdestruct_cs); MUTEX_RECURSIVE_INIT( &U->require_cs); @@ -1935,14 +1935,14 @@ LUAG_FUNC( configure) lua_setfield( L, -2, "configure"); // settings M // add functions to the module's table luaG_registerlibfuncs( L, lanes_functions); -#if HAVE_LANE_TRACKING +#if HAVE_LANE_TRACKING() // register core.threads() only if settings say it should be available if( U->tracking_first != NULL) { lua_pushcfunction( L, LG_threads); // settings M LG_threads() lua_setfield( L, -2, "threads"); // settings M } -#endif // HAVE_LANE_TRACKING +#endif // HAVE_LANE_TRACKING() STACK_MID( L, 2); { diff --git a/src/lanes_private.h b/src/lanes_private.h index 7da3286..6717fe0 100644 --- a/src/lanes_private.h +++ b/src/lanes_private.h @@ -3,6 +3,7 @@ #include "uniquekey.h" #include "cancel.h" +#include "universe.h" // NOTE: values to be changed by either thread, during execution, without // locking, are marked "volatile" @@ -63,9 +64,9 @@ struct s_Lane // is still running // S: cleans up after itself if non-NULL at lane exit -#if HAVE_LANE_TRACKING +#if HAVE_LANE_TRACKING() struct s_Lane* volatile tracking_next; -#endif // HAVE_LANE_TRACKING +#endif // HAVE_LANE_TRACKING() // // For tracking only }; diff --git a/src/linda.c b/src/linda.c index 42cda51..637f909 100644 --- a/src/linda.c +++ b/src/linda.c @@ -795,16 +795,16 @@ static void* linda_id( lua_State* L, DeepOp op_) * just don't use L's allocF because we don't know which state will get the honor of GCing the linda */ // don't hijack the state allocator when running LuaJIT because it looks like LuaJIT does not expect it and might invalidate the memory unexpectedly -#if USE_LUA_STATE_ALLOCATOR +#if USE_LUA_STATE_ALLOCATOR() { Universe* const U = universe_get(L); AllocatorDefinition* const allocD = &U->protected_allocator.definition; s = (struct s_Linda*)allocD->allocF(allocD->allocUD, NULL, 0, sizeof(struct s_Linda) + name_len); // terminating 0 is already included } -#else // USE_LUA_STATE_ALLOCATOR +#else // USE_LUA_STATE_ALLOCATOR() s = (struct s_Linda*)malloc(sizeof(struct s_Linda) + name_len); // terminating 0 is already included -#endif // USE_LUA_STATE_ALLOCATOR +#endif // USE_LUA_STATE_ALLOCATOR() if( s) { s->prelude.magic.value = DEEP_VERSION.value; @@ -838,16 +838,16 @@ static void* linda_id( lua_State* L, DeepOp op_) SIGNAL_FREE( &linda->read_happened); SIGNAL_FREE( &linda->write_happened); // don't hijack the state allocator when running LuaJIT because it looks like LuaJIT does not expect it and might invalidate the memory unexpectedly -#if USE_LUA_STATE_ALLOCATOR +#if USE_LUA_STATE_ALLOCATOR() { Universe* const U = universe_get(L); AllocatorDefinition* const allocD = &U->protected_allocator.definition; allocD->allocF(allocD->allocUD, linda, sizeof(struct s_Linda) + strlen(linda->name), 0); } -#else // USE_LUA_STATE_ALLOCATOR +#else // USE_LUA_STATE_ALLOCATOR() free(linda); -#endif // USE_LUA_STATE_ALLOCATOR +#endif // USE_LUA_STATE_ALLOCATOR() return NULL; } diff --git a/src/macros_and_utils.h b/src/macros_and_utils.h index e8e725b..3ed234a 100644 --- a/src/macros_and_utils.h +++ b/src/macros_and_utils.h @@ -12,19 +12,19 @@ #define inline __inline #endif -#define USE_DEBUG_SPEW 0 -#if USE_DEBUG_SPEW +#define USE_DEBUG_SPEW() 0 +#if USE_DEBUG_SPEW() extern char const* debugspew_indent; #define INDENT_BEGIN "%.*s " #define INDENT_END , (U ? U->debugspew_indent_depth : 0), debugspew_indent #define DEBUGSPEW_CODE(_code) _code #define DEBUGSPEW_PARAM_COMMA( param_) param_, #define DEBUGSPEW_COMMA_PARAM( param_) , param_ -#else // USE_DEBUG_SPEW +#else // USE_DEBUG_SPEW() #define DEBUGSPEW_CODE(_code) #define DEBUGSPEW_PARAM_COMMA( param_) #define DEBUGSPEW_COMMA_PARAM( param_) -#endif // USE_DEBUG_SPEW +#endif // USE_DEBUG_SPEW() #ifdef NDEBUG @@ -99,17 +99,7 @@ extern char const* debugspew_indent; #define LUAG_FUNC( func_name) int LG_##func_name( lua_State* L) -#if defined(LUA_JITLIBNAME) -#if (defined(__x86_64__) || defined(_M_X64) || defined(__LP64__)) -#define LUAJIT_FLAVOR 64 -#else // 64 bits -#define LUAJIT_FLAVOR 32 -#endif // 64 bits -#else // LUA_JITLIBNAME -#define LUAJIT_FLAVOR 0 -#endif // LUA_JITLIBNAME - // after all, it looks like we can use the state allocator for our own usage when running LuaJIT, as long as we mutex-protect it -#define USE_LUA_STATE_ALLOCATOR 1 // (LUAJIT_FLAVOR==0) +#define USE_LUA_STATE_ALLOCATOR() 1 // (LUAJIT_FLAVOR()==0) #endif // MACROS_AND_UTILS_H diff --git a/src/state.c b/src/state.c index a2de5cb..ef70842 100644 --- a/src/state.c +++ b/src/state.c @@ -41,6 +41,7 @@ THE SOFTWARE. #endif // __APPLE__ #include "compat.h" +#include "macros_and_utils.h" #include "universe.h" #include "tools.h" #include "lanes.h" @@ -148,12 +149,12 @@ static const luaL_Reg libs[] = { LUA_COLIBNAME, NULL}, // Lua 5.1: part of base package #endif // LUA_VERSION_NUM { LUA_DBLIBNAME, luaopen_debug}, -#if LUAJIT_FLAVOR != 0 // building against LuaJIT headers, add some LuaJIT-specific libs +#if LUAJIT_FLAVOR() != 0 // building against LuaJIT headers, add some LuaJIT-specific libs //#pragma message( "supporting JIT base libs") { LUA_BITLIBNAME, luaopen_bit}, { LUA_JITLIBNAME, luaopen_jit}, { LUA_FFILIBNAME, luaopen_ffi}, -#endif // LUAJIT_FLAVOR +#endif // LUAJIT_FLAVOR() { LUA_DBLIBNAME, luaopen_debug}, { "lanes.core", require_lanes_core}, // So that we can open it like any base library (possible since we have access to the init function) @@ -249,10 +250,10 @@ void initialize_on_state_create( Universe* U, lua_State* L) lua_State* create_state( Universe* U, lua_State* from_) { lua_State* L; -#if LUAJIT_FLAVOR == 64 +#if LUAJIT_FLAVOR() == 64 // for some reason, LuaJIT 64 bits does not support creating a state with lua_newstate... L = luaL_newstate(); -#else // LUAJIT_FLAVOR == 64 +#else // LUAJIT_FLAVOR() == 64 if( U->provide_allocator != NULL) // we have a function we can call to obtain an allocator { lua_pushcclosure( from_, U->provide_allocator, 0); @@ -268,7 +269,7 @@ lua_State* create_state( Universe* U, lua_State* from_) // reuse the allocator provided when the master state was created L = lua_newstate( U->protected_allocator.definition.allocF, U->protected_allocator.definition.allocUD); } -#endif // LUAJIT_FLAVOR == 64 +#endif // LUAJIT_FLAVOR() == 64 if( L == NULL) { @@ -418,7 +419,7 @@ lua_State* luaG_newstate( Universe* U, lua_State* from_, char const* libs_) lua_pushglobaltable( L); // Lua 5.2 no longer has LUA_GLOBALSINDEX: we must push globals table on the stack populate_func_lookup_table( L, -1, NULL); -#if 0 && USE_DEBUG_SPEW +#if 0 && USE_DEBUG_SPEW() // dump the lookup database contents lua_getfield( L, LUA_REGISTRYINDEX, LOOKUP_REGKEY); // {} lua_pushnil( L); // {} nil @@ -432,7 +433,7 @@ lua_State* luaG_newstate( Universe* U, lua_State* from_, char const* libs_) lua_pop( L, 1); // {} k } lua_pop( L, 1); // {} -#endif // USE_DEBUG_SPEW +#endif // USE_DEBUG_SPEW() lua_pop( L, 1); STACK_END( L, 0); diff --git a/src/tools.c b/src/tools.c index 2c8a9f0..626da2b 100644 --- a/src/tools.c +++ b/src/tools.c @@ -1117,7 +1117,7 @@ static void lookup_native_func( lua_State* L2, lua_State* L, uint_t i, LookupMod * L2 has the cache key for this function at the top of the stack */ -#if USE_DEBUG_SPEW +#if USE_DEBUG_SPEW() static char const* lua_type_names[] = { "LUA_TNIL" @@ -1138,7 +1138,7 @@ static char const* vt_names[] = , "VT_KEY" , "VT_METATABLE" }; -#endif // USE_DEBUG_SPEW +#endif // USE_DEBUG_SPEW() // Lua 5.4.3 style of dumping (see lstrlib.c) // we have to do it that way because we can't unbalance the stack between buffer operations diff --git a/src/uniquekey.h b/src/uniquekey.h index a72426c..015fbf2 100644 --- a/src/uniquekey.h +++ b/src/uniquekey.h @@ -1,7 +1,7 @@ #if !defined __LANES_UNIQUEKEY_H__ #define __LANES_UNIQUEKEY_H__ 1 -#include "macros_and_utils.h" +#include "compat.h" // Lua light userdata can hold a pointer. struct s_UniqueKey @@ -10,11 +10,11 @@ struct s_UniqueKey }; typedef struct s_UniqueKey UniqueKey; -#if LUAJIT_FLAVOR == 64 // building against LuaJIT headers for 64 bits, light userdata is restricted to 47 significant bits, because LuaJIT uses the other bits for internal optimizations +#if LUAJIT_FLAVOR() == 64 // building against LuaJIT headers for 64 bits, light userdata is restricted to 47 significant bits, because LuaJIT uses the other bits for internal optimizations #define MAKE_UNIQUE_KEY( p_) ((void*)((ptrdiff_t)(p_) & 0x7fffffffffffull)) -#else // LUAJIT_FLAVOR +#else // LUAJIT_FLAVOR() #define MAKE_UNIQUE_KEY( p_) ((void*)(ptrdiff_t)(p_)) -#endif // LUAJIT_FLAVOR +#endif // LUAJIT_FLAVOR() #define DECLARE_UNIQUE_KEY( name_) UniqueKey name_ #define DECLARE_CONST_UNIQUE_KEY( name_, p_) UniqueKey const name_ = { MAKE_UNIQUE_KEY( p_)} diff --git a/src/universe.h b/src/universe.h index e4c1191..ba00e87 100644 --- a/src/universe.h +++ b/src/universe.h @@ -6,6 +6,7 @@ #include "lua.h" #include "threading.h" +#include "macros_and_utils.h" // forwards struct s_DeepPrelude; @@ -20,7 +21,7 @@ typedef struct s_Lane Lane; /* * Do we want to activate full lane tracking feature? (EXPERIMENTAL) */ -#define HAVE_LANE_TRACKING 1 +#define HAVE_LANE_TRACKING() 1 // ################################################################################################ @@ -68,10 +69,10 @@ struct s_Universe // used for timers (each lane will get a proxy to this) volatile DeepPrelude* timer_deep; // = NULL -#if HAVE_LANE_TRACKING +#if HAVE_LANE_TRACKING() MUTEX_T tracking_cs; Lane* volatile tracking_first; // will change to TRACKING_END if we want to activate tracking -#endif // HAVE_LANE_TRACKING +#endif // HAVE_LANE_TRACKING() MUTEX_T selfdestruct_cs; @@ -84,9 +85,9 @@ struct s_Universe lua_Integer last_mt_id; -#if USE_DEBUG_SPEW +#if USE_DEBUG_SPEW() int debugspew_indent_depth; -#endif // USE_DEBUG_SPEW +#endif // USE_DEBUG_SPEW() Lane* volatile selfdestruct_first; // After a lane has removed itself from the chain, it still performs some processing. -- cgit v1.2.3-55-g6feb