diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2001-06-15 16:16:41 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2001-06-15 16:16:41 -0300 |
commit | ae19b2f51e21cef8ede07ce4e0b1546f2deefe91 (patch) | |
tree | dc51fb9787ad478450e3297d364c3857779d55dc /lstate.h | |
parent | a3fbf5f5fdf438cdfd7173b3e541d8aafc99b3f8 (diff) | |
download | lua-ae19b2f51e21cef8ede07ce4e0b1546f2deefe91.tar.gz lua-ae19b2f51e21cef8ede07ce4e0b1546f2deefe91.tar.bz2 lua-ae19b2f51e21cef8ede07ce4e0b1546f2deefe91.zip |
more relaxed rules for syncronized access
Diffstat (limited to 'lstate.h')
-rw-r--r-- | lstate.h | 12 |
1 files changed, 9 insertions, 3 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lstate.h,v 1.56 2001/04/17 17:35:54 roberto Exp roberto $ | 2 | ** $Id: lstate.h,v 1.57 2001/06/06 18:00:19 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,8 +13,14 @@ | |||
13 | 13 | ||
14 | 14 | ||
15 | /* | 15 | /* |
16 | ** macros that control all entries and exits from Lua core machine | 16 | ** macros for thread syncronization inside Lua core machine: |
17 | ** (mainly for thread syncronization) | 17 | ** all accesses to the global state and to global objects are syncronized. |
18 | ** Because threads can read the stack of other threads | ||
19 | ** (when running garbage collection), | ||
20 | ** a thread must also syncronize any write-access to its own stack. | ||
21 | ** Unsyncronized accesses are allowed only when reading its own stack, | ||
22 | ** or when reading immutable fields from global objects | ||
23 | ** (such as string values and udata values). | ||
18 | */ | 24 | */ |
19 | #ifndef lua_lock | 25 | #ifndef lua_lock |
20 | #define lua_lock(L) ((void) 0) | 26 | #define lua_lock(L) ((void) 0) |