#include "hash.h"
#include "log.h"
#include "qobj.h"
+#include "jhash.h"
static pthread_rwlock_t nodes_lock;
static struct hash *nodes = NULL;
return (unsigned int)node->nid;
}
-static int qobj_cmp(const void *a, const void *b)
+static bool qobj_cmp(const void *a, const void *b)
{
const struct qobj_node *na = a, *nb = b;
return na->nid == nb->nid;
{
if (!nodes) {
pthread_rwlock_init(&nodes_lock, NULL);
- nodes = hash_create(qobj_key, qobj_cmp, NULL);
+ nodes = hash_create_size(16, qobj_key, qobj_cmp, "QOBJ Hash");
}
}