From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
To: lttng-dev@lists.lttng.org
Cc: jiangshanlai@gmail.com
Subject: Horrible hack to make C++ link to liburcu
Date: Fri, 4 Mar 2016 12:32:54 -0800 [thread overview]
Message-ID: <20160304203254.GA2033__38167.4626762562$1457124801$gmane$org@linux.vnet.ibm.com> (raw)
Hello!
Still working with the C++ standards committee to add RCU to C++, and
of course one step on that path is to make C++ programs build against
liburcu. The following hack-patch makes this work by disabling C++ access
to wfcqueue and by making C++ see the rcu_head ->next field as a void *.
This supports prototyping, but what would be the real fix?
Thanx, Paul
------------------------------------------------------------------------
diff --git a/urcu-call-rcu.h b/urcu-call-rcu.h
index 339ebacc3f7c..d37c49e9d958 100644
--- a/urcu-call-rcu.h
+++ b/urcu-call-rcu.h
@@ -32,7 +32,9 @@
#include <stdlib.h>
#include <pthread.h>
+#ifndef __cplusplus
#include <urcu/wfcqueue.h>
+#endif
#ifdef __cplusplus
extern "C" {
@@ -57,7 +59,11 @@ struct call_rcu_data;
*/
struct rcu_head {
+#ifdef __cplusplus
+ void *next;
+#else
struct cds_wfcq_node next;
+#endif
void (*func)(struct rcu_head *head);
};
next reply other threads:[~2016-03-04 20:52 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-04 20:32 Paul E. McKenney [this message]
[not found] <20160304203254.GA2033@linux.vnet.ibm.com>
2016-03-05 15:10 ` Horrible hack to make C++ link to liburcu Mathieu Desnoyers
[not found] ` <410832705.17244.1457190630579.JavaMail.zimbra@efficios.com>
2016-03-08 0:31 ` Mathieu Desnoyers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='20160304203254.GA2033__38167.4626762562$1457124801$gmane$org@linux.vnet.ibm.com' \
--to=paulmck@linux.vnet.ibm.com \
--cc=jiangshanlai@gmail.com \
--cc=lttng-dev@lists.lttng.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).