Commit b99fd36e authored by Nils Goroll's avatar Nils Goroll

prepare for multiple node allocators - add an enum to label nodes

parent 9536e559
......@@ -80,6 +80,7 @@ node_alloc(void)
// MPL zeroes
AZ(node->magic);
node->magic = NODE_MAGIC;
node->allocator = NA_MPL;
return (node);
}
......@@ -136,6 +137,7 @@ tree_free(struct req *req, struct node *node)
tree_prune(req, node);
node_fini(req, node);
assert(node->allocator == NA_MPL);
MPL_Free(mempool, node);
}
......
......@@ -174,11 +174,18 @@ struct node_final {
pthread_cond_t fi_cond;
};
enum n_alloc {
NA_INVALID = 0,
NA_WS,
NA_MPL
} __attribute__ ((__packed__));
struct node {
unsigned magic;
#define NODE_MAGIC 0xe31edef3
enum n_type type;
enum n_state state;
enum n_alloc allocator;
VSTAILQ_ENTRY(node) sibling;
VSTAILQ_ENTRY(node) unpend;
struct node *parent;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment