1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-09 00:00:00 +01:00

move node_type() implementation to source file

This commit is contained in:
Steffen Vogel 2018-07-16 14:42:23 +02:00
parent 77f3033007
commit 688b0849bf
2 changed files with 7 additions and 5 deletions

View file

@ -161,11 +161,6 @@ int node_write(struct node *n, struct sample *smps[], unsigned cnt, unsigned *re
int node_fd(struct node *n);
struct node_type * node_type(struct node *n);
{
assert(n->type == STATE_INITIALIZED);
return n->_vt;
}
struct memory_type * node_memory_type(struct node *n, struct memory_type *parent);

View file

@ -554,6 +554,13 @@ int node_fd(struct node *n)
return node_type(n)->fd ? node_type(n)->fd(n) : -1;
}
struct node_type * node_type(struct node *n)
{
assert(n->state == STATE_INITIALIZED);
return n->_vt;
}
struct memory_type * node_memory_type(struct node *n, struct memory_type *parent)
{
return node_type(n)->memory_type ? node_type(n)->memory_type(n, parent) : &memory_hugepage;