From 71c811bf8db75c9502b295edb1e190f978682b65 Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Thu, 18 Aug 2011 13:41:11 -0400 Subject: [PATCH] urcu libraries can directly use the _LGPL_SOURCE wfqueue No need to link dynamically with the data structure object. Signed-off-by: Mathieu Desnoyers --- Makefile.am | 5 ----- urcu-bp.c | 6 +++++- urcu-qsbr.c | 6 +++++- urcu.c | 6 +++++- 4 files changed, 15 insertions(+), 8 deletions(-) diff --git a/Makefile.am b/Makefile.am index 7f30a20..6378af4 100644 --- a/Makefile.am +++ b/Makefile.am @@ -42,28 +42,23 @@ lib_LTLIBRARIES = liburcu-cds-common.la \ liburcu_cds_common_la_SOURCES = wfqueue.c wfstack.c $(COMPAT) liburcu_la_SOURCES = urcu.c urcu-pointer.c $(COMPAT) -liburcu_la_LIBADD = liburcu-cds-common.la liburcu_cds_la_SOURCES = rculfqueue.c rculfstack.c $(COMPAT) liburcu_qsbr_la_SOURCES = urcu-qsbr.c urcu-pointer.c $(COMPAT) -liburcu_qsbr_la_LIBADD = liburcu-cds-common.la liburcu_cds_qsbr_la_SOURCES = rculfqueue.c rculfstack.c $(COMPAT) liburcu_cds_qsbr_la_CFLAGS = -DRCU_QSBR liburcu_mb_la_SOURCES = urcu.c urcu-pointer.c $(COMPAT) liburcu_mb_la_CFLAGS = -DRCU_MB -liburcu_mb_la_LIBADD = liburcu-cds-common.la liburcu_cds_mb_la_SOURCES = rculfqueue.c rculfstack.c $(COMPAT) liburcu_cds_mb_la_CFLAGS = -DRCU_MB liburcu_signal_la_SOURCES = urcu.c urcu-pointer.c $(COMPAT) liburcu_signal_la_CFLAGS = -DRCU_SIGNAL -liburcu_signal_la_LIBADD = liburcu-cds-common.la liburcu_cds_signal_la_SOURCES = rculfqueue.c rculfstack.c $(COMPAT) liburcu_cds_signal_la_CFLAGS = -DRCU_SIGNAL liburcu_bp_la_SOURCES = urcu-bp.c urcu-pointer.c $(COMPAT) -liburcu_bp_la_LIBADD = liburcu-cds-common.la liburcu_cds_bp_la_SOURCES = rculfqueue.c rculfstack.c $(COMPAT) liburcu_cds_bp_la_CFLAGS = -DRCU_BP diff --git a/urcu-bp.c b/urcu-bp.c index 7412b5b..80eaefe 100644 --- a/urcu-bp.c +++ b/urcu-bp.c @@ -24,6 +24,7 @@ */ #define _GNU_SOURCE +#define _LGPL_SOURCE #include #include #include @@ -35,11 +36,14 @@ #include #include +#include "urcu/wfqueue.h" #include "urcu/map/urcu-bp.h" - #include "urcu/static/urcu-bp.h" + /* Do not #define _LGPL_SOURCE to ensure we can emit the wrapper symbols */ +#undef _LGPL_SOURCE #include "urcu-bp.h" +#define _LGPL_SOURCE #ifndef MAP_ANONYMOUS #define MAP_ANONYMOUS MAP_ANON diff --git a/urcu-qsbr.c b/urcu-qsbr.c index 8d8a9cf..5e43484 100644 --- a/urcu-qsbr.c +++ b/urcu-qsbr.c @@ -24,6 +24,7 @@ */ #define _GNU_SOURCE +#define _LGPL_SOURCE #include #include #include @@ -34,12 +35,15 @@ #include #include +#include "urcu/wfqueue.h" #include "urcu/map/urcu-qsbr.h" - #define BUILD_QSBR_LIB #include "urcu/static/urcu-qsbr.h" + /* Do not #define _LGPL_SOURCE to ensure we can emit the wrapper symbols */ +#undef _LGPL_SOURCE #include "urcu-qsbr.h" +#define _LGPL_SOURCE void __attribute__((destructor)) rcu_exit(void); diff --git a/urcu.c b/urcu.c index be6d4bd..20bbf36 100644 --- a/urcu.c +++ b/urcu.c @@ -25,6 +25,7 @@ #define _BSD_SOURCE #define _GNU_SOURCE +#define _LGPL_SOURCE #include #include #include @@ -35,11 +36,14 @@ #include #include +#include "urcu/wfqueue.h" #include "urcu/map/urcu.h" - #include "urcu/static/urcu.h" + /* Do not #define _LGPL_SOURCE to ensure we can emit the wrapper symbols */ +#undef _LGPL_SOURCE #include "urcu.h" +#define _LGPL_SOURCE /* * If a reader is really non-cooperative and refuses to commit its -- 2.34.1