aboutsummaryrefslogtreecommitdiff
path: root/ltests.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2014-02-18 10:46:26 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2014-02-18 10:46:26 -0300
commit3f78de256e5759669460c6fa14455303762f2f53 (patch)
tree287ae3d2ccf441b4158f7a2e29feb21c39188711 /ltests.c
parentd764cc552251fc69207c1bb4b34d3a6a5b7020c6 (diff)
downloadlua-3f78de256e5759669460c6fa14455303762f2f53.tar.gz
lua-3f78de256e5759669460c6fa14455303762f2f53.tar.bz2
lua-3f78de256e5759669460c6fa14455303762f2f53.zip
no need to keep threads in a different GC list, now that there is the
'twups' list
Diffstat (limited to 'ltests.c')
-rw-r--r--ltests.c20
1 files changed, 5 insertions, 15 deletions
diff --git a/ltests.c b/ltests.c
index 5abe598c..931fc1c8 100644
--- a/ltests.c
+++ b/ltests.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: ltests.c,v 2.164 2014/02/13 12:11:34 roberto Exp roberto $ 2** $Id: ltests.c,v 2.165 2014/02/15 13:12:01 roberto Exp roberto $
3** Internal Module for Debugging of the Lua Implementation 3** Internal Module for Debugging of the Lua Implementation
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -426,14 +426,6 @@ int lua_checkmemory (lua_State *L) {
426 checkobject(g, o, maybedead); 426 checkobject(g, o, maybedead);
427 lua_assert(!tofinalize(o)); 427 lua_assert(!tofinalize(o));
428 } 428 }
429 /* check thread list */
430 checkgray(g, obj2gco(g->mainthread));
431 maybedead = (GCSatomic < g->gcstate && g->gcstate <= GCSswpthreads);
432 for (o = obj2gco(g->mainthread); o != NULL; o = gch(o)->next) {
433 checkobject(g, o, maybedead);
434 lua_assert(!tofinalize(o));
435 lua_assert(gch(o)->tt == LUA_TTHREAD);
436 }
437 /* check 'finobj' list */ 429 /* check 'finobj' list */
438 checkgray(g, g->finobj); 430 checkgray(g, g->finobj);
439 for (o = g->finobj; o != NULL; o = gch(o)->next) { 431 for (o = g->finobj; o != NULL; o = gch(o)->next) {
@@ -615,12 +607,10 @@ static int gc_color (lua_State *L) {
615 607
616 608
617static int gc_state (lua_State *L) { 609static int gc_state (lua_State *L) {
618 static const char *statenames[] = {"propagate", "atomic", 610 static const char *statenames[] = {"propagate", "atomic", "sweepallgc",
619 "sweepallgc", "sweepthreads", "sweepfinobj", 611 "sweepfinobj", "sweeptobefnz", "sweepend", "pause", ""};
620 "sweeptobefnz", "sweepend", "pause", ""}; 612 static const int states[] = {GCSpropagate, GCSatomic, GCSswpallgc,
621 static const int states[] = {GCSpropagate, GCSatomic, 613 GCSswpfinobj, GCSswptobefnz, GCSswpend, GCSpause, -1};
622 GCSswpallgc, GCSswpthreads, GCSswpfinobj,
623 GCSswptobefnz, GCSswpend, GCSpause, -1};
624 int option = states[luaL_checkoption(L, 1, "", statenames)]; 614 int option = states[luaL_checkoption(L, 1, "", statenames)];
625 if (option == -1) { 615 if (option == -1) {
626 lua_pushstring(L, statenames[G(L)->gcstate]); 616 lua_pushstring(L, statenames[G(L)->gcstate]);