From ae19b2f51e21cef8ede07ce4e0b1546f2deefe91 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Fri, 15 Jun 2001 16:16:41 -0300 Subject: more relaxed rules for syncronized access --- lstate.h | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'lstate.h') diff --git a/lstate.h b/lstate.h index a1965fb8..cee07969 100644 --- a/lstate.h +++ b/lstate.h @@ -1,5 +1,5 @@ /* -** $Id: lstate.h,v 1.56 2001/04/17 17:35:54 roberto Exp roberto $ +** $Id: lstate.h,v 1.57 2001/06/06 18:00:19 roberto Exp roberto $ ** Global State ** See Copyright Notice in lua.h */ @@ -13,8 +13,14 @@ /* -** macros that control all entries and exits from Lua core machine -** (mainly for thread syncronization) +** macros for thread syncronization inside Lua core machine: +** all accesses to the global state and to global objects are syncronized. +** Because threads can read the stack of other threads +** (when running garbage collection), +** a thread must also syncronize any write-access to its own stack. +** Unsyncronized accesses are allowed only when reading its own stack, +** or when reading immutable fields from global objects +** (such as string values and udata values). */ #ifndef lua_lock #define lua_lock(L) ((void) 0) -- cgit v1.2.3-55-g6feb