aboutsummaryrefslogtreecommitdiff
path: root/lstate.h
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2001-01-24 13:45:33 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2001-01-24 13:45:33 -0200
commit71ae4801d66d9592b0fb08e4e78138b7a6e993d5 (patch)
treea683b5b3757efb979329bf513f1bd9fde3fb9d1f /lstate.h
parent6fda6a530265268c01a83c31f8fc30e34753bbf1 (diff)
downloadlua-71ae4801d66d9592b0fb08e4e78138b7a6e993d5.tar.gz
lua-71ae4801d66d9592b0fb08e4e78138b7a6e993d5.tar.bz2
lua-71ae4801d66d9592b0fb08e4e78138b7a6e993d5.zip
macros LUA_ENTRY/LUA_EXIT to control exclusive access to Lua core
Diffstat (limited to 'lstate.h')
-rw-r--r--lstate.h22
1 files changed, 21 insertions, 1 deletions
diff --git a/lstate.h b/lstate.h
index 84fadd2f..a4c95e60 100644
--- a/lstate.h
+++ b/lstate.h
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lstate.h,v 1.44 2001/01/19 13:20:30 roberto Exp roberto $ 2** $Id: lstate.h,v 1.45 2001/01/22 18:01:38 roberto Exp roberto $
3** Global State 3** Global State
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -13,6 +13,26 @@
13 13
14 14
15 15
16#ifdef LUA_DEBUG
17extern int islocked;
18#define LUA_ENTRY lua_assert(islocked++ == 0)
19#define LUA_EXIT lua_assert(--islocked == 0)
20#endif
21
22
23/*
24** macros that control all entries and exits from Lua core machine
25** (mainly for thread syncronization)
26*/
27#ifndef LUA_ENTRY
28#define LUA_ENTRY
29#endif
30
31#ifndef LUA_EXIT
32#define LUA_EXIT
33#endif
34
35
16typedef TObject *StkId; /* index to stack elements */ 36typedef TObject *StkId; /* index to stack elements */
17 37
18 38