mirror of
https://github.com/trapexit/mergerfs.git
synced 2026-10-26 19:01:56 -04:00
node.cpp
This commit is contained in:
parent
3204d74d25
commit
79f18ad09e
1 changed files with 8 additions and 2 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue