This commit is contained in:
Antonio SJ Musumeci 2025-10-27 21:39:29 -05:00
parent 3204d74d25
commit 79f18ad09e

View file

@ -1,7 +1,7 @@
#include "node.hpp"
#include <mutex>
#include <unordered_map>
#include <vector>
#include <cstddef>
#include <cstdlib>
@ -11,12 +11,18 @@ struct stack_t
stack_t *next;
};
struct StackPair
{
stack_t &stack;
bool &should_gc;
};
thread_local static stack_t *g_stack = NULL;
thread_local bool g_should_gc = false;
thread_local bool g_initialized = false;
static std::mutex g_mutex;
static std::unordered_map<stack_t*,bool*> g_all_stacks;
static std::<stack_t*,bool*> g_all_stacks;
node_t*
node_alloc()