aboutsummaryrefslogtreecommitdiff
path: root/lstate.h
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2001-06-15 16:16:41 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2001-06-15 16:16:41 -0300
commitae19b2f51e21cef8ede07ce4e0b1546f2deefe91 (patch)
treedc51fb9787ad478450e3297d364c3857779d55dc /lstate.h
parenta3fbf5f5fdf438cdfd7173b3e541d8aafc99b3f8 (diff)
downloadlua-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.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/lstate.h b/lstate.h
index a1965fb8..cee07969 100644
--- a/lstate.h
+++ b/lstate.h
@@ -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)