diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2001-02-02 13:13:05 -0200 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2001-02-02 13:13:05 -0200 |
| commit | 426d3e43bdec4b1ab2b0aed1844396c27f64872f (patch) | |
| tree | 659b73e1e9720fb85c66a481b476c96671eef734 /lstate.h | |
| parent | 8823f371a2a63f634121a0c16cb1d02e5ce9f5c5 (diff) | |
| download | lua-426d3e43bdec4b1ab2b0aed1844396c27f64872f.tar.gz lua-426d3e43bdec4b1ab2b0aed1844396c27f64872f.tar.bz2 lua-426d3e43bdec4b1ab2b0aed1844396c27f64872f.zip | |
lock/unlock may use L + better structure for internal debug stuff
Diffstat (limited to 'lstate.h')
| -rw-r--r-- | lstate.h | 14 |
1 files changed, 3 insertions, 11 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lstate.h,v 1.48 2001/01/26 11:45:51 roberto Exp roberto $ | 2 | ** $Id: lstate.h,v 1.49 2001/02/01 17:40:48 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 | */ |
| @@ -12,24 +12,16 @@ | |||
| 12 | #include "luadebug.h" | 12 | #include "luadebug.h" |
| 13 | 13 | ||
| 14 | 14 | ||
| 15 | |||
| 16 | #ifdef LUA_DEBUG | ||
| 17 | extern int islocked; | ||
| 18 | #define LUA_LOCK lua_assert(islocked++ == 0) | ||
| 19 | #define LUA_UNLOCK lua_assert(--islocked == 0) | ||
| 20 | #endif | ||
| 21 | |||
| 22 | |||
| 23 | /* | 15 | /* |
| 24 | ** macros that control all entries and exits from Lua core machine | 16 | ** macros that control all entries and exits from Lua core machine |
| 25 | ** (mainly for thread syncronization) | 17 | ** (mainly for thread syncronization) |
| 26 | */ | 18 | */ |
| 27 | #ifndef LUA_LOCK | 19 | #ifndef LUA_LOCK |
| 28 | #define LUA_LOCK | 20 | #define LUA_LOCK(L) ((void) 0) |
| 29 | #endif | 21 | #endif |
| 30 | 22 | ||
| 31 | #ifndef LUA_UNLOCK | 23 | #ifndef LUA_UNLOCK |
| 32 | #define LUA_UNLOCK | 24 | #define LUA_UNLOCK(L) ((void) 0) |
| 33 | #endif | 25 | #endif |
| 34 | 26 | ||
| 35 | /* | 27 | /* |
