Decrease liburcu dependency to 0.9+
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 26 Apr 2021 17:13:26 +0000 (13:13 -0400)
committerJonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Mon, 17 May 2021 14:37:52 +0000 (10:37 -0400)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: I99536f2ef36487272a8e8ce96fed401681205109

configure.ac
include/lttng/tracepoint-rcu.h
liblttng-ust/lttng-ust-comm.c
liblttng-ust/tracepoint-internal.h
liblttng-ust/tracepoint.c

index 9fde055e30656a6b3d07f4c40d9a02bb56b3cb8a..9a4d1a66e62829336c136d8834b694fba24ac517 100644 (file)
@@ -275,10 +275,10 @@ AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
 ])
 
 # urcu - check that URCU lib is available to compilation
-AC_CHECK_LIB([urcu-bp], [urcu_bp_synchronize_rcu], [], [AC_MSG_ERROR([Cannot find liburcu-bp 0.11 or newer. Use [LDFLAGS]=-Ldir to specify its location.])])
+AC_CHECK_LIB([urcu-bp], [synchronize_rcu_bp], [], [AC_MSG_ERROR([Cannot find liburcu-bp lib. Use [LDFLAGS]=-Ldir to specify its location.])])
 
-# urcu - check that URCU lib is at least version 0.11
-AC_CHECK_LIB([urcu-bp], [urcu_bp_call_rcu], [], [AC_MSG_ERROR([liburcu 0.11 or newer is needed, please update your version or use [LDFLAGS]=-Ldir to specify the right location.])])
+# urcu - check that URCU lib is at least version 0.6
+AC_CHECK_LIB([urcu-bp], [call_rcu_bp], [], [AC_MSG_ERROR([liburcu 0.6 or newer is needed, please update your version or use [LDFLAGS]=-Ldir to specify the right location.])])
 
 # numa.h integration
 AS_IF([test "x$NO_NUMA" = "x1"],[
index 95d60493c0b04f62e53af82f831eeeeb8e048ffb..0e084853f1130148dd33a8470d075dc550b69b7a 100644 (file)
 
 #ifdef _LGPL_SOURCE
 
-#include <urcu/urcu-bp.h>
+#include <urcu-bp.h>
 
-#define tp_rcu_read_lock_bp    urcu_bp_read_lock
-#define tp_rcu_read_unlock_bp  urcu_bp_read_unlock
+#define tp_rcu_read_lock_bp    rcu_read_lock_bp
+#define tp_rcu_read_unlock_bp  rcu_read_unlock_bp
 #define tp_rcu_dereference_bp  rcu_dereference
 #define TP_RCU_LINK_TEST()     1
 
index 2bed9be18512f85b2e409cea7ab7d471ec02d91c..1c35da250324799eaabc311bc7e3bc2f61b7ace3 100644 (file)
@@ -2144,7 +2144,7 @@ void ust_before_fork(sigset_t *save_sigset)
        pthread_mutex_lock(&ust_fork_mutex);
 
        ust_lock_nocheck();
-       urcu_bp_before_fork();
+       rcu_bp_before_fork();
        lttng_ust_lock_fd_tracker();
        lttng_perf_lock();
 }
@@ -2172,7 +2172,7 @@ void ust_after_fork_parent(sigset_t *restore_sigset)
        if (URCU_TLS(lttng_ust_nest_count))
                return;
        DBG("process %d", getpid());
-       urcu_bp_after_fork_parent();
+       rcu_bp_after_fork_parent();
        /* Release mutexes and reenable signals */
        ust_after_fork_common(restore_sigset);
 }
@@ -2198,7 +2198,7 @@ void ust_after_fork_child(sigset_t *restore_sigset)
        ust_context_vgids_reset();
        DBG("process %d", getpid());
        /* Release urcu mutexes */
-       urcu_bp_after_fork_child();
+       rcu_bp_after_fork_child();
        lttng_ust_cleanup(0);
        /* Release mutexes and reenable signals */
        ust_after_fork_common(restore_sigset);
index 1e6f92b677e812dfe6d4b5a2d75eb695417f4894..298f78e7313f7e7299b6ffc84f1cdd13a20148f5 100644 (file)
@@ -50,7 +50,7 @@ extern void __tracepoint_probe_prune_release_queue(void);
  */
 static inline void tracepoint_synchronize_unregister(void)
 {
-       urcu_bp_synchronize_rcu();
+       synchronize_rcu_bp();
 }
 
 extern void init_tracepoint(void);
index b109fe30152b2968f7aba03736bab0cae53dbd89..efd95bc1233ef07086e3a889166e40eca3b3d4a7 100644 (file)
@@ -26,7 +26,7 @@
 #include <stdio.h>
 
 #include <urcu/arch.h>
-#include <urcu/urcu-bp.h>
+#include <urcu-bp.h>
 #include <urcu/hlist.h>
 #include <urcu/uatomic.h>
 #include <urcu/compiler.h>
@@ -166,7 +166,7 @@ static void release_probes(void *old)
        if (old) {
                struct tp_probes *tp_probes = caa_container_of(old,
                        struct tp_probes, probes[0]);
-               urcu_bp_synchronize_rcu();
+               synchronize_rcu();
                free(tp_probes);
        }
 }
@@ -750,7 +750,7 @@ void __tracepoint_probe_prune_release_queue(void)
        release_queue_need_update = 0;
 
        /* Wait for grace period between all sync_callsites and free. */
-       urcu_bp_synchronize_rcu();
+       synchronize_rcu();
 
        cds_list_for_each_entry_safe(pos, next, &release_probes, u.list) {
                cds_list_del(&pos->u.list);
@@ -841,7 +841,7 @@ void tracepoint_probe_update_all(void)
 
        tracepoint_update_probes();
        /* Wait for grace period between update_probes and free. */
-       urcu_bp_synchronize_rcu();
+       synchronize_rcu();
        cds_list_for_each_entry_safe(pos, next, &release_probes, u.list) {
                cds_list_del(&pos->u.list);
                free(pos);
@@ -987,17 +987,17 @@ void exit_tracepoint(void)
 
 void tp_rcu_read_lock_bp(void)
 {
-       urcu_bp_read_lock();
+       rcu_read_lock_bp();
 }
 
 void tp_rcu_read_unlock_bp(void)
 {
-       urcu_bp_read_unlock();
+       rcu_read_unlock_bp();
 }
 
 void *tp_rcu_dereference_sym_bp(void *p)
 {
-       return urcu_bp_dereference(p);
+       return rcu_dereference_bp(p);
 }
 
 /*
This page took 0.049889 seconds and 5 git commands to generate.