Refactoring and fix: bytecode ABI
[lttng-ust.git] / liblttng-ust / rculfhash.h
index 7fa93c1e779b3172b2e744d5cdef124efa9b904b..902618e54ae760d23c836a323a0398c0f34c6375 100644 (file)
@@ -1,33 +1,18 @@
-#ifndef _LTTNG_UST_RCULFHASH_H
-#define _LTTNG_UST_RCULFHASH_H
-
 /*
- * urcu/rculfhash.h
- *
- * Userspace RCU library - Lock-Free RCU Hash Table
- *
- * Copyright 2011 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
- * Copyright 2011 - Lai Jiangshan <laijs@cn.fujitsu.com>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
+ * SPDX-License-Identifier: LGPL-2.1-or-later
  *
- * 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.
+ * Copyright 2011 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ * Copyright 2011 Lai Jiangshan <laijs@cn.fujitsu.com>
  *
- * 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
+ * Userspace RCU library - Lock-Free RCU Hash Table
  */
 
+#ifndef _LTTNG_UST_RCULFHASH_H
+#define _LTTNG_UST_RCULFHASH_H
+
 #include <stdint.h>
 #include <pthread.h>
 #include <urcu/compiler.h>
-#include "helper.h"
 
 #ifdef __cplusplus
 extern "C" {
@@ -111,11 +96,13 @@ struct lttng_ust_lfht_mm_type {
                        unsigned long index);
 };
 
-LTTNG_HIDDEN
+__attribute__((visibility("hidden")))
 extern const struct lttng_ust_lfht_mm_type lttng_ust_lfht_mm_order;
-LTTNG_HIDDEN
+
+__attribute__((visibility("hidden")))
 extern const struct lttng_ust_lfht_mm_type lttng_ust_lfht_mm_chunk;
-LTTNG_HIDDEN
+
+__attribute__((visibility("hidden")))
 extern const struct lttng_ust_lfht_mm_type lttng_ust_lfht_mm_mmap;
 
 /*
@@ -135,7 +122,7 @@ extern const struct lttng_ust_lfht_mm_type lttng_ust_lfht_mm_mmap;
  * Return NULL on error.
  * Note: the RCU flavor must be already included before the hash table header.
  */
-LTTNG_HIDDEN
+__attribute__((visibility("hidden")))
 extern struct lttng_ust_lfht *lttng_ust_lfht_new(unsigned long init_size,
                        unsigned long min_nr_alloc_buckets,
                        unsigned long max_nr_buckets,
@@ -159,7 +146,7 @@ extern struct lttng_ust_lfht *lttng_ust_lfht_new(unsigned long init_size,
  * thread to handle resize operations, which removes RCU requirements on
  * lttng_ust_lfht_destroy.
  */
-LTTNG_HIDDEN
+__attribute__((visibility("hidden")))
 extern int lttng_ust_lfht_destroy(struct lttng_ust_lfht *ht);
 
 /*
@@ -172,7 +159,7 @@ extern int lttng_ust_lfht_destroy(struct lttng_ust_lfht *ht);
  * Call with rcu_read_lock held.
  * Threads calling this API need to be registered RCU read-side threads.
  */
-LTTNG_HIDDEN
+__attribute__((visibility("hidden")))
 extern void lttng_ust_lfht_count_nodes(struct lttng_ust_lfht *ht,
                long *split_count_before,
                unsigned long *count,
@@ -190,7 +177,7 @@ extern void lttng_ust_lfht_count_nodes(struct lttng_ust_lfht *ht,
  * Threads calling this API need to be registered RCU read-side threads.
  * This function acts as a rcu_dereference() to read the node pointer.
  */
-LTTNG_HIDDEN
+__attribute__((visibility("hidden")))
 extern void lttng_ust_lfht_lookup(struct lttng_ust_lfht *ht, unsigned long hash,
                lttng_ust_lfht_match_fct match, const void *key,
                struct lttng_ust_lfht_iter *iter);
@@ -215,7 +202,7 @@ extern void lttng_ust_lfht_lookup(struct lttng_ust_lfht *ht, unsigned long hash,
  * Threads calling this API need to be registered RCU read-side threads.
  * This function acts as a rcu_dereference() to read the node pointer.
  */
-LTTNG_HIDDEN
+__attribute__((visibility("hidden")))
 extern void lttng_ust_lfht_next_duplicate(struct lttng_ust_lfht *ht,
                lttng_ust_lfht_match_fct match, const void *key,
                struct lttng_ust_lfht_iter *iter);
@@ -230,7 +217,7 @@ extern void lttng_ust_lfht_next_duplicate(struct lttng_ust_lfht *ht,
  * Threads calling this API need to be registered RCU read-side threads.
  * This function acts as a rcu_dereference() to read the node pointer.
  */
-LTTNG_HIDDEN
+__attribute__((visibility("hidden")))
 extern void lttng_ust_lfht_first(struct lttng_ust_lfht *ht, struct lttng_ust_lfht_iter *iter);
 
 /*
@@ -245,7 +232,7 @@ extern void lttng_ust_lfht_first(struct lttng_ust_lfht *ht, struct lttng_ust_lfh
  * Threads calling this API need to be registered RCU read-side threads.
  * This function acts as a rcu_dereference() to read the node pointer.
  */
-LTTNG_HIDDEN
+__attribute__((visibility("hidden")))
 extern void lttng_ust_lfht_next(struct lttng_ust_lfht *ht, struct lttng_ust_lfht_iter *iter);
 
 /*
@@ -260,7 +247,7 @@ extern void lttng_ust_lfht_next(struct lttng_ust_lfht *ht, struct lttng_ust_lfht
  * This function issues a full memory barrier before and after its
  * atomic commit.
  */
-LTTNG_HIDDEN
+__attribute__((visibility("hidden")))
 extern void lttng_ust_lfht_add(struct lttng_ust_lfht *ht, unsigned long hash,
                struct lttng_ust_lfht_node *node);
 
@@ -291,7 +278,7 @@ extern void lttng_ust_lfht_add(struct lttng_ust_lfht *ht, unsigned long hash,
  * node pointer. The failure case does not guarantee any other memory
  * barrier.
  */
-LTTNG_HIDDEN
+__attribute__((visibility("hidden")))
 extern struct lttng_ust_lfht_node *lttng_ust_lfht_add_unique(struct lttng_ust_lfht *ht,
                unsigned long hash,
                lttng_ust_lfht_match_fct match,
@@ -328,7 +315,7 @@ extern struct lttng_ust_lfht_node *lttng_ust_lfht_add_unique(struct lttng_ust_lf
  * This function issues a full memory barrier before and after its
  * atomic commit.
  */
-LTTNG_HIDDEN
+__attribute__((visibility("hidden")))
 extern struct lttng_ust_lfht_node *lttng_ust_lfht_add_replace(struct lttng_ust_lfht *ht,
                unsigned long hash,
                lttng_ust_lfht_match_fct match,
@@ -364,7 +351,7 @@ extern struct lttng_ust_lfht_node *lttng_ust_lfht_add_replace(struct lttng_ust_l
  * after its atomic commit. Upon failure, this function does not issue
  * any memory barrier.
  */
-LTTNG_HIDDEN
+__attribute__((visibility("hidden")))
 extern int lttng_ust_lfht_replace(struct lttng_ust_lfht *ht,
                struct lttng_ust_lfht_iter *old_iter,
                unsigned long hash,
@@ -393,7 +380,7 @@ extern int lttng_ust_lfht_replace(struct lttng_ust_lfht *ht,
  * after its atomic commit. Upon failure, this function does not issue
  * any memory barrier.
  */
-LTTNG_HIDDEN
+__attribute__((visibility("hidden")))
 extern int lttng_ust_lfht_del(struct lttng_ust_lfht *ht, struct lttng_ust_lfht_node *node);
 
 /*
@@ -409,7 +396,7 @@ extern int lttng_ust_lfht_del(struct lttng_ust_lfht *ht, struct lttng_ust_lfht_n
  * Threads calling this API need to be registered RCU read-side threads.
  * This function does not issue any memory barrier.
  */
-LTTNG_HIDDEN
+__attribute__((visibility("hidden")))
 extern int lttng_ust_lfht_is_node_deleted(const struct lttng_ust_lfht_node *node);
 
 /*
@@ -422,7 +409,7 @@ extern int lttng_ust_lfht_is_node_deleted(const struct lttng_ust_lfht_node *node
  * lttng_ust_lfht_resize should *not* be called from a RCU read-side critical
  * section.
  */
-LTTNG_HIDDEN
+__attribute__((visibility("hidden")))
 extern void lttng_ust_lfht_resize(struct lttng_ust_lfht *ht, unsigned long new_size);
 
 /*
This page took 0.035366 seconds and 4 git commands to generate.