Merge branch 'master' into urcu/ht-shrink
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 5 Dec 2011 23:37:50 +0000 (18:37 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 5 Dec 2011 23:37:50 +0000 (18:37 -0500)
Conflicts:
Makefile.am
urcu-bp.c

ChangeLog
Makefile.am
README
configure.ac
urcu-bp.c
urcu-bp.h
urcu-call-rcu.h

index 30e7b4190d9fd76d21bbed6a7b709292639d17d0..b387acdd1f7a4d92eb7d9a848e863b80706a48bf 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2011-11-03 Userspace RCU 0.6.6
+       * qsbr vs call_rcu : remove exit assertion
+       * Rename likely/unlikely to caa_likely/caa_unlikely
+       * Reinsert missing test_urcu_*.c files (missing in rename)
+       * rename test_qsbr to test_urcu_qsbr
+       * urcu-pointer: fix rcu_set_pointer unset return value
+       * Enhance API.txt documentation, add to Makefile as EXTRA_DIST
+
 2011-09-29 Userspace RCU 0.6.5
        * call_rcu: Document call_rcu requirements
        * call_rcu: fix error handling of malloc error
index 91a9fd144645dea22a9ac609e22bdb9a19112042..e1bf095458db0cd891dbaef174b158be07743156 100644 (file)
@@ -23,7 +23,8 @@ EXTRA_DIST = $(top_srcdir)/urcu/arch/*.h $(top_srcdir)/urcu/uatomic/*.h \
                README LICENSE compat_arch_x86.c \
                urcu-call-rcu-impl.h urcu-defer-impl.h \
                rculfhash-internal.h \
-               ChangeLog API.txt
+               ChangeLog API.txt \
+               $(top_srcdir)/tests/*.sh
 
 if COMPAT_ARCH
 COMPAT=compat_arch_@ARCHTYPE@.c
diff --git a/README b/README
index e3800faad2d10cc5789c0a622c14f5ade9962ae1..ce25e3a3dabc8977f7a4dc5d4e391e5238e455fc 100644 (file)
--- a/README
+++ b/README
@@ -44,6 +44,21 @@ supported, with the following exceptions:
 - Alpha, ia64 and ARM architectures depend on 4.x gcc with atomic builtins
   support.
 
+For developers using the git tree:
+
+This source tree is based on the autotools suite from GNU to simplify
+portability. Here are some things you should have on your system in order to
+compile the git repository tree :
+
+- GNU autotools (automake >=1.10, autoconf >=2.50, autoheader >=2.50)
+  (make sure your system wide "automake" points to a recent version!)
+- GNU Libtool >=2.2
+  (for more information, go to http://www.gnu.org/software/autoconf/)
+
+If you get the tree from the repository, you will need to use the "bootstrap"
+script in the root of the tree. It calls all the GNU tools needed to prepare the
+tree configuration.
+
 
 QUICK START GUIDE
 -----------------
index 68dc1906dd37bed5fcf46fd10c4671d467358110..ce06254ac7621417c9208511c4cf4a86c750e688 100644 (file)
@@ -2,7 +2,7 @@
 # Process this file with autoconf to produce a configure script.
 
 
-AC_INIT([userspace-rcu], [0.6.5], [mathieu dot desnoyers at efficios dot com])
+AC_INIT([userspace-rcu],[0.6.6],[mathieu dot desnoyers at efficios dot com])
 
 # Following the numbering scheme proposed by libtool for the library version
 # http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
@@ -30,7 +30,7 @@ AH_TEMPLATE([CONFIG_RCU_ARM_HAVE_DMB], [Use the dmb instruction is available for
 # Checks for programs.
 AC_PROG_CC
 AC_PROG_MAKE_SET
-AC_PROG_LIBTOOL
+LT_INIT
 
 # Checks for typedefs, structures, and compiler characteristics.
 AC_C_INLINE
@@ -48,6 +48,7 @@ case $host_cpu in
        i486) ARCHTYPE="x86";;
        i586) ARCHTYPE="x86";;
        i686) ARCHTYPE="x86";;
+       amd64) ARCHTYPE="x86";;
        x86_64) ARCHTYPE="x86";;
        powerpc) ARCHTYPE="ppc" ;;
        ppc64) ARCHTYPE="ppc" ;;
@@ -64,21 +65,17 @@ esac
 
 if test "x$ARCHTYPE" = "xarm" ; then
 AC_MSG_CHECKING([checking for dmb instruction])
-AC_TRY_COMPILE(
-[
-],
-[
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+]], [[
 asm volatile("dmb":::"memory");
-],
-[
+]])],[
        AC_MSG_RESULT([yes])
        AC_DEFINE([CONFIG_RCU_ARM_HAVE_DMB], [1])
-]
-,
-[
+
+],[
        AC_MSG_RESULT([no])
-]
-)
+
+])
 fi
 
 UATOMICSRC=urcu/uatomic/$ARCHTYPE.h
@@ -103,26 +100,22 @@ fi
 ]
 
 AC_MSG_CHECKING([sys_futex()])
-AC_TRY_COMPILE(
-[
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
 #include <sys/syscall.h>
-],
-[
+]], [[
 #ifndef __NR_futex
 #error "futexes not available"
 #endif
-],
-[
+]])],[
        AC_MSG_RESULT([yes])
        AC_DEFINE([CONFIG_RCU_HAVE_FUTEX], [1])
        compat_futex_test=0
-]
-,
-[
+
+],[
        AC_MSG_RESULT([no])
        compat_futex_test=1
-]
-)
+
+])
 
 AM_CONDITIONAL([COMPAT_FUTEX], [ test "x$compat_futex_test" = "x1" ])
 
index 3b2062d6590034ad33619ab1372b137237a9fd1e..912e9b2ea31ad7c42d46a8f9d31f88f6d46a4361 100644 (file)
--- a/urcu-bp.c
+++ b/urcu-bp.c
@@ -421,6 +421,29 @@ void rcu_bp_after_fork_child(void)
        assert(!ret);
 }
 
+void *rcu_dereference_sym_bp(void *p)
+{
+       return _rcu_dereference(p);
+}
+
+void *rcu_set_pointer_sym_bp(void **p, void *v)
+{
+       cmm_wmb();
+       return uatomic_set(p, v);
+}
+
+void *rcu_xchg_pointer_sym_bp(void **p, void *v)
+{
+       cmm_wmb();
+       return uatomic_xchg(p, v);
+}
+
+void *rcu_cmpxchg_pointer_sym_bp(void **p, void *old, void *_new)
+{
+       cmm_wmb();
+       return uatomic_cmpxchg(p, old, _new);
+}
+
 DEFINE_RCU_FLAVOR()
 
 #include "urcu-call-rcu-impl.h"
index efb5dca8f92c1186b2187bbfa8ee40f9fa911ab4..3623f358bb520c503bc9e863d176101f679b02de 100644 (file)
--- a/urcu-bp.h
+++ b/urcu-bp.h
 #include <stdlib.h>
 #include <pthread.h>
 
-/*
- * See urcu-pointer.h and urcu/static/urcu-pointer.h for pointer
- * publication headers.
- */
-#include <urcu-pointer.h>
-
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -57,6 +51,12 @@ extern "C" {
  * rcu_unregister_thread() should be called before the thread exits.
  */
 
+/*
+ * See urcu-pointer.h and urcu/static/urcu-pointer.h for pointer
+ * publication headers.
+ */
+#include <urcu-pointer.h>
+
 #ifdef _LGPL_SOURCE
 
 #include <urcu/static/urcu-bp.h>
@@ -75,6 +75,11 @@ extern "C" {
 #define rcu_read_lock_bp               _rcu_read_lock
 #define rcu_read_unlock_bp             _rcu_read_unlock
 
+#define rcu_dereference_bp             rcu_dereference
+#define rcu_cmpxchg_pointer_bp         rcu_cmpxchg_pointer
+#define rcu_xchg_pointer_bp            rcu_xchg_pointer
+#define rcu_set_pointer_bp             rcu_set_pointer
+
 #else /* !_LGPL_SOURCE */
 
 /*
@@ -82,8 +87,54 @@ extern "C" {
  * See LGPL-only urcu/static/urcu-pointer.h for documentation.
  */
 
-extern void rcu_read_lock(void);
-extern void rcu_read_unlock(void);
+extern void rcu_read_lock(void)
+       __attribute__((weak));
+extern void rcu_read_unlock(void)
+       __attribute__((weak));
+
+extern void *rcu_dereference_sym_bp(void *p)
+       __attribute__((weak));
+#define rcu_dereference_bp(p)                                               \
+       ({                                                                   \
+               typeof(p) _________p1 = URCU_FORCE_CAST(typeof(p),           \
+                       rcu_dereference_sym_bp(URCU_FORCE_CAST(void *, p))); \
+               (_________p1);                                               \
+       })
+
+extern void *rcu_cmpxchg_pointer_sym_bp(void **p, void *old, void *_new)
+       __attribute__((weak));
+#define rcu_cmpxchg_pointer_bp(p, old, _new)                                \
+       ({                                                                   \
+               typeof(*(p)) _________pold = (old);                          \
+               typeof(*(p)) _________pnew = (_new);                         \
+               typeof(*(p)) _________p1 = URCU_FORCE_CAST(typeof(*(p)),     \
+                       rcu_cmpxchg_pointer_sym_bp(URCU_FORCE_CAST(void **, p),\
+                                               _________pold,               \
+                                               _________pnew));             \
+               (_________p1);                                               \
+       })
+
+extern void *rcu_xchg_pointer_sym_bp(void **p, void *v)
+       __attribute__((weak));
+#define rcu_xchg_pointer_bp(p, v)                                           \
+       ({                                                                   \
+               typeof(*(p)) _________pv = (v);                              \
+               typeof(*(p)) _________p1 = URCU_FORCE_CAST(typeof(*(p)),     \
+                       rcu_xchg_pointer_sym_bp(URCU_FORCE_CAST(void **, p), \
+                                            _________pv));                  \
+               (_________p1);                                               \
+       })
+
+extern void *rcu_set_pointer_sym_bp(void **p, void *v)
+       __attribute__((weak));
+#define rcu_set_pointer_bp(p, v)                                            \
+       ({                                                                   \
+               typeof(*(p)) _________pv = (v);                              \
+               typeof(*(p)) _________p1 = URCU_FORCE_CAST(typeof(*(p)),     \
+                       rcu_set_pointer_sym_bp(URCU_FORCE_CAST(void **, p),  \
+                                           _________pv));                   \
+               (_________p1);                                               \
+       })
 
 #endif /* !_LGPL_SOURCE */
 
index 8df44ef3adfc35bc4f2da2379c0241fc4db05aae..b109f4e4d16f250b1f5fdcb2e01e196f3539f238 100644 (file)
@@ -86,6 +86,8 @@ int set_cpu_call_rcu_data(int cpu, struct call_rcu_data *crdp);
 int create_all_cpu_call_rcu_data(unsigned long flags);
 void free_all_cpu_call_rcu_data(void);
 
+void call_rcu_before_fork(void);
+void call_rcu_after_fork_parent(void);
 void call_rcu_after_fork_child(void);
 
 #ifdef __cplusplus 
This page took 0.029344 seconds and 4 git commands to generate.