aboutsummaryrefslogtreecommitdiff
path: root/src/universe.h
diff options
context:
space:
mode:
authorBenoit Germain <bnt.germain@gmail.com>2018-10-25 14:03:32 +0200
committerBenoit Germain <bnt.germain@gmail.com>2018-10-25 14:03:32 +0200
commit9645a86fbcb16ca83c5f4ff0dae0925ac71bb46b (patch)
treec47a5f4ea54490ed969b5ebdf1a2174c29e49ff5 /src/universe.h
parent1ec3f220f345f1c090a18adbaa90c0ead61e8ed3 (diff)
downloadlanes-9645a86fbcb16ca83c5f4ff0dae0925ac71bb46b.tar.gz
lanes-9645a86fbcb16ca83c5f4ff0dae0925ac71bb46b.tar.bz2
lanes-9645a86fbcb16ca83c5f4ff0dae0925ac71bb46b.zip
Fix Lanes build by reorganizing types around a bit
Diffstat (limited to '')
-rw-r--r--src/universe.h24
1 files changed, 16 insertions, 8 deletions
diff --git a/src/universe.h b/src/universe.h
index 0ca5bf7..a75cead 100644
--- a/src/universe.h
+++ b/src/universe.h
@@ -6,7 +6,14 @@
6 6
7#include "lua.h" 7#include "lua.h"
8#include "threading.h" 8#include "threading.h"
9// MUTEX_T 9
10// forwards
11struct s_DeepPrelude;
12typedef struct s_DeepPrelude DeepPrelude;
13struct s_Keepers;
14typedef struct s_Keepers Keepers;
15struct s_Lane;
16typedef struct s_Lane Lane;
10 17
11// ################################################################################################ 18// ################################################################################################
12 19
@@ -27,15 +34,15 @@ struct s_Universe
27 34
28 lua_CFunction on_state_create_func; 35 lua_CFunction on_state_create_func;
29 36
30 struct s_Keepers* keepers; 37 Keepers* keepers;
31 38
32 // Initialized by 'init_once_LOCKED()': the deep userdata Linda object 39 // Initialized by 'init_once_LOCKED()': the deep userdata Linda object
33 // used for timers (each lane will get a proxy to this) 40 // used for timers (each lane will get a proxy to this)
34 volatile struct DEEP_PRELUDE* timer_deep; // = NULL 41 volatile DeepPrelude* timer_deep; // = NULL
35 42
36#if HAVE_LANE_TRACKING 43#if HAVE_LANE_TRACKING
37 MUTEX_T tracking_cs; 44 MUTEX_T tracking_cs;
38 struct s_lane* volatile tracking_first; // will change to TRACKING_END if we want to activate tracking 45 Lane* volatile tracking_first; // will change to TRACKING_END if we want to activate tracking
39#endif // HAVE_LANE_TRACKING 46#endif // HAVE_LANE_TRACKING
40 47
41 MUTEX_T selfdestruct_cs; 48 MUTEX_T selfdestruct_cs;
@@ -53,14 +60,15 @@ struct s_Universe
53 int debugspew_indent_depth; 60 int debugspew_indent_depth;
54#endif // USE_DEBUG_SPEW 61#endif // USE_DEBUG_SPEW
55 62
56 struct s_lane* volatile selfdestruct_first; 63 Lane* volatile selfdestruct_first;
57 // After a lane has removed itself from the chain, it still performs some processing. 64 // After a lane has removed itself from the chain, it still performs some processing.
58 // The terminal desinit sequence should wait for all such processing to terminate before force-killing threads 65 // The terminal desinit sequence should wait for all such processing to terminate before force-killing threads
59 int volatile selfdestructing_count; 66 int volatile selfdestructing_count;
60}; 67};
68typedef struct s_Universe Universe;
61 69
62struct s_Universe* universe_get( lua_State* L); 70Universe* universe_get( lua_State* L);
63struct s_Universe* universe_create( lua_State* L); 71Universe* universe_create( lua_State* L);
64void universe_store( lua_State* L, struct s_Universe* U); 72void universe_store( lua_State* L, Universe* U);
65 73
66#endif // UNIVERSE_H 74#endif // UNIVERSE_H