Nut/OS  4.10.3
API Reference
lgc.h File Reference
#include <lua/lobject.h>
Include dependency graph for lgc.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.


#define GCSpause   0
#define GCSpropagate   1
#define GCSsweepstring   2
#define GCSsweep   3
#define GCSfinalize   4
#define resetbits(x, m)   ((x) &= cast(lu_byte, ~(m)))
#define setbits(x, m)   ((x) |= (m))
#define testbits(x, m)   ((x) & (m))
#define bitmask(b)   (1<<(b))
#define bit2mask(b1, b2)   (bitmask(b1) | bitmask(b2))
#define l_setbit(x, b)   setbits(x, bitmask(b))
#define resetbit(x, b)   resetbits(x, bitmask(b))
#define testbit(x, b)   testbits(x, bitmask(b))
#define set2bits(x, b1, b2)   setbits(x, (bit2mask(b1, b2)))
#define reset2bits(x, b1, b2)   resetbits(x, (bit2mask(b1, b2)))
#define test2bits(x, b1, b2)   testbits(x, (bit2mask(b1, b2)))
#define WHITE0BIT   0
#define WHITE1BIT   1
#define BLACKBIT   2
#define FINALIZEDBIT   3
#define KEYWEAKBIT   3
#define VALUEWEAKBIT   4
#define FIXEDBIT   5
#define SFIXEDBIT   6
#define WHITEBITS   bit2mask(WHITE0BIT, WHITE1BIT)
#define iswhite(x)   test2bits((x)->gch.marked, WHITE0BIT, WHITE1BIT)
#define isblack(x)   testbit((x)->gch.marked, BLACKBIT)
#define isgray(x)   (!isblack(x) && !iswhite(x))
#define otherwhite(g)   (g->currentwhite ^ WHITEBITS)
#define isdead(g, v)   ((v)->gch.marked & otherwhite(g) & WHITEBITS)
#define changewhite(x)   ((x)->gch.marked ^= WHITEBITS)
#define gray2black(x)   l_setbit((x)->gch.marked, BLACKBIT)
#define valiswhite(x)   (iscollectable(x) && iswhite(gcvalue(x)))
#define luaC_white(g)   cast(lu_byte, (g)->currentwhite & WHITEBITS)
#define luaC_checkGC(L)
#define luaC_barrier(L, p, v)
#define luaC_barriert(L, t, v)
#define luaC_objbarrier(L, p, o)
#define luaC_objbarriert(L, t, o)   { if (iswhite(obj2gco(o)) && isblack(obj2gco(t))) luaC_barrierback(L,t); }


LUAI_FUNC size_t luaC_separateudata (lua_State *L, int all)
LUAI_FUNC void luaC_callGCTM (lua_State *L)
LUAI_FUNC void luaC_freeall (lua_State *L)
LUAI_FUNC void luaC_step (lua_State *L)
LUAI_FUNC void luaC_fullgc (lua_State *L)
LUAI_FUNC void luaC_link (lua_State *L, GCObject *o, lu_byte tt)
LUAI_FUNC void luaC_linkupval (lua_State *L, UpVal *uv)
LUAI_FUNC void luaC_barrierf (lua_State *L, GCObject *o, GCObject *v)
LUAI_FUNC void luaC_barrierback (lua_State *L, Table *t)

Define Documentation

#define GCSpause   0

Definition at line 17 of file lgc.h.

#define GCSpropagate   1

Definition at line 18 of file lgc.h.

#define GCSsweepstring   2

Definition at line 19 of file lgc.h.

#define GCSsweep   3

Definition at line 20 of file lgc.h.

#define GCSfinalize   4

Definition at line 21 of file lgc.h.

#define resetbits (   x,
)    ((x) &= cast(lu_byte, ~(m)))

Definition at line 27 of file lgc.h.

#define setbits (   x,
)    ((x) |= (m))

Definition at line 28 of file lgc.h.

#define testbits (   x,
)    ((x) & (m))

Definition at line 29 of file lgc.h.

#define bitmask (   b)    (1<<(b))

Definition at line 30 of file lgc.h.

#define bit2mask (   b1,
)    (bitmask(b1) | bitmask(b2))

Definition at line 31 of file lgc.h.

#define l_setbit (   x,
)    setbits(x, bitmask(b))

Definition at line 32 of file lgc.h.

#define resetbit (   x,
)    resetbits(x, bitmask(b))

Definition at line 33 of file lgc.h.

#define testbit (   x,
)    testbits(x, bitmask(b))

Definition at line 34 of file lgc.h.

#define set2bits (   x,
)    setbits(x, (bit2mask(b1, b2)))

Definition at line 35 of file lgc.h.

#define reset2bits (   x,
)    resetbits(x, (bit2mask(b1, b2)))

Definition at line 36 of file lgc.h.

#define test2bits (   x,
)    testbits(x, (bit2mask(b1, b2)))

Definition at line 37 of file lgc.h.

#define WHITE0BIT   0

Definition at line 54 of file lgc.h.

#define WHITE1BIT   1

Definition at line 55 of file lgc.h.

#define BLACKBIT   2

Definition at line 56 of file lgc.h.

#define FINALIZEDBIT   3

Definition at line 57 of file lgc.h.

#define KEYWEAKBIT   3

Definition at line 58 of file lgc.h.

#define VALUEWEAKBIT   4

Definition at line 59 of file lgc.h.

#define FIXEDBIT   5

Definition at line 60 of file lgc.h.

#define SFIXEDBIT   6

Definition at line 61 of file lgc.h.

#define WHITEBITS   bit2mask(WHITE0BIT, WHITE1BIT)

Definition at line 62 of file lgc.h.

#define iswhite (   x)    test2bits((x)->gch.marked, WHITE0BIT, WHITE1BIT)

Definition at line 65 of file lgc.h.

#define isblack (   x)    testbit((x)->gch.marked, BLACKBIT)

Definition at line 66 of file lgc.h.

#define isgray (   x)    (!isblack(x) && !iswhite(x))

Definition at line 67 of file lgc.h.

#define otherwhite (   g)    (g->currentwhite ^ WHITEBITS)

Definition at line 69 of file lgc.h.

#define isdead (   g,
)    ((v)->gch.marked & otherwhite(g) & WHITEBITS)

Definition at line 70 of file lgc.h.

#define changewhite (   x)    ((x)->gch.marked ^= WHITEBITS)

Definition at line 72 of file lgc.h.

#define gray2black (   x)    l_setbit((x)->gch.marked, BLACKBIT)

Definition at line 73 of file lgc.h.

#define valiswhite (   x)    (iscollectable(x) && iswhite(gcvalue(x)))

Definition at line 75 of file lgc.h.

#define luaC_white (   g)    cast(lu_byte, (g)->currentwhite & WHITEBITS)

Definition at line 77 of file lgc.h.

#define luaC_checkGC (   L)
{ \
  condhardstacktests(luaD_reallocstack(L, L->stacksize - EXTRA_STACK - 1)); \
  if (G(L)->totalbytes >= G(L)->GCthreshold) \
        luaC_step(L); }

Definition at line 80 of file lgc.h.

#define luaC_barrier (   L,
{ if (valiswhite(v) && isblack(obj2gco(p)))  \
        luaC_barrierf(L,obj2gco(p),gcvalue(v)); }

Definition at line 86 of file lgc.h.

#define luaC_barriert (   L,
{ if (valiswhite(v) && isblack(obj2gco(t)))  \
        luaC_barrierback(L,t); }

Definition at line 89 of file lgc.h.

#define luaC_objbarrier (   L,
{ if (iswhite(obj2gco(o)) && isblack(obj2gco(p))) \
                luaC_barrierf(L,obj2gco(p),obj2gco(o)); }

Definition at line 92 of file lgc.h.

#define luaC_objbarriert (   L,
)    { if (iswhite(obj2gco(o)) && isblack(obj2gco(t))) luaC_barrierback(L,t); }

Definition at line 96 of file lgc.h.

Function Documentation

LUAI_FUNC size_t luaC_separateudata ( lua_State L,
int  all 
LUAI_FUNC void luaC_callGCTM ( lua_State L)
LUAI_FUNC void luaC_freeall ( lua_State L)
LUAI_FUNC void luaC_step ( lua_State L)
LUAI_FUNC void luaC_fullgc ( lua_State L)
LUAI_FUNC void luaC_link ( lua_State L,
GCObject o,
lu_byte  tt 
LUAI_FUNC void luaC_linkupval ( lua_State L,
UpVal uv 
LUAI_FUNC void luaC_barrierf ( lua_State L,
GCObject o,
GCObject v 
LUAI_FUNC void luaC_barrierback ( lua_State L,
Table t