X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Fcommon%2Fhashtable%2Fhashtable.h;h=e129ac5f88a063475d65aad3d136f851aea7e0fe;hb=4878de5c7deb512bbdac4fdfc498907efa06fb7c;hp=2c77f0afcd8d7dc62f2f2b2b7d07f2ff27a4897e;hpb=ca806b0b247f89c62ac628a7779ae84049a8c2d7;p=lttng-tools.git diff --git a/src/common/hashtable/hashtable.h b/src/common/hashtable/hashtable.h index 2c77f0afc..e129ac5f8 100644 --- a/src/common/hashtable/hashtable.h +++ b/src/common/hashtable/hashtable.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2011 David Goulet + * Copyright (C) 2011 EfficiOS Inc. * * SPDX-License-Identifier: GPL-2.0-only * @@ -12,11 +12,12 @@ #include #include +#include #include -extern unsigned long lttng_ht_seed; +LTTNG_EXPORT extern unsigned long lttng_ht_seed; -typedef unsigned long (*hash_fct)(const void *_key, unsigned long seed); +typedef unsigned long (*hash_fct_type)(const void *_key, unsigned long seed); typedef cds_lfht_match_fct hash_match_fct; enum lttng_ht_type { @@ -29,7 +30,7 @@ enum lttng_ht_type { struct lttng_ht { struct cds_lfht *ht; cds_lfht_match_fct match_fct; - hash_fct hash_fct; + hash_fct_type hash_fct; }; struct lttng_ht_iter { @@ -66,7 +67,7 @@ struct lttng_ht_node_two_u64 { }; /* Hashtable new and destroy */ -struct lttng_ht *lttng_ht_new(unsigned long size, int type); +struct lttng_ht *lttng_ht_new(unsigned long size, enum lttng_ht_type type); void lttng_ht_destroy(struct lttng_ht *ht); /* Specialized node init and free functions */