diff options
Diffstat (limited to 'luaconf.h')
| -rw-r--r-- | luaconf.h | 28 |
1 files changed, 27 insertions, 1 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: luaconf.h,v 1.4 2004/05/28 18:32:51 roberto Exp roberto $ | 2 | ** $Id: luaconf.h,v 1.5 2004/06/02 13:24:43 roberto Exp roberto $ |
| 3 | ** Configuration file for Lua | 3 | ** Configuration file for Lua |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -215,6 +215,32 @@ | |||
| 215 | #endif | 215 | #endif |
| 216 | 216 | ||
| 217 | 217 | ||
| 218 | |||
| 219 | /* | ||
| 220 | ** macros for thread synchronization inside Lua core machine: | ||
| 221 | ** all accesses to the global state and to global objects are synchronized. | ||
| 222 | ** Because threads can read the stack of other threads | ||
| 223 | ** (when running garbage collection), | ||
| 224 | ** a thread must also synchronize any write-access to its own stack. | ||
| 225 | ** Unsynchronized accesses are allowed only when reading its own stack, | ||
| 226 | ** or when reading immutable fields from global objects | ||
| 227 | ** (such as string values and udata values). | ||
| 228 | */ | ||
| 229 | #define lua_lock(L) ((void) 0) | ||
| 230 | #define lua_unlock(L) ((void) 0) | ||
| 231 | |||
| 232 | /* | ||
| 233 | ** this macro allows a thread switch in appropriate places in the Lua | ||
| 234 | ** core | ||
| 235 | */ | ||
| 236 | #define lua_threadyield(L) {lua_unlock(L); lua_lock(L);} | ||
| 237 | |||
| 238 | |||
| 239 | |||
| 240 | /* allows user-specific initialization on new threads */ | ||
| 241 | #define lua_userstateopen(l) /* empty */ | ||
| 242 | |||
| 243 | |||
| 218 | #endif | 244 | #endif |
| 219 | 245 | ||
| 220 | /* }====================================================== */ | 246 | /* }====================================================== */ |
