Revert "Create per RCU flavor CDS libraries"
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Sat, 3 Sep 2011 13:49:07 +0000 (09:49 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Sat, 3 Sep 2011 13:49:07 +0000 (09:49 -0400)
This reverts commit d4b99c015229978810319cfd42e1c9763772fad8.

Minor change (not visible to end-users): this commit introduces a
liburcu-common.so to hold wfqueue, wfstack and futex fall-back code.
This .so is used by all URCU flavors, as well as liburcu-cds.so.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Makefile.am
rculfqueue.c
rculfstack.c
tests/Makefile.am
urcu/map/urcu-bp.h
urcu/map/urcu-qsbr.h
urcu/map/urcu.h
urcu/rculfqueue.h
urcu/rculfstack.h
urcu/static/rculfqueue.h
urcu/static/rculfstack.h

index 6378af48a551d641ad1623bb189d34d4be5207b9..0cde84acc6515a405062e62ea93f72b756ee66df 100644 (file)
@@ -33,34 +33,36 @@ if COMPAT_FUTEX
 COMPAT+=compat_futex.c
 endif
 
-lib_LTLIBRARIES = liburcu-cds-common.la \
+lib_LTLIBRARIES = liburcu-common.la \
                liburcu.la liburcu-qsbr.la \
                liburcu-mb.la liburcu-signal.la liburcu-bp.la \
-               liburcu-cds.la liburcu-cds-qsbr.la \
-               liburcu-cds-mb.la liburcu-cds-signal.la liburcu-cds-bp.la
+               liburcu-cds.la
 
-liburcu_cds_common_la_SOURCES = wfqueue.c wfstack.c $(COMPAT)
+#
+# liburcu-common contains wait-free queues (needed by call_rcu) as well
+# as futex fallbacks.
+#
+liburcu_common_la_SOURCES = wfqueue.c wfstack.c $(COMPAT)
 
 liburcu_la_SOURCES = urcu.c urcu-pointer.c $(COMPAT)
-liburcu_cds_la_SOURCES = rculfqueue.c rculfstack.c $(COMPAT)
+liburcu_la_LIBADD = liburcu-common.la
 
 liburcu_qsbr_la_SOURCES = urcu-qsbr.c urcu-pointer.c $(COMPAT)
-liburcu_cds_qsbr_la_SOURCES = rculfqueue.c rculfstack.c $(COMPAT)
-liburcu_cds_qsbr_la_CFLAGS = -DRCU_QSBR
+liburcu_qsbr_la_LIBADD = liburcu-common.la
 
 liburcu_mb_la_SOURCES = urcu.c urcu-pointer.c $(COMPAT)
 liburcu_mb_la_CFLAGS = -DRCU_MB
-liburcu_cds_mb_la_SOURCES = rculfqueue.c rculfstack.c $(COMPAT)
-liburcu_cds_mb_la_CFLAGS = -DRCU_MB
+liburcu_mb_la_LIBADD = liburcu-common.la
 
 liburcu_signal_la_SOURCES = urcu.c urcu-pointer.c $(COMPAT)
 liburcu_signal_la_CFLAGS = -DRCU_SIGNAL
-liburcu_cds_signal_la_SOURCES = rculfqueue.c rculfstack.c $(COMPAT)
-liburcu_cds_signal_la_CFLAGS = -DRCU_SIGNAL
+liburcu_signal_la_LIBADD = liburcu-common.la
 
 liburcu_bp_la_SOURCES = urcu-bp.c urcu-pointer.c $(COMPAT)
-liburcu_cds_bp_la_SOURCES = rculfqueue.c rculfstack.c $(COMPAT)
-liburcu_cds_bp_la_CFLAGS = -DRCU_BP
+liburcu_bp_la_LIBADD = liburcu-common.la
+
+liburcu_cds_la_SOURCES = rculfqueue.c rculfstack.c $(COMPAT)
+liburcu_cds_la_LIBADD = liburcu-common.la
 
 pkgconfigdir = $(libdir)/pkgconfig
 pkgconfig_DATA = liburcu-cds.pc liburcu.pc liburcu-bp.pc liburcu-qsbr.pc \
index 09b858791d8a8babc0bff46741e188b423fd23ea..d1cea30db52fe0b09e1efa618b121ae30c5191b6 100644 (file)
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
-#define _LGPL_SOURCE
-
-#ifdef RCU_QSBR
-# include "urcu-qsbr.h"
-#elif defined(RCU_BP)
-# include "urcu-bp.h"
-#else
-# include "urcu.h"
-#endif
-
 #undef _LGPL_SOURCE
 /* Do not #define _LGPL_SOURCE to ensure we can emit the wrapper symbols */
 #include "urcu/rculfqueue.h"
index f58628ce4ea06f55185fb75682cbc9f6b974ef36..cf5711e10f4b53ec6d51580756f4b022e8784962 100644 (file)
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
-/* Use the urcu symbols to select the appropriate rcu flavor at link time */
-#define _LGPL_SOURCE
-
-#ifdef RCU_QSBR
-# include "urcu-qsbr.h"
-#elif defined(RCU_BP)
-# include "urcu-bp.h"
-#else
-# include "urcu.h"
-#endif
-
 #undef _LGPL_SOURCE
 /* Do not #define _LGPL_SOURCE to ensure we can emit the wrapper symbols */
 #include "urcu/rculfstack.h"
index 999da17938d46aa34509a3c8dd05ec8697c5e796..399fe9cad7ebac30df8de2f106ea45b6d463a741 100644 (file)
@@ -37,17 +37,13 @@ URCU_SIGNAL=$(top_srcdir)/urcu.c $(top_srcdir)/urcu-pointer.c $(top_srcdir)/wfqu
 URCU_BP=$(top_srcdir)/urcu-bp.c $(top_srcdir)/urcu-pointer.c $(top_srcdir)/wfqueue.c $(COMPAT)
 URCU_DEFER=$(top_srcdir)/urcu.c $(top_srcdir)/urcu-pointer.c $(top_srcdir)/wfqueue.c $(COMPAT)
 
+URCU_COMMON_LIB=$(top_builddir)/liburcu-common.la
 URCU_LIB=$(top_builddir)/liburcu.la
-URCU_CDS_LIB=$(top_builddir)/liburcu-cds.la
 URCU_QSBR_LIB=$(top_builddir)/liburcu-qsbr.la
-URCU_CDS_QSBR_LIB=$(top_builddir)/liburcu-cds-qsbr.la
 URCU_MB_LIB=$(top_builddir)/liburcu-mb.la
-URCU_CDS_MB_LIB=$(top_builddir)/liburcu-cds-mb.la
 URCU_SIGNAL_LIB=$(top_builddir)/liburcu-signal.la
-URCU_CDS_SIGNAL_LIB=$(top_builddir)/liburcu-cds-signal.la
 URCU_BP_LIB=$(top_builddir)/liburcu-bp.la
-URCU_CDS_BP_LIB=$(top_builddir)/liburcu-cds-bp.la
-URCU_CDS_COMMON_LIB=$(top_builddir)/liburcu-cds-common.la
+URCU_CDS_LIB=$(top_builddir)/liburcu-cds.la
 
 EXTRA_DIST = $(top_srcdir)/tests/api.h runall.sh
 
@@ -164,20 +160,20 @@ test_urcu_lfq_dynlink_SOURCES = test_urcu_lfq.c $(URCU)
 test_urcu_lfq_dynlink_CFLAGS = -DDYNAMIC_LINK_TEST $(AM_CFLAGS)
 test_urcu_lfq_dynlink_LDADD = $(URCU_CDS_LIB)
 
-test_urcu_wfq_SOURCES = test_urcu_wfq.c $(URCU_CDS_COMMON_LIB) $(COMPAT)
+test_urcu_wfq_SOURCES = test_urcu_wfq.c $(URCU_COMMON_LIB)
 test_urcu_wfq_dynlink_SOURCES = test_urcu_wfq.c
 test_urcu_wfq_dynlink_CFLAGS = -DDYNAMIC_LINK_TEST $(AM_CFLAGS)
-test_urcu_wfq_dynlink_LDADD = $(URCU_CDS_COMMON_LIB)
+test_urcu_wfq_dynlink_LDADD = $(URCU_COMMON_LIB)
 
 test_urcu_lfs_SOURCES = test_urcu_lfs.c $(URCU_CDS_LIB) $(URCU_DEFER)
 test_urcu_lfs_dynlink_SOURCES = test_urcu_lfs.c $(URCU_DEFER)
 test_urcu_lfs_dynlink_CFLAGS = -DDYNAMIC_LINK_TEST $(AM_CFLAGS)
 test_urcu_lfs_dynlink_LDADD = $(URCU_CDS_LIB)
 
-test_urcu_wfs_SOURCES = test_urcu_wfs.c $(URCU_CDS_COMMON_LIB) $(COMPAT)
+test_urcu_wfs_SOURCES = test_urcu_wfs.c $(URCU_COMMON_LIB)
 test_urcu_wfs_dynlink_SOURCES = test_urcu_wfs.c
 test_urcu_wfs_dynlink_CFLAGS = -DDYNAMIC_LINK_TEST $(AM_CFLAGS)
-test_urcu_wfs_dynlink_LDADD = $(URCU_CDS_COMMON_LIB)
+test_urcu_wfs_dynlink_LDADD = $(URCU_COMMON_LIB)
 
 urcutorture.c: api.h
 
index f62b5b38f15ec28a9a61f5af37c657dd52af7b21..4abe8dccb1bc8d56358baedf9f5457eb608730c8 100644 (file)
 #define rcu_defer_barrier              rcu_defer_barrier_bp
 #define rcu_defer_barrier_thread       rcu_defer_barrier_thread_bp
 
-/* Concurrent Data Structures */
-#define cds_lfq_node_init_rcu          cds_lfq_node_init_rcu_bp
-#define cds_lfq_init_rcu               cds_lfq_init_rcu_bp
-#define cds_lfq_destroy_rcu            cds_lfq_destroy_rcu_bp
-#define cds_lfq_enqueue_rcu            cds_lfq_enqueue_rcu_bp
-#define cds_lfq_dequeue_rcu            cds_lfq_dequeue_rcu_bp
-
-#define cds_lfs_node_init_rcu          cds_lfs_node_init_rcu_bp
-#define cds_lfs_init_rcu               cds_lfs_init_rcu_bp
-#define cds_lfs_push_rcu               cds_lfs_push_rcu_bp
-#define cds_lfs_pop_rcu                        cds_lfs_pop_rcu_bp
-
 #endif /* _URCU_BP_MAP_H */
index 6e4a1963413775e28ebbe6e6a364c6adc4ce12f9..0d88d83afa3d70946f131c36fdf296aeea3a4c28 100644 (file)
 #define        rcu_defer_barrier               rcu_defer_barrier_qsbr
 #define rcu_defer_barrier_thread       rcu_defer_barrier_thread_qsbr
 
-/* Concurrent Data Structures */
-#define cds_lfq_node_init_rcu          cds_lfq_node_init_rcu_qsbr
-#define cds_lfq_init_rcu               cds_lfq_init_rcu_qsbr
-#define cds_lfq_destroy_rcu            cds_lfq_destroy_rcu_qsbr
-#define cds_lfq_enqueue_rcu            cds_lfq_enqueue_rcu_qsbr
-#define cds_lfq_dequeue_rcu            cds_lfq_dequeue_rcu_qsbr
-
-#define cds_lfs_node_init_rcu          cds_lfs_node_init_rcu_qsbr
-#define cds_lfs_init_rcu               cds_lfs_init_rcu_qsbr
-#define cds_lfs_push_rcu               cds_lfs_push_rcu_qsbr
-#define cds_lfs_pop_rcu                        cds_lfs_pop_rcu_qsbr
-
 #endif /* _URCU_QSBR_MAP_H */
index 90c2f65a79a04096b244bf95692fdeb0213be417..3f436a7375120366bca0898aafd3debdc45a48a5 100644 (file)
 #define rcu_defer_barrier              rcu_defer_barrier_memb
 #define rcu_defer_barrier_thread       rcu_defer_barrier_thread_memb
 
-/* Concurrent Data Structures */
-#define cds_lfq_node_init_rcu          cds_lfq_node_init_rcu_memb
-#define cds_lfq_init_rcu               cds_lfq_init_rcu_memb
-#define cds_lfq_destroy_rcu            cds_lfq_destroy_rcu_memb
-#define cds_lfq_enqueue_rcu            cds_lfq_enqueue_rcu_memb
-#define cds_lfq_dequeue_rcu            cds_lfq_dequeue_rcu_memb
-
-#define cds_lfs_node_init_rcu          cds_lfs_node_init_rcu_memb
-#define cds_lfs_init_rcu               cds_lfs_init_rcu_memb
-#define cds_lfs_push_rcu               cds_lfs_push_rcu_memb
-#define cds_lfs_pop_rcu                        cds_lfs_pop_rcu_memb
-
 #elif defined(RCU_SIGNAL)
 
 #define rcu_read_lock                  rcu_read_lock_sig
 #define rcu_defer_barrier              rcu_defer_barrier_sig
 #define rcu_defer_barrier_thread       rcu_defer_barrier_thread_sig
 
-/* Concurrent Data Structures */
-#define cds_lfq_node_init_rcu          cds_lfq_node_init_rcu_sig
-#define cds_lfq_init_rcu               cds_lfq_init_rcu_sig
-#define cds_lfq_destroy_rcu            cds_lfq_destroy_rcu_sig
-#define cds_lfq_enqueue_rcu            cds_lfq_enqueue_rcu_sig
-#define cds_lfq_dequeue_rcu            cds_lfq_dequeue_rcu_sig
-
-#define cds_lfs_node_init_rcu          cds_lfs_node_init_rcu_sig
-#define cds_lfs_init_rcu               cds_lfs_init_rcu_sig
-#define cds_lfs_push_rcu               cds_lfs_push_rcu_sig
-#define cds_lfs_pop_rcu                        cds_lfs_pop_rcu_sig
-
 #elif defined(RCU_MB)
 
 #define rcu_read_lock                  rcu_read_lock_mb
 #define rcu_defer_barrier              rcu_defer_barrier_mb
 #define rcu_defer_barrier_thread       rcu_defer_barrier_thread_mb
 
-/* Concurrent Data Structures */
-#define cds_lfq_node_init_rcu          cds_lfq_node_init_rcu_mb
-#define cds_lfq_init_rcu               cds_lfq_init_rcu_mb
-#define cds_lfq_destroy_rcu            cds_lfq_destroy_rcu_mb
-#define cds_lfq_enqueue_rcu            cds_lfq_enqueue_rcu_mb
-#define cds_lfq_dequeue_rcu            cds_lfq_dequeue_rcu_mb
-
-#define cds_lfs_node_init_rcu          cds_lfs_node_init_rcu_mb
-#define cds_lfs_init_rcu               cds_lfs_init_rcu_mb
-#define cds_lfs_push_rcu               cds_lfs_push_rcu_mb
-#define cds_lfs_pop_rcu                        cds_lfs_pop_rcu_mb
-
 #else
 
 #error "Undefined selection"
index e1d64f13d5229e251674919189c8f28d780c8d50..598fa5071a2ca727e43d07a67cb2a62eb4980632 100644 (file)
@@ -47,35 +47,11 @@ struct cds_lfq_queue_rcu {
 
 #include <urcu/static/rculfqueue.h>
 
-#define cds_lfq_node_init_rcu_qsbr     _cds_lfq_node_init_rcu
-#define cds_lfq_init_rcu_qsbr          _cds_lfq_init_rcu
-#define cds_lfq_destroy_rcu_qsbr       _cds_lfq_destroy_rcu
-#define cds_lfq_enqueue_rcu_qsbr       _cds_lfq_enqueue_rcu
-#define cds_lfq_dequeue_rcu_qsbr       _cds_lfq_dequeue_rcu
-
-#define cds_lfq_node_init_rcu_bp       _cds_lfq_node_init_rcu
-#define cds_lfq_init_rcu_bp            _cds_lfq_init_rcu
-#define cds_lfq_destroy_rcu_bp         _cds_lfq_destroy_rcu
-#define cds_lfq_enqueue_rcu_bp         _cds_lfq_enqueue_rcu
-#define cds_lfq_dequeue_rcu_bp         _cds_lfq_dequeue_rcu
-
-#define cds_lfq_node_init_rcu_memb     _cds_lfq_node_init_rcu
-#define cds_lfq_init_rcu_memb          _cds_lfq_init_rcu
-#define cds_lfq_destroy_rcu_memb       _cds_lfq_destroy_rcu
-#define cds_lfq_enqueue_rcu_memb       _cds_lfq_enqueue_rcu
-#define cds_lfq_dequeue_rcu_memb       _cds_lfq_dequeue_rcu
-
-#define cds_lfq_node_init_rcu_mb       _cds_lfq_node_init_rcu
-#define cds_lfq_init_rcu_mb            _cds_lfq_init_rcu
-#define cds_lfq_destroy_rcu_mb         _cds_lfq_destroy_rcu
-#define cds_lfq_enqueue_rcu_mb         _cds_lfq_enqueue_rcu
-#define cds_lfq_dequeue_rcu_mb         _cds_lfq_dequeue_rcu
-
-#define cds_lfq_node_init_rcu_sig      _cds_lfq_node_init_rcu
-#define cds_lfq_init_rcu_sig           _cds_lfq_init_rcu
-#define cds_lfq_destroy_rcu_sig                _cds_lfq_destroy_rcu
-#define cds_lfq_enqueue_rcu_sig                _cds_lfq_enqueue_rcu
-#define cds_lfq_dequeue_rcu_sig                _cds_lfq_dequeue_rcu
+#define cds_lfq_node_init_rcu          _cds_lfq_node_init_rcu
+#define cds_lfq_init_rcu               _cds_lfq_init_rcu
+#define cds_lfq_destroy_rcu            _cds_lfq_destroy_rcu
+#define cds_lfq_enqueue_rcu            _cds_lfq_enqueue_rcu
+#define cds_lfq_dequeue_rcu            _cds_lfq_dequeue_rcu
 
 #else /* !_LGPL_SOURCE */
 
index 7d359d4ce34ce7dc5a02cfd0c3207f1ec9c1d720..93c0bc92f82544043906d3aca51dc63d6d7995c9 100644 (file)
@@ -39,30 +39,10 @@ struct cds_lfs_stack_rcu {
 
 #include <urcu/static/rculfstack.h>
 
-#define cds_lfs_node_init_rcu_qsbr     _cds_lfs_node_init_rcu
-#define cds_lfs_init_rcu_qsbr          _cds_lfs_init_rcu
-#define cds_lfs_push_rcu_qsbr          _cds_lfs_push_rcu
-#define cds_lfs_pop_rcu_qsbr           _cds_lfs_pop_rcu
-
-#define cds_lfs_node_init_rcu_bp       _cds_lfs_node_init_rcu
-#define cds_lfs_init_rcu_bp            _cds_lfs_init_rcu
-#define cds_lfs_push_rcu_bp            _cds_lfs_push_rcu
-#define cds_lfs_pop_rcu_bp             _cds_lfs_pop_rcu
-
-#define cds_lfs_node_init_rcu_memb     _cds_lfs_node_init_rcu
-#define cds_lfs_init_rcu_memb          _cds_lfs_init_rcu
-#define cds_lfs_push_rcu_memb          _cds_lfs_push_rcu
-#define cds_lfs_pop_rcu_memb           _cds_lfs_pop_rcu
-
-#define cds_lfs_node_init_rcu_mb       _cds_lfs_node_init_rcu
-#define cds_lfs_init_rcu_mb            _cds_lfs_init_rcu
-#define cds_lfs_push_rcu_mb            _cds_lfs_push_rcu
-#define cds_lfs_pop_rcu_mb             _cds_lfs_pop_rcu
-
-#define cds_lfs_node_init_rcu_sig      _cds_lfs_node_init_rcu
-#define cds_lfs_init_rcu_sig           _cds_lfs_init_rcu
-#define cds_lfs_push_rcu_sig           _cds_lfs_push_rcu
-#define cds_lfs_pop_rcu_sig            _cds_lfs_pop_rcu
+#define cds_lfs_node_init_rcu          _cds_lfs_node_init_rcu
+#define cds_lfs_init_rcu               _cds_lfs_init_rcu
+#define cds_lfs_push_rcu               _cds_lfs_push_rcu
+#define cds_lfs_pop_rcu                        _cds_lfs_pop_rcu
 
 #else /* !_LGPL_SOURCE */
 
index fea6110b4f466cb011d7f3e36f8b923bbd1f75b2..af73c6f2ef7565dc69e16f62d539ded7ed66d583 100644 (file)
@@ -28,6 +28,7 @@
 
 #include <urcu-call-rcu.h>
 #include <urcu/uatomic.h>
+#include <urcu-pointer.h>
 #include <assert.h>
 #include <errno.h>
 
index 4259e0c00bb9e821568b3720c0d46fe8d23ea8ca..3473ccef82299b0b41559734e75377b2ac0f1941 100644 (file)
@@ -27,6 +27,7 @@
  */
 
 #include <urcu/uatomic.h>
+#include <urcu-pointer.h>
 
 #ifdef __cplusplus
 extern "C" {
This page took 0.044061 seconds and 4 git commands to generate.