projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
common: compile libhashtable as C++
[lttng-tools.git]
/
src
/
common
/
hashtable
/
hashtable.h
diff --git
a/src/common/hashtable/hashtable.h
b/src/common/hashtable/hashtable.h
index 2c77f0afcd8d7dc62f2f2b2b7d07f2ff27a4897e..e150190417b7a594db359fada7237c2871039390 100644
(file)
--- a/
src/common/hashtable/hashtable.h
+++ b/
src/common/hashtable/hashtable.h
@@
-12,11
+12,16
@@
#include <stdint.h>
#include <common/macros.h>
#include <stdint.h>
#include <common/macros.h>
+#include <lttng/lttng-export.h>
#include <urcu/rculfhash.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 {
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;
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_iter {
@@
-66,7
+71,7
@@
struct lttng_ht_node_two_u64 {
};
/* Hashtable new and destroy */
};
/* 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 */
void lttng_ht_destroy(struct lttng_ht *ht);
/* Specialized node init and free functions */
@@
-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);
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 */
#endif /* _LTT_HT_H */
This page took
0.024592 seconds
and
4
git commands to generate.