Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libvdp-pesi
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Jobs
Commits
Open sidebar
uplex-varnish
libvdp-pesi
Commits
b99fd36e
Commit
b99fd36e
authored
Aug 03, 2019
by
Nils Goroll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
prepare for multiple node allocators - add an enum to label nodes
parent
9536e559
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
0 deletions
+9
-0
node.c
src/node.c
+2
-0
node.h
src/node.h
+7
-0
No files found.
src/node.c
View file @
b99fd36e
...
...
@@ -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
);
}
...
...
src/node.h
View file @
b99fd36e
...
...
@@ -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
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment