Introduce URCU_INLINE_SMALL_FUNCTIONS
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Sun, 11 Aug 2013 20:29:27 +0000 (16:29 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 12 Aug 2013 00:47:39 +0000 (20:47 -0400)
Reviewed-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
README
urcu-pointer.h

diff --git a/README b/README
index 218b4be16f1fd17f1c54b9761372b2d1e4eb1466..77fe3607724af10640d89e7000b3440cc86be8fe 100644 (file)
--- a/README
+++ b/README
@@ -101,6 +101,19 @@ Usage of all urcu libraries
          instead of inlines, so your application can link with the library.
        * Linking with one of the libraries below is always necessary even for
          LGPL and GPL applications.
+       * Define URCU_INLINE_SMALL_FUNCTIONS before including Userspace RCU
+         headers if you want Userspace RCU to inline small functions (10
+         lines or less) into the application. It can be used by applications
+         distributed under any kind of license, and does *not* make the
+         application a derived work of Userspace RCU.
+
+         Those small inlined functions are guaranteed to match the library
+         content as long as the library major version is unchanged.
+         Therefore, the application *must* be compiled with headers matching
+         the library major version number. Applications using
+         URCU_INLINE_SMALL_FUNCTIONS may be unable to use debugging
+         features of Userspace RCU without being recompiled.
+
 
 Usage of liburcu
 
index 03bfe793c6aaf339a03d7aa0e64bed0b105a8646..5be986ca65a0d6aab3027812fdbc2f0b4acdffb5 100644 (file)
@@ -34,7 +34,7 @@
 extern "C" {
 #endif 
 
-#ifdef _LGPL_SOURCE
+#if defined(_LGPL_SOURCE) || defined(URCU_INLINE_SMALL_FUNCTIONS)
 
 #include <urcu/static/urcu-pointer.h>
 
@@ -62,7 +62,7 @@ extern "C" {
 #define rcu_xchg_pointer       _rcu_xchg_pointer
 #define rcu_set_pointer                _rcu_set_pointer
 
-#else /* !_LGPL_SOURCE */
+#else /* !(defined(_LGPL_SOURCE) || defined(URCU_INLINE_SMALL_FUNCTIONS)) */
 
 extern void *rcu_dereference_sym(void *p);
 #define rcu_dereference(p)                                                  \
@@ -108,7 +108,7 @@ extern void *rcu_set_pointer_sym(void **p, void *v);
                                            _________pv);                    \
        } while (0)
 
-#endif /* !_LGPL_SOURCE */
+#endif /* !(defined(_LGPL_SOURCE) || defined(URCU_INLINE_SMALL_FUNCTIONS)) */
 
 /*
  * void rcu_assign_pointer(type *ptr, type *new)
This page took 0.034288 seconds and 4 git commands to generate.