aboutsummaryrefslogtreecommitdiff
path: root/ltests.h
diff options
context:
space:
mode:
Diffstat (limited to 'ltests.h')
-rw-r--r--ltests.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/ltests.h b/ltests.h
index 27dd9836..73676f64 100644
--- a/ltests.h
+++ b/ltests.h
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: ltests.h,v 2.30 2010/01/11 17:33:09 roberto Exp roberto $ 2** $Id: ltests.h,v 2.31 2010/04/12 16:07:29 roberto Exp roberto $
3** Internal Header for Debugging of the Lua Implementation 3** Internal Header for Debugging of the Lua Implementation
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -62,6 +62,8 @@ struct L_EXTRA { int lock; int *plock; };
62#define luai_userstateopen(l) \ 62#define luai_userstateopen(l) \
63 (getlock(l)->lock = 0, getlock(l)->plock = &(getlock(l)->lock)) 63 (getlock(l)->lock = 0, getlock(l)->plock = &(getlock(l)->lock))
64#define luai_userstatethread(l,l1) (getlock(l1)->plock = getlock(l)->plock) 64#define luai_userstatethread(l,l1) (getlock(l1)->plock = getlock(l)->plock)
65#define luai_userstatefree(l,l1) \
66 lua_assert(getlock(l)->plock == getlock(l1)->plock)
65#define lua_lock(l) lua_assert((*getlock(l)->plock)++ == 0) 67#define lua_lock(l) lua_assert((*getlock(l)->plock)++ == 0)
66#define lua_unlock(l) lua_assert(--(*getlock(l)->plock) == 0) 68#define lua_unlock(l) lua_assert(--(*getlock(l)->plock) == 0)
67 69