aboutsummaryrefslogtreecommitdiff
path: root/lgc.h
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2010-05-10 13:46:49 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2010-05-10 13:46:49 -0300
commitc006f085d98923e505c7fe8909944d3c182f8301 (patch)
tree4ebfc327b86d74ce18e316f24c28e18564c9160b /lgc.h
parenta48e330f37c06ec733234f96421a17e89ec61145 (diff)
downloadlua-c006f085d98923e505c7fe8909944d3c182f8301.tar.gz
lua-c006f085d98923e505c7fe8909944d3c182f8301.tar.bz2
lua-c006f085d98923e505c7fe8909944d3c182f8301.zip
new macro 'resetoldbit'
Diffstat (limited to 'lgc.h')
-rw-r--r--lgc.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/lgc.h b/lgc.h
index c8aed91c..938a1d49 100644
--- a/lgc.h
+++ b/lgc.h
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lgc.h,v 2.38 2010/05/07 18:08:05 roberto Exp roberto $ 2** $Id: lgc.h,v 2.39 2010/05/07 18:43:51 roberto Exp roberto $
3** Garbage Collector 3** Garbage Collector
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -80,6 +80,7 @@
80#define SEPARATED 4 /* " ": it's in 'udgc' list or in 'tobefnz' */ 80#define SEPARATED 4 /* " ": it's in 'udgc' list or in 'tobefnz' */
81#define FIXEDBIT 5 /* object is fixed (should not be collected) */ 81#define FIXEDBIT 5 /* object is fixed (should not be collected) */
82#define OLDBIT 6 /* object is old (only in generational mode) */ 82#define OLDBIT 6 /* object is old (only in generational mode) */
83/* bit 7 is currently used by tests (luaL_checkmemory) */
83 84
84#define WHITEBITS bit2mask(WHITE0BIT, WHITE1BIT) 85#define WHITEBITS bit2mask(WHITE0BIT, WHITE1BIT)
85 86
@@ -90,6 +91,7 @@
90 (!testbits((x)->gch.marked, WHITEBITS | bitmask(BLACKBIT))) 91 (!testbits((x)->gch.marked, WHITEBITS | bitmask(BLACKBIT)))
91 92
92#define isold(x) testbit((x)->gch.marked, OLDBIT) 93#define isold(x) testbit((x)->gch.marked, OLDBIT)
94#define resetoldbit(o) resetbit((o)->gch.marked, OLDBIT)
93 95
94#define otherwhite(g) (g->currentwhite ^ WHITEBITS) 96#define otherwhite(g) (g->currentwhite ^ WHITEBITS)
95#define isdeadm(ow,m) (!(((m) ^ WHITEBITS) & (ow))) 97#define isdeadm(ow,m) (!(((m) ^ WHITEBITS) & (ow)))