2024-04-15 19:12:08 -05:00
|
|
|
#pragma once
|
|
|
|
|
|
2026-02-17 19:09:01 -06:00
|
|
|
#include <cstdint>
|
|
|
|
|
|
|
|
|
|
struct node_t
|
2023-04-23 23:33:48 -04:00
|
|
|
{
|
|
|
|
|
node_t *name_next;
|
|
|
|
|
node_t *id_next;
|
|
|
|
|
char *name;
|
|
|
|
|
node_t *parent;
|
|
|
|
|
|
2026-05-04 19:24:12 -05:00
|
|
|
uint64_t nodeid;
|
2023-04-23 23:33:48 -04:00
|
|
|
uint64_t nlookup;
|
2026-05-04 19:24:12 -05:00
|
|
|
|
2023-04-23 23:33:48 -04:00
|
|
|
uint32_t refctr;
|
2026-05-05 16:01:55 -05:00
|
|
|
uint32_t open_count : 31;
|
|
|
|
|
uint32_t remembered : 1;
|
2023-04-23 23:33:48 -04:00
|
|
|
uint32_t stat_crc32b;
|
2026-05-04 19:24:12 -05:00
|
|
|
int32_t treelock;
|
2023-04-23 23:33:48 -04:00
|
|
|
};
|
|
|
|
|
|
2026-05-05 16:01:55 -05:00
|
|
|
#if defined(__LP64__) || defined(_LP64)
|
|
|
|
|
static_assert(sizeof(node_t) == 64, "node_t expected to be 64 bytes on 64-bit");
|
|
|
|
|
#else
|
|
|
|
|
static_assert(sizeof(node_t) == 48, "node_t expected to be 48 bytes on 32-bit");
|
|
|
|
|
#endif
|
|
|
|
|
|
2023-04-23 23:33:48 -04:00
|
|
|
node_t *node_alloc();
|
|
|
|
|
void node_free(node_t*);
|
|
|
|
|
void node_gc();
|
2026-02-17 19:09:01 -06:00
|
|
|
void node_clear();
|