aboutsummaryrefslogtreecommitdiff
path: root/src/keeper.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/keeper.h')
-rw-r--r--src/keeper.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/keeper.h b/src/keeper.h
index f7e3951..931c1d5 100644
--- a/src/keeper.h
+++ b/src/keeper.h
@@ -11,21 +11,23 @@ extern "C" {
11#include "threading.h" 11#include "threading.h"
12#include "uniquekey.h" 12#include "uniquekey.h"
13 13
14#include <mutex>
15
14// forwards 16// forwards
15enum class LookupMode; 17enum class LookupMode;
16struct Universe; 18struct Universe;
17 19
18struct Keeper 20struct Keeper
19{ 21{
20 MUTEX_T keeper_cs; 22 std::mutex m_mutex;
21 lua_State* L; 23 lua_State* L{ nullptr };
22 // int count; 24 // int count;
23}; 25};
24 26
25struct Keepers 27struct Keepers
26{ 28{
27 int gc_threshold{ 0 }; 29 int gc_threshold{ 0 };
28 int nb_keepers; 30 int nb_keepers{ 0 };
29 Keeper keeper_array[1]; 31 Keeper keeper_array[1];
30}; 32};
31 33
@@ -38,7 +40,7 @@ void close_keepers(Universe* U);
38 40
39Keeper* which_keeper(Keepers* keepers_, uintptr_t magic_); 41Keeper* which_keeper(Keepers* keepers_, uintptr_t magic_);
40Keeper* keeper_acquire(Keepers* keepers_, uintptr_t magic_); 42Keeper* keeper_acquire(Keepers* keepers_, uintptr_t magic_);
41void keeper_release(Keeper* K); 43void keeper_release(Keeper* K_);
42void keeper_toggle_nil_sentinels(lua_State* L, int val_i_, LookupMode const mode_); 44void keeper_toggle_nil_sentinels(lua_State* L, int val_i_, LookupMode const mode_);
43int keeper_push_linda_storage(Universe* U, lua_State* L, void* ptr_, uintptr_t magic_); 45int keeper_push_linda_storage(Universe* U, lua_State* L, void* ptr_, uintptr_t magic_);
44 46