File: LuaConfig.h

package info (click to toggle)
spring 88.0%2Bdfsg1-1.1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 41,524 kB
  • sloc: cpp: 343,114; ansic: 38,414; python: 12,257; java: 12,203; awk: 5,748; sh: 1,204; xml: 997; perl: 405; objc: 192; makefile: 181; php: 134; sed: 2
file content (42 lines) | stat: -rwxr-xr-x 1,502 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/* This file is part of the Spring engine (GPL v2 or later), see LICENSE.html */

#ifndef LUA_CONFIG_H
#define LUA_CONFIG_H

#include "lib/gml/gmlcnf.h"

#define LUA_MUTEX 1
#define LUA_BATCH 2
#define LUA_STATE 4
#if (defined(USE_GML) && GML_ENABLE_SIM)
#define LUA_MT_OPT ( LUA_MUTEX | LUA_BATCH | LUA_STATE ) // optimizations for faster parallel execution of separate lua_States
#elif defined(USE_LUA_MT)
#define LUA_MT_OPT ( LUA_BATCH | LUA_STATE )
#else
#define LUA_MT_OPT 0
#endif

enum {
	MT_LUA_FIRST = 0,
	MT_LUA_DEFAULT = 0,
	MT_LUA_NONE = 0,
	MT_LUA_FIRSTACTIVE = 1,
	MT_LUA_SINGLE = 1,
	MT_LUA_SINGLE_BATCH,
	MT_LUA_DUAL_EXPORT,
	MT_LUA_DUAL,
	MT_LUA_DUAL_ALL,
	MT_LUA_DUAL_UNMANAGED,
	MT_LUA_SIZE,
	MT_LUA_LAST = MT_LUA_SIZE - 1
};
// MT_LUA_DEFAULT: Use 'luaThreadingModel' setting from modInfo (default)
// MT_LUA_NONE: N/A (single threaded)
// MT_LUA_SINGLE: Single state
// MT_LUA_SINGLE_BATCH: Single state, batching of unsynced events
// MT_LUA_DUAL_EXPORT: Dual states for synced, batching of unsynced events, synced/unsynced communication via EXPORT table and SendToUnsynced
// MT_LUA_DUAL: Dual states for synced, batching of unsynced events, synced/unsynced communication via SendToUnsynced only
// MT_LUA_DUAL_ALL: Dual states for all, all synced/unsynced communication (widgets included) via SendToUnsynced only
// MT_LUA_DUAL_UNMANAGED: Dual states for all, all synced/unsynced communication (widgets included) is unmanaged and via SendToUnsynced only

#endif // LUA_CONFIG_H