X-Git-Url: https://git.liburcu.org/?a=blobdiff_plain;f=src%2Fcommon%2Fhashtable%2Fhashtable.h;h=cefd43833b721604487d12e71a1a36280c7f3e30;hb=4bd69c5f1161cd065f487da0f4c1aa03a73c47e4;hp=2c77f0afcd8d7dc62f2f2b2b7d07f2ff27a4897e;hpb=ca806b0b247f89c62ac628a7779ae84049a8c2d7;p=lttng-tools.git diff --git a/src/common/hashtable/hashtable.h b/src/common/hashtable/hashtable.h index 2c77f0afc..cefd43833 100644 --- a/src/common/hashtable/hashtable.h +++ b/src/common/hashtable/hashtable.h @@ -12,11 +12,16 @@ #include #include +#include #include -extern unsigned long lttng_ht_seed; +#ifdef __cplusplus +extern "C" { +#endif -typedef unsigned long (*hash_fct)(const void *_key, unsigned long seed); +LTTNG_EXPORT extern unsigned long lttng_ht_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 +34,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 { @@ -122,4 +127,8 @@ struct lttng_ht_node_u64 *lttng_ht_iter_get_node_u64( struct lttng_ht_node_two_u64 *lttng_ht_iter_get_node_two_u64( struct lttng_ht_iter *iter); +#ifdef __cplusplus +} +#endif + #endif /* _LTT_HT_H */