#include <stdint.h>
#include <common/macros.h>
+#include <lttng/lttng-export.h>
#include <urcu/rculfhash.h>
-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 {
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 {
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 */