diff options
Diffstat (limited to 'src/lanes.c')
-rw-r--r-- | src/lanes.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/lanes.c b/src/lanes.c index f43a2e6..f0a5697 100644 --- a/src/lanes.c +++ b/src/lanes.c | |||
@@ -963,7 +963,6 @@ LUAG_FUNC( linda_cancel) | |||
963 | { | 963 | { |
964 | struct s_Linda* linda = lua_toLinda( L, 1); | 964 | struct s_Linda* linda = lua_toLinda( L, 1); |
965 | char const* who = luaL_optstring( L, 2, "both"); | 965 | char const* who = luaL_optstring( L, 2, "both"); |
966 | Keeper* K = which_keeper( linda->U->keepers, LINDA_KEEPER_HASHSEED( linda)); | ||
967 | 966 | ||
968 | // make sure we got 3 arguments: the linda, a key and a limit | 967 | // make sure we got 3 arguments: the linda, a key and a limit |
969 | luaL_argcheck( L, lua_gettop( L) <= 2, 2, "wrong number of arguments"); | 968 | luaL_argcheck( L, lua_gettop( L) <= 2, 2, "wrong number of arguments"); |
@@ -1255,7 +1254,6 @@ static void* linda_id( lua_State* L, DeepOp op_) | |||
1255 | lua_setfield( L, -2, "get"); | 1254 | lua_setfield( L, -2, "get"); |
1256 | 1255 | ||
1257 | lua_pushcfunction( L, LG_linda_cancel); | 1256 | lua_pushcfunction( L, LG_linda_cancel); |
1258 | lua_pushcclosure( L, LG_linda_protected_call, 1); | ||
1259 | lua_setfield( L, -2, "cancel"); | 1257 | lua_setfield( L, -2, "cancel"); |
1260 | 1258 | ||
1261 | lua_pushcfunction( L, LG_linda_deep); | 1259 | lua_pushcfunction( L, LG_linda_deep); |
@@ -1515,6 +1513,9 @@ static cancel_result thread_cancel( lua_State* L, Lane* s, double secs, bool_t f | |||
1515 | { | 1513 | { |
1516 | return luaL_error( L, "force-killed lane failed to terminate within %f second%s", waitkill_timeout_, waitkill_timeout_ > 1 ? "s" : ""); | 1514 | return luaL_error( L, "force-killed lane failed to terminate within %f second%s", waitkill_timeout_, waitkill_timeout_ > 1 ? "s" : ""); |
1517 | } | 1515 | } |
1516 | #else | ||
1517 | (void) waitkill_timeout_; // unused | ||
1518 | (void) L; // unused | ||
1518 | #endif // THREADAPI == THREADAPI_PTHREAD | 1519 | #endif // THREADAPI == THREADAPI_PTHREAD |
1519 | s->mstatus = KILLED; // mark 'gc' to wait for it | 1520 | s->mstatus = KILLED; // mark 'gc' to wait for it |
1520 | // note that s->status value must remain to whatever it was at the time of the kill | 1521 | // note that s->status value must remain to whatever it was at the time of the kill |
@@ -1809,14 +1810,13 @@ LUAG_FUNC( set_singlethreaded) | |||
1809 | } | 1810 | } |
1810 | // requires 'chudInitialize()' | 1811 | // requires 'chudInitialize()' |
1811 | utilBindThreadToCPU(0); // # of CPU to run on (we cannot limit to 2..N CPUs?) | 1812 | utilBindThreadToCPU(0); // # of CPU to run on (we cannot limit to 2..N CPUs?) |
1813 | return 0; | ||
1812 | #else | 1814 | #else |
1813 | return luaL_error( L, "Not available: compile with _UTILBINDTHREADTOCPU"); | 1815 | return luaL_error( L, "Not available: compile with _UTILBINDTHREADTOCPU"); |
1814 | #endif | 1816 | #endif |
1815 | #else | 1817 | #else |
1816 | return luaL_error( L, "not implemented"); | 1818 | return luaL_error( L, "not implemented"); |
1817 | #endif | 1819 | #endif |
1818 | |||
1819 | return 0; | ||
1820 | } | 1820 | } |
1821 | 1821 | ||
1822 | 1822 | ||
@@ -2204,7 +2204,6 @@ LUAG_FUNC( require) | |||
2204 | LUAG_FUNC( register) | 2204 | LUAG_FUNC( register) |
2205 | { | 2205 | { |
2206 | char const* name = luaL_checkstring( L, 1); | 2206 | char const* name = luaL_checkstring( L, 1); |
2207 | int const nargs = lua_gettop( L); | ||
2208 | int const mod_type = lua_type( L, 2); | 2207 | int const mod_type = lua_type( L, 2); |
2209 | // ignore extra parameters, just in case | 2208 | // ignore extra parameters, just in case |
2210 | lua_settop( L, 2); | 2209 | lua_settop( L, 2); |
@@ -3179,7 +3178,7 @@ LUAG_FUNC( configure) | |||
3179 | STACK_MID( L, 0); | 3178 | STACK_MID( L, 0); |
3180 | 3179 | ||
3181 | // Serialize calls to 'require' from now on, also in the primary state | 3180 | // Serialize calls to 'require' from now on, also in the primary state |
3182 | serialize_require( U, L); | 3181 | serialize_require( DEBUGSPEW_PARAM_COMMA( U) L); |
3183 | 3182 | ||
3184 | // Retrieve main module interface table | 3183 | // Retrieve main module interface table |
3185 | lua_pushvalue( L, lua_upvalueindex( 2)); // settings M | 3184 | lua_pushvalue( L, lua_upvalueindex( 2)); // settings M |