Skip to contentSkip to conversation

Fix: use liburcu flavor header instead of local copy

PATCH New Mathieu Desnoyers 2 participants 2 messages Oct 28, 2015 – Nov 3, 2015 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

PATCH 2/2 Fix: use liburcu flavor header instead of local copy

The layout of struct rcu_flavor_struct has changed in newer URCU versions. There is no need to keep a local copy of this structure. Use the library header instead.

This ensures that the caller of _cds_lfht_new(), which passes a flavor pointer with the library layout defined by liburcu, has the same layout expected internally within the local copy of rculfhash.

---
 src/common/hashtable/Makefile.am   |  2 +-
 src/common/hashtable/rculfhash.c   |  2 +-
 src/common/hashtable/rculfhash.h   |  3 +-
 src/common/hashtable/urcu-flavor.h | 65 --------------------------------------
 4 files changed, 3 insertions(+), 69 deletions(-)
 delete mode 100644 src/common/hashtable/urcu-flavor.h
src/common/hashtable/Makefile.am +1 -1
index 021f01c..8d5a59a 100644
@@ -4,7 +4,7 @@ noinst_LTLIBRARIES = libhashtable.la
 
 libhashtable_la_SOURCES = hashtable.c hashtable.h \
                          utils.c utils.h \
-                         rculfhash-internal.h urcu-flavor.h \
+                         rculfhash-internal.h \
                          rculfhash.h rculfhash.c \
                          rculfhash-mm-chunk.c \
                          rculfhash-mm-mmap.c \
src/common/hashtable/rculfhash.c +1 -1
index e11c654..aa9cae5 100644
@@ -277,7 +277,7 @@
 
 #include "rculfhash.h"
 #include "rculfhash-internal.h"
-#include "urcu-flavor.h"
+#include <urcu-flavor.h>
 
 #include <common/common.h>
 
src/common/hashtable/rculfhash.h +1 -2
index adb5d9d..4bfe789 100644
@@ -31,8 +31,7 @@
 #include <stdint.h>
 #include <urcu/compiler.h>
 #include <urcu-call-rcu.h>
-
-#include "urcu-flavor.h"
+#include <urcu-flavor.h>
 
 #ifdef __cplusplus
 extern "C" {
src/common/hashtable/urcu-flavor.h deleted +0 -65

65 lines not on this page · raw message

Signature · 1 line
2.1.4
#2 lore raw

Re: [PATCH lttng-tools 1/2 stable-2.6] Fix: rculfhash should not include specific rcu flavor

In reply to a message not in the archive

Both patches merged in stable-2.6, thanks!

Jérémie

Quoted 24 lines · Mathieu Desnoyers
---
 src/common/hashtable/rculfhash.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
src/common/hashtable/rculfhash.c +2 -2
index ff7e681..e11c654 100644
@@ -264,9 +264,10 @@
 #include <stdint.h>
 #include <string.h>
 #include <sched.h>
+#include <unistd.h>
 
 #include "config.h"
-#include <urcu.h>
+#include <urcu-pointer.h>
 #include <urcu-call-rcu.h>
 #include <urcu/arch.h>
 #include <urcu/uatomic.h>
--

2.1.4

Signature · 8 lines
Jérémie Galarneau
EfficiOS Inc.
http://www.efficios.com

_______________________________________________
lttng-dev mailing list
[email protected]
http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev