From dc359c0cbcd011f35521248c2e9db16785277c26 Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Thu, 24 Jan 2013 18:43:48 -0500 Subject: [PATCH] Symbol prefixing: in-house copy of hash table Will ensure we don't clash with the real version in liburcu cds. It's especially important since those symbols are exported globally by liblttng-ctl. Signed-off-by: Mathieu Desnoyers Signed-off-by: David Goulet --- src/common/hashtable/Makefile.am | 3 +- src/common/hashtable/hashtable-symbols.h | 43 ++++++++++++++++++++++++ src/common/hashtable/rculfhash.h | 2 ++ 3 files changed, 47 insertions(+), 1 deletion(-) create mode 100644 src/common/hashtable/hashtable-symbols.h diff --git a/src/common/hashtable/Makefile.am b/src/common/hashtable/Makefile.am index 62e22c117..021f01c79 100644 --- a/src/common/hashtable/Makefile.am +++ b/src/common/hashtable/Makefile.am @@ -8,6 +8,7 @@ libhashtable_la_SOURCES = hashtable.c hashtable.h \ rculfhash.h rculfhash.c \ rculfhash-mm-chunk.c \ rculfhash-mm-mmap.c \ - rculfhash-mm-order.c + rculfhash-mm-order.c \ + hashtable-symbols.h libhashtable_la_LIBADD = -lurcu-common -lurcu diff --git a/src/common/hashtable/hashtable-symbols.h b/src/common/hashtable/hashtable-symbols.h new file mode 100644 index 000000000..eda5b1be6 --- /dev/null +++ b/src/common/hashtable/hashtable-symbols.h @@ -0,0 +1,43 @@ +#ifndef _HASHTABLE_SYMBOLS_H +#define _HASHTABLE_SYMBOLS_H + +/* + * hashtable-symbols.h + * + * LTTng hash table symbol prefixing + * + * Copyright 2012 - Mathieu Desnoyers + * + * This library is free software; you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License, version 2.1 only, + * as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#define _cds_lfht_new lttng__cds_lfht_new +#define cds_lfht_add lttng_cds_lfht_add +#define cds_lfht_add_replace lttng_cds_lfht_add_replace +#define cds_lfht_add_unique lttng_cds_lfht_add_unique +#define cds_lfht_count_nodes lttng_cds_lfht_count_nodes +#define cds_lfht_del lttng_cds_lfht_del +#define cds_lfht_destroy lttng_cds_lfht_destroy +#define cds_lfht_first lttng_cds_lfht_first +#define cds_lfht_fls_ulong lttng_cds_lfht_fls_ulong +#define cds_lfht_get_count_order_u32 lttng_cds_lfht_get_count_order_u32 +#define cds_lfht_get_count_order_ulong lttng_cds_lfht_get_count_order_ulong +#define cds_lfht_is_node_deleted lttng_cds_lfht_is_node_deleted +#define cds_lfht_lookup lttng_cds_lfht_lookup +#define cds_lfht_next lttng_cds_lfht_next +#define cds_lfht_next_duplicate lttng_cds_lfht_next_duplicate +#define cds_lfht_replace lttng_cds_lfht_replace +#define cds_lfht_resize lttng_cds_lfht_resize + +#endif /* _HASHTABLE_SYMBOLS_H */ diff --git a/src/common/hashtable/rculfhash.h b/src/common/hashtable/rculfhash.h index d6cb34ab4..b079c08e6 100644 --- a/src/common/hashtable/rculfhash.h +++ b/src/common/hashtable/rculfhash.h @@ -26,6 +26,8 @@ * Include this file _after_ including your URCU flavor. */ +#include "hashtable-symbols.h" + #include #include #include -- 2.34.1