diff --git a/include/villas/hook_type.h b/include/villas/hook_type.h index ba369fead..5e0471b18 100644 --- a/include/villas/hook_type.h +++ b/include/villas/hook_type.h @@ -79,4 +79,4 @@ struct hook_type * hook_type_lookup(const char *name); #ifdef __cplusplus } -#endif \ No newline at end of file +#endif diff --git a/include/villas/memory_type.h b/include/villas/memory_type.h index 6139cd2e2..ea3144bba 100644 --- a/include/villas/memory_type.h +++ b/include/villas/memory_type.h @@ -30,8 +30,9 @@ extern "C" { #endif -/* Forward declaratio */ +/* Forward declarations */ struct memory_type; +struct node; typedef struct memory_allocation * (*memory_allocator_t)(struct memory_type *mem, size_t len, size_t alignment); typedef int (*memory_deallocator_t)(struct memory_type *mem, struct memory_allocation * ma); @@ -58,10 +59,6 @@ struct memory_type { extern struct memory_type memory_heap; extern struct memory_type memory_hugepage; -struct ibv_mr * memory_type_ib_mr(void *ptr); - -struct node; - struct memory_type * memory_ib(struct node *n, struct memory_type *parent); struct memory_type * memory_managed(void *ptr, size_t len); diff --git a/include/villas/node_type.h b/include/villas/node_type.h index e3387997c..c1449e63d 100644 --- a/include/villas/node_type.h +++ b/include/villas/node_type.h @@ -45,12 +45,13 @@ struct sample; struct node_type { int vectorize; /**< Maximal vector length supported by this node type. Zero is unlimited. */ + enum state state; /**< State of this node-type. */ + struct list instances; /**< A list of all existing nodes of this type. */ + size_t size; /**< Size of private data bock. @see node::_vd */ size_t pool_size; - enum state state; - struct { /** Global initialization per node type. * @@ -172,7 +173,7 @@ struct node_type { /** Return a file descriptor which can be used by poll / select to detect the availability of new data. */ int (*fd)(struct node *n); - /** */ + /** Return a memory allocator which should be used for sample pools passed to this node. */ struct memory_type * (*memory_type)(struct node *n, struct memory_type *parent); }; diff --git a/include/villas/queue.h b/include/villas/queue.h index 7e73facd2..7b06b21e6 100644 --- a/include/villas/queue.h +++ b/include/villas/queue.h @@ -62,7 +62,7 @@ struct queue { atomic_state state; size_t buffer_mask; - off_t buffer_off; /**< Relative pointer to struct queue_cell[] */ + off_t buffer_off; /**< Relative pointer to struct queue_cell[] */ cacheline_pad_t _pad1; /**< Producer area: only producers read & write */ diff --git a/lib/hash_table.c b/lib/hash_table.c index 2fb88aa88..decf05b1c 100644 --- a/lib/hash_table.c +++ b/lib/hash_table.c @@ -192,10 +192,13 @@ void hash_table_dump(struct hash_table *ht) pthread_mutex_lock(&ht->lock); for (int i = 0; i < ht->size; i++) { - printf("%i: ", i); + char *strlst = NULL; + for (hte = ht->table[i]; hte; hte = hte->next) - printf("%p->%p ", hte->key, hte->data); - printf("\n"); + strcatf(&strlst, "%p->%p ", hte->key, hte->data); + + info("%i: %s", i, strlst); + free(strlst); } pthread_mutex_unlock(&ht->lock);