lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


> +  pthread_mutex_t lock;
>  } global_State;

Note that you don't need to change this struct to support OS threads.
Lua states contain an array of size LUA_EXTRASPACE that can be used
to store additional data. See also lua_getextraspace. The macros
luai_userstate* can be defined to manage OS threads.

Search the archives for examples. Note that LUA_EXTRASPACE was spelled 
LUAI_EXTRASPACE before 5.3.