aboutsummaryrefslogtreecommitdiff
path: root/lapi.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2009-11-09 16:29:21 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2009-11-09 16:29:21 -0200
commit88eb901f81d647714d14b6f7e7c6455b46a27daa (patch)
tree3b37badf9c1d6d130a467ad586a816649984e6c7 /lapi.c
parent2583bac3d3dbbe8e5f532c93f33e2c9358b850c1 (diff)
downloadlua-88eb901f81d647714d14b6f7e7c6455b46a27daa.tar.gz
lua-88eb901f81d647714d14b6f7e7c6455b46a27daa.tar.bz2
lua-88eb901f81d647714d14b6f7e7c6455b46a27daa.zip
registry and global table may be changed through the API without a
write barrier, so GC should visit them in the atomic phase.
Diffstat (limited to 'lapi.c')
-rw-r--r--lapi.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/lapi.c b/lapi.c
index c43f601e..a8eb128c 100644
--- a/lapi.c
+++ b/lapi.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lapi.c,v 2.96 2009/11/05 17:26:00 roberto Exp roberto $ 2** $Id: lapi.c,v 2.97 2009/11/06 17:03:37 roberto Exp roberto $
3** Lua API 3** Lua API
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -199,7 +199,8 @@ static void moveto (lua_State *L, TValue *fr, int idx) {
199 if (idx < LUA_GLOBALSINDEX) /* function upvalue? */ 199 if (idx < LUA_GLOBALSINDEX) /* function upvalue? */
200 luaC_barrier(L, curr_func(L), fr); 200 luaC_barrier(L, curr_func(L), fr);
201 } 201 }
202 /* LUA_GLOBALSINDEX does not need gc barrier (threads are never black) */ 202 /* LUA_GLOBALSINDEX and LUA_REGISTRYINDEX do not need gc barrier
203 (collector revisits them before finishing collection) */
203} 204}
204 205
205 206