Headers: move *-map.h headers to urcu/map/
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 10 Jun 2011 19:16:36 +0000 (15:16 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 10 Jun 2011 19:16:36 +0000 (15:16 -0400)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 files changed:
urcu-bp-map.h [deleted file]
urcu-bp.c
urcu-bp.h
urcu-map.h [deleted file]
urcu-qsbr-map.h [deleted file]
urcu-qsbr.c
urcu-qsbr.h
urcu.c
urcu.h
urcu/map/urcu-bp.h [new file with mode: 0644]
urcu/map/urcu-qsbr.h [new file with mode: 0644]
urcu/map/urcu.h [new file with mode: 0644]

diff --git a/urcu-bp-map.h b/urcu-bp-map.h
deleted file mode 100644 (file)
index 4abe8dc..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-#ifndef _URCU_BP_MAP_H
-#define _URCU_BP_MAP_H
-
-/*
- * urcu-map.h
- *
- * Userspace RCU header -- name mapping to allow multiple flavors to be
- * used in the same executable.
- *
- * Copyright (c) 2009 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
- * Copyright (c) 2009 Paul E. McKenney, IBM Corporation.
- *
- * LGPL-compatible code should include this header with :
- *
- * #define _LGPL_SOURCE
- * #include <urcu.h>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * IBM's contributions to this file may be relicensed under LGPLv2 or later.
- */
-
-/* Mapping macros to allow multiple flavors in a single binary. */
-
-#define rcu_read_lock                  rcu_read_lock_bp
-#define _rcu_read_lock                 _rcu_read_lock_bp
-#define rcu_read_unlock                        rcu_read_unlock_bp
-#define _rcu_read_unlock               _rcu_read_unlock_bp
-#define rcu_register_thread            rcu_register_thread_bp
-#define rcu_unregister_thread          rcu_unregister_thread_bp
-#define rcu_init                       rcu_init_bp
-#define rcu_exit                       rcu_exit_bp
-#define synchronize_rcu                        synchronize_rcu_bp
-#define rcu_reader                     rcu_reader_bp
-#define rcu_gp_ctr                     rcu_gp_ctr_bp
-
-#define get_cpu_call_rcu_data          get_cpu_call_rcu_data_bp
-#define get_call_rcu_thread            get_call_rcu_thread_bp
-#define create_call_rcu_data           create_call_rcu_data_bp
-#define set_cpu_call_rcu_data          set_cpu_call_rcu_data_bp
-#define get_default_call_rcu_data      get_default_call_rcu_data_bp
-#define get_call_rcu_data              get_call_rcu_data_bp
-#define get_thread_call_rcu_data       get_thread_call_rcu_data_bp
-#define set_thread_call_rcu_data       set_thread_call_rcu_data_bp
-#define create_all_cpu_call_rcu_data   create_all_cpu_call_rcu_data_bp
-#define free_all_cpu_call_rcu_data     free_all_cpu_call_rcu_data_bp
-#define call_rcu                       call_rcu_bp
-
-#define defer_rcu                      defer_rcu_bp
-#define rcu_defer_register_thread      rcu_defer_register_thread_bp
-#define rcu_defer_unregister_thread    rcu_defer_unregister_thread_bp
-#define rcu_defer_barrier              rcu_defer_barrier_bp
-#define rcu_defer_barrier_thread       rcu_defer_barrier_thread_bp
-
-#endif /* _URCU_BP_MAP_H */
index 14b200129fe42656ae11e178aa0d3c6442f26061..915debe2c5c2f89da1f1d096f9d5712a5283f28a 100644 (file)
--- a/urcu-bp.c
+++ b/urcu-bp.c
@@ -35,7 +35,7 @@
 #include <unistd.h>
 #include <sys/mman.h>
 
-#include "urcu-bp-map.h"
+#include "urcu/map/urcu-bp.h"
 
 #include "urcu-bp-static.h"
 /* Do not #define _LGPL_SOURCE to ensure we can emit the wrapper symbols */
index 21fe66a8a15e78d784c349a376af5e6d2b6e7bb2..b2b382f1b5fa061c26458e9dc732a721f8759286 100644 (file)
--- a/urcu-bp.h
+++ b/urcu-bp.h
@@ -46,7 +46,7 @@
 extern "C" {
 #endif
 
-#include "urcu-bp-map.h"
+#include "urcu/map/urcu-bp.h"
 
 /*
  * Important !
diff --git a/urcu-map.h b/urcu-map.h
deleted file mode 100644 (file)
index b55e304..0000000
+++ /dev/null
@@ -1,143 +0,0 @@
-#ifndef _URCU_MAP_H
-#define _URCU_MAP_H
-
-/*
- * urcu-map.h
- *
- * Userspace RCU header -- name mapping to allow multiple flavors to be
- * used in the same executable.
- *
- * Copyright (c) 2009 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
- * Copyright (c) 2009 Paul E. McKenney, IBM Corporation.
- *
- * LGPL-compatible code should include this header with :
- *
- * #define _LGPL_SOURCE
- * #include <urcu.h>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * IBM's contributions to this file may be relicensed under LGPLv2 or later.
- */
-
-/* Mapping macros to allow multiple flavors in a single binary. */
-
-#if !defined(RCU_MEMBARRIER) && !defined(RCU_SIGNAL) && !defined(RCU_MB)
-#define RCU_MB
-#endif
-
-#ifdef RCU_MEMBARRIER
-
-#define rcu_read_lock                  rcu_read_lock_memb
-#define _rcu_read_lock                 _rcu_read_lock_memb
-#define rcu_read_unlock                        rcu_read_unlock_memb
-#define _rcu_read_unlock               _rcu_read_unlock_memb
-#define rcu_register_thread            rcu_register_thread_memb
-#define rcu_unregister_thread          rcu_unregister_thread_memb
-#define rcu_init                       rcu_init_memb
-#define rcu_exit                       rcu_exit_memb
-#define synchronize_rcu                        synchronize_rcu_memb
-#define rcu_reader                     rcu_reader_memb
-#define rcu_gp_ctr                     rcu_gp_ctr_memb
-
-#define get_cpu_call_rcu_data          get_cpu_call_rcu_data_memb
-#define get_call_rcu_thread            get_call_rcu_thread_memb
-#define create_call_rcu_data           create_call_rcu_data_memb
-#define set_cpu_call_rcu_data          set_cpu_call_rcu_data_memb
-#define get_default_call_rcu_data      get_default_call_rcu_data_memb
-#define get_call_rcu_data              get_call_rcu_data_memb
-#define get_thread_call_rcu_data       get_thread_call_rcu_data_memb
-#define set_thread_call_rcu_data       set_thread_call_rcu_data_memb
-#define create_all_cpu_call_rcu_data   create_all_cpu_call_rcu_data_memb
-#define free_all_cpu_call_rcu_data     free_all_cpu_call_rcu_data_memb
-#define call_rcu                       call_rcu_memb
-
-#define defer_rcu                      defer_rcu_memb
-#define rcu_defer_register_thread      rcu_defer_register_thread_memb
-#define rcu_defer_unregister_thread    rcu_defer_unregister_thread_memb
-#define rcu_defer_barrier              rcu_defer_barrier_memb
-#define rcu_defer_barrier_thread       rcu_defer_barrier_thread_memb
-
-#elif defined(RCU_SIGNAL)
-
-#define rcu_read_lock                  rcu_read_lock_sig
-#define _rcu_read_lock                 _rcu_read_lock_sig
-#define rcu_read_unlock                        rcu_read_unlock_sig
-#define _rcu_read_unlock               _rcu_read_unlock_sig
-#define rcu_register_thread            rcu_register_thread_sig
-#define rcu_unregister_thread          rcu_unregister_thread_sig
-#define rcu_init                       rcu_init_sig
-#define rcu_exit                       rcu_exit_sig
-#define synchronize_rcu                        synchronize_rcu_sig
-#define rcu_reader                     rcu_reader_sig
-#define rcu_gp_ctr                     rcu_gp_ctr_sig
-
-#define get_cpu_call_rcu_data          get_cpu_call_rcu_data_sig
-#define get_call_rcu_thread            get_call_rcu_thread_sig
-#define create_call_rcu_data           create_call_rcu_data_sig
-#define set_cpu_call_rcu_data          set_cpu_call_rcu_data_sig
-#define get_default_call_rcu_data      get_default_call_rcu_data_sig
-#define get_call_rcu_data              get_call_rcu_data_sig
-#define get_thread_call_rcu_data       get_thread_call_rcu_data_sig
-#define set_thread_call_rcu_data       set_thread_call_rcu_data_sig
-#define create_all_cpu_call_rcu_data   create_all_cpu_call_rcu_data_sig
-#define free_all_cpu_call_rcu_data     free_all_cpu_call_rcu_data_sig
-#define call_rcu                       call_rcu_sig
-
-#define defer_rcu                      defer_rcu_sig
-#define rcu_defer_register_thread      rcu_defer_register_thread_sig
-#define rcu_defer_unregister_thread    rcu_defer_unregister_thread_sig
-#define rcu_defer_barrier              rcu_defer_barrier_sig
-#define rcu_defer_barrier_thread       rcu_defer_barrier_thread_sig
-
-#elif defined(RCU_MB)
-
-#define rcu_read_lock                  rcu_read_lock_mb
-#define _rcu_read_lock                 _rcu_read_lock_mb
-#define rcu_read_unlock                        rcu_read_unlock_mb
-#define _rcu_read_unlock               _rcu_read_unlock_mb
-#define rcu_register_thread            rcu_register_thread_mb
-#define rcu_unregister_thread          rcu_unregister_thread_mb
-#define rcu_init                       rcu_init_mb
-#define rcu_exit                       rcu_exit_mb
-#define synchronize_rcu                        synchronize_rcu_mb
-#define rcu_reader                     rcu_reader_mb
-#define rcu_gp_ctr                     rcu_gp_ctr_mb
-
-#define get_cpu_call_rcu_data          get_cpu_call_rcu_data_mb
-#define get_call_rcu_thread            get_call_rcu_thread_mb
-#define create_call_rcu_data           create_call_rcu_data_mb
-#define set_cpu_call_rcu_data          set_cpu_call_rcu_data_mb
-#define get_default_call_rcu_data      get_default_call_rcu_data_mb
-#define get_call_rcu_data              get_call_rcu_data_mb
-#define get_thread_call_rcu_data       get_thread_call_rcu_data_mb
-#define set_thread_call_rcu_data       set_thread_call_rcu_data_mb
-#define create_all_cpu_call_rcu_data   create_all_cpu_call_rcu_data_mb
-#define free_all_cpu_call_rcu_data     free_all_cpu_call_rcu_data_mb
-#define call_rcu                       call_rcu_mb
-
-#define defer_rcu                      defer_rcu_mb
-#define rcu_defer_register_thread      rcu_defer_register_thread_mb
-#define rcu_defer_unregister_thread    rcu_defer_unregister_thread_mb
-#define rcu_defer_barrier              rcu_defer_barrier_mb
-#define rcu_defer_barrier_thread       rcu_defer_barrier_thread_mb
-
-#else
-
-#error "Undefined selection"
-
-#endif
-
-#endif /* _URCU_MAP_H */
diff --git a/urcu-qsbr-map.h b/urcu-qsbr-map.h
deleted file mode 100644 (file)
index 0d88d83..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-#ifndef _URCU_QSBR_MAP_H
-#define _URCU_QSBR_MAP_H
-
-/*
- * urcu-map.h
- *
- * Userspace RCU header -- name mapping to allow multiple flavors to be
- * used in the same executable.
- *
- * Copyright (c) 2009 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
- * Copyright (c) 2009 Paul E. McKenney, IBM Corporation.
- *
- * LGPL-compatible code should include this header with :
- *
- * #define _LGPL_SOURCE
- * #include <urcu.h>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * IBM's contributions to this file may be relicensed under LGPLv2 or later.
- */
-
-/* Mapping macros to allow multiple flavors in a single binary. */
-
-#define rcu_read_lock                  rcu_read_lock_qsbr
-#define _rcu_read_lock                 _rcu_read_lock_qsbr
-#define rcu_read_unlock                        rcu_read_unlock_qsbr
-#define _rcu_read_unlock               _rcu_read_unlock_qsbr
-#define rcu_quiescent_state            rcu_quiescent_state_qsbr
-#define _rcu_quiescent_state           _rcu_quiescent_state_qsbr
-#define rcu_thread_offline             rcu_thread_offline_qsbr
-#define rcu_thread_online              rcu_thread_online_qsbr
-#define rcu_register_thread            rcu_register_thread_qsbr
-#define rcu_unregister_thread          rcu_unregister_thread_qsbr
-#define rcu_exit                       rcu_exit_qsbr
-#define synchronize_rcu                        synchronize_rcu_qsbr
-#define rcu_reader                     rcu_reader_qsbr
-#define rcu_gp_ctr                     rcu_gp_ctr_qsbr
-
-#define get_cpu_call_rcu_data          get_cpu_call_rcu_data_qsbr
-#define get_call_rcu_thread            get_call_rcu_thread_qsbr
-#define create_call_rcu_data           create_call_rcu_data_qsbr
-#define set_cpu_call_rcu_data          set_cpu_call_rcu_data_qsbr
-#define get_default_call_rcu_data      get_default_call_rcu_data_qsbr
-#define get_call_rcu_data              get_call_rcu_data_qsbr
-#define get_thread_call_rcu_data       get_thread_call_rcu_data_qsbr
-#define set_thread_call_rcu_data       set_thread_call_rcu_data_qsbr
-#define create_all_cpu_call_rcu_data   create_all_cpu_call_rcu_data_qsbr
-#define call_rcu                       call_rcu_qsbr
-
-#define defer_rcu                      defer_rcu_qsbr
-#define rcu_defer_register_thread      rcu_defer_register_thread_qsbr
-#define rcu_defer_unregister_thread    rcu_defer_unregister_thread_qsbr
-#define        rcu_defer_barrier               rcu_defer_barrier_qsbr
-#define rcu_defer_barrier_thread       rcu_defer_barrier_thread_qsbr
-
-#endif /* _URCU_QSBR_MAP_H */
index a4c320acb48b1b91f7da33e92b9fb82b157d0265..bb10bb815550a191e3c50db1237d2299b058b6b3 100644 (file)
@@ -33,7 +33,7 @@
 #include <errno.h>
 #include <poll.h>
 
-#include "urcu-qsbr-map.h"
+#include "urcu/map/urcu-qsbr.h"
 
 #define BUILD_QSBR_LIB
 #include "urcu-qsbr-static.h"
index 75ea14cc0edb8ffa0060c21b1502611704342aad..1d5c568576f9d29dbbbff5683035718dbda2bcd0 100644 (file)
@@ -40,7 +40,7 @@
 extern "C" {
 #endif 
 
-#include "urcu-qsbr-map.h"
+#include "urcu/map/urcu-qsbr.h"
 
 /*
  * Important !
diff --git a/urcu.c b/urcu.c
index fa7499c20e649f232a841f5c5e7699b9eafad640..98c5fbca5d49c3e5f8191e944b8d060b0f7d6438 100644 (file)
--- a/urcu.c
+++ b/urcu.c
@@ -34,7 +34,7 @@
 #include <errno.h>
 #include <poll.h>
 
-#include "urcu-map.h"
+#include "urcu/map/urcu.h"
 
 #include "urcu-static.h"
 /* Do not #define _LGPL_SOURCE to ensure we can emit the wrapper symbols */
diff --git a/urcu.h b/urcu.h
index 15c8c3897f13072fd607c6c97a7cb188b0f14b87..0fa2fea7c4515a8c86be17673668692ac6692684 100644 (file)
--- a/urcu.h
+++ b/urcu.h
@@ -43,7 +43,7 @@
 extern "C" {
 #endif 
 
-#include "urcu-map.h"
+#include "urcu/map/urcu.h"
 
 /*
  * Important !
diff --git a/urcu/map/urcu-bp.h b/urcu/map/urcu-bp.h
new file mode 100644 (file)
index 0000000..4abe8dc
--- /dev/null
@@ -0,0 +1,67 @@
+#ifndef _URCU_BP_MAP_H
+#define _URCU_BP_MAP_H
+
+/*
+ * urcu-map.h
+ *
+ * Userspace RCU header -- name mapping to allow multiple flavors to be
+ * used in the same executable.
+ *
+ * Copyright (c) 2009 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ * Copyright (c) 2009 Paul E. McKenney, IBM Corporation.
+ *
+ * LGPL-compatible code should include this header with :
+ *
+ * #define _LGPL_SOURCE
+ * #include <urcu.h>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * IBM's contributions to this file may be relicensed under LGPLv2 or later.
+ */
+
+/* Mapping macros to allow multiple flavors in a single binary. */
+
+#define rcu_read_lock                  rcu_read_lock_bp
+#define _rcu_read_lock                 _rcu_read_lock_bp
+#define rcu_read_unlock                        rcu_read_unlock_bp
+#define _rcu_read_unlock               _rcu_read_unlock_bp
+#define rcu_register_thread            rcu_register_thread_bp
+#define rcu_unregister_thread          rcu_unregister_thread_bp
+#define rcu_init                       rcu_init_bp
+#define rcu_exit                       rcu_exit_bp
+#define synchronize_rcu                        synchronize_rcu_bp
+#define rcu_reader                     rcu_reader_bp
+#define rcu_gp_ctr                     rcu_gp_ctr_bp
+
+#define get_cpu_call_rcu_data          get_cpu_call_rcu_data_bp
+#define get_call_rcu_thread            get_call_rcu_thread_bp
+#define create_call_rcu_data           create_call_rcu_data_bp
+#define set_cpu_call_rcu_data          set_cpu_call_rcu_data_bp
+#define get_default_call_rcu_data      get_default_call_rcu_data_bp
+#define get_call_rcu_data              get_call_rcu_data_bp
+#define get_thread_call_rcu_data       get_thread_call_rcu_data_bp
+#define set_thread_call_rcu_data       set_thread_call_rcu_data_bp
+#define create_all_cpu_call_rcu_data   create_all_cpu_call_rcu_data_bp
+#define free_all_cpu_call_rcu_data     free_all_cpu_call_rcu_data_bp
+#define call_rcu                       call_rcu_bp
+
+#define defer_rcu                      defer_rcu_bp
+#define rcu_defer_register_thread      rcu_defer_register_thread_bp
+#define rcu_defer_unregister_thread    rcu_defer_unregister_thread_bp
+#define rcu_defer_barrier              rcu_defer_barrier_bp
+#define rcu_defer_barrier_thread       rcu_defer_barrier_thread_bp
+
+#endif /* _URCU_BP_MAP_H */
diff --git a/urcu/map/urcu-qsbr.h b/urcu/map/urcu-qsbr.h
new file mode 100644 (file)
index 0000000..0d88d83
--- /dev/null
@@ -0,0 +1,69 @@
+#ifndef _URCU_QSBR_MAP_H
+#define _URCU_QSBR_MAP_H
+
+/*
+ * urcu-map.h
+ *
+ * Userspace RCU header -- name mapping to allow multiple flavors to be
+ * used in the same executable.
+ *
+ * Copyright (c) 2009 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ * Copyright (c) 2009 Paul E. McKenney, IBM Corporation.
+ *
+ * LGPL-compatible code should include this header with :
+ *
+ * #define _LGPL_SOURCE
+ * #include <urcu.h>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * IBM's contributions to this file may be relicensed under LGPLv2 or later.
+ */
+
+/* Mapping macros to allow multiple flavors in a single binary. */
+
+#define rcu_read_lock                  rcu_read_lock_qsbr
+#define _rcu_read_lock                 _rcu_read_lock_qsbr
+#define rcu_read_unlock                        rcu_read_unlock_qsbr
+#define _rcu_read_unlock               _rcu_read_unlock_qsbr
+#define rcu_quiescent_state            rcu_quiescent_state_qsbr
+#define _rcu_quiescent_state           _rcu_quiescent_state_qsbr
+#define rcu_thread_offline             rcu_thread_offline_qsbr
+#define rcu_thread_online              rcu_thread_online_qsbr
+#define rcu_register_thread            rcu_register_thread_qsbr
+#define rcu_unregister_thread          rcu_unregister_thread_qsbr
+#define rcu_exit                       rcu_exit_qsbr
+#define synchronize_rcu                        synchronize_rcu_qsbr
+#define rcu_reader                     rcu_reader_qsbr
+#define rcu_gp_ctr                     rcu_gp_ctr_qsbr
+
+#define get_cpu_call_rcu_data          get_cpu_call_rcu_data_qsbr
+#define get_call_rcu_thread            get_call_rcu_thread_qsbr
+#define create_call_rcu_data           create_call_rcu_data_qsbr
+#define set_cpu_call_rcu_data          set_cpu_call_rcu_data_qsbr
+#define get_default_call_rcu_data      get_default_call_rcu_data_qsbr
+#define get_call_rcu_data              get_call_rcu_data_qsbr
+#define get_thread_call_rcu_data       get_thread_call_rcu_data_qsbr
+#define set_thread_call_rcu_data       set_thread_call_rcu_data_qsbr
+#define create_all_cpu_call_rcu_data   create_all_cpu_call_rcu_data_qsbr
+#define call_rcu                       call_rcu_qsbr
+
+#define defer_rcu                      defer_rcu_qsbr
+#define rcu_defer_register_thread      rcu_defer_register_thread_qsbr
+#define rcu_defer_unregister_thread    rcu_defer_unregister_thread_qsbr
+#define        rcu_defer_barrier               rcu_defer_barrier_qsbr
+#define rcu_defer_barrier_thread       rcu_defer_barrier_thread_qsbr
+
+#endif /* _URCU_QSBR_MAP_H */
diff --git a/urcu/map/urcu.h b/urcu/map/urcu.h
new file mode 100644 (file)
index 0000000..b55e304
--- /dev/null
@@ -0,0 +1,143 @@
+#ifndef _URCU_MAP_H
+#define _URCU_MAP_H
+
+/*
+ * urcu-map.h
+ *
+ * Userspace RCU header -- name mapping to allow multiple flavors to be
+ * used in the same executable.
+ *
+ * Copyright (c) 2009 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ * Copyright (c) 2009 Paul E. McKenney, IBM Corporation.
+ *
+ * LGPL-compatible code should include this header with :
+ *
+ * #define _LGPL_SOURCE
+ * #include <urcu.h>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * IBM's contributions to this file may be relicensed under LGPLv2 or later.
+ */
+
+/* Mapping macros to allow multiple flavors in a single binary. */
+
+#if !defined(RCU_MEMBARRIER) && !defined(RCU_SIGNAL) && !defined(RCU_MB)
+#define RCU_MB
+#endif
+
+#ifdef RCU_MEMBARRIER
+
+#define rcu_read_lock                  rcu_read_lock_memb
+#define _rcu_read_lock                 _rcu_read_lock_memb
+#define rcu_read_unlock                        rcu_read_unlock_memb
+#define _rcu_read_unlock               _rcu_read_unlock_memb
+#define rcu_register_thread            rcu_register_thread_memb
+#define rcu_unregister_thread          rcu_unregister_thread_memb
+#define rcu_init                       rcu_init_memb
+#define rcu_exit                       rcu_exit_memb
+#define synchronize_rcu                        synchronize_rcu_memb
+#define rcu_reader                     rcu_reader_memb
+#define rcu_gp_ctr                     rcu_gp_ctr_memb
+
+#define get_cpu_call_rcu_data          get_cpu_call_rcu_data_memb
+#define get_call_rcu_thread            get_call_rcu_thread_memb
+#define create_call_rcu_data           create_call_rcu_data_memb
+#define set_cpu_call_rcu_data          set_cpu_call_rcu_data_memb
+#define get_default_call_rcu_data      get_default_call_rcu_data_memb
+#define get_call_rcu_data              get_call_rcu_data_memb
+#define get_thread_call_rcu_data       get_thread_call_rcu_data_memb
+#define set_thread_call_rcu_data       set_thread_call_rcu_data_memb
+#define create_all_cpu_call_rcu_data   create_all_cpu_call_rcu_data_memb
+#define free_all_cpu_call_rcu_data     free_all_cpu_call_rcu_data_memb
+#define call_rcu                       call_rcu_memb
+
+#define defer_rcu                      defer_rcu_memb
+#define rcu_defer_register_thread      rcu_defer_register_thread_memb
+#define rcu_defer_unregister_thread    rcu_defer_unregister_thread_memb
+#define rcu_defer_barrier              rcu_defer_barrier_memb
+#define rcu_defer_barrier_thread       rcu_defer_barrier_thread_memb
+
+#elif defined(RCU_SIGNAL)
+
+#define rcu_read_lock                  rcu_read_lock_sig
+#define _rcu_read_lock                 _rcu_read_lock_sig
+#define rcu_read_unlock                        rcu_read_unlock_sig
+#define _rcu_read_unlock               _rcu_read_unlock_sig
+#define rcu_register_thread            rcu_register_thread_sig
+#define rcu_unregister_thread          rcu_unregister_thread_sig
+#define rcu_init                       rcu_init_sig
+#define rcu_exit                       rcu_exit_sig
+#define synchronize_rcu                        synchronize_rcu_sig
+#define rcu_reader                     rcu_reader_sig
+#define rcu_gp_ctr                     rcu_gp_ctr_sig
+
+#define get_cpu_call_rcu_data          get_cpu_call_rcu_data_sig
+#define get_call_rcu_thread            get_call_rcu_thread_sig
+#define create_call_rcu_data           create_call_rcu_data_sig
+#define set_cpu_call_rcu_data          set_cpu_call_rcu_data_sig
+#define get_default_call_rcu_data      get_default_call_rcu_data_sig
+#define get_call_rcu_data              get_call_rcu_data_sig
+#define get_thread_call_rcu_data       get_thread_call_rcu_data_sig
+#define set_thread_call_rcu_data       set_thread_call_rcu_data_sig
+#define create_all_cpu_call_rcu_data   create_all_cpu_call_rcu_data_sig
+#define free_all_cpu_call_rcu_data     free_all_cpu_call_rcu_data_sig
+#define call_rcu                       call_rcu_sig
+
+#define defer_rcu                      defer_rcu_sig
+#define rcu_defer_register_thread      rcu_defer_register_thread_sig
+#define rcu_defer_unregister_thread    rcu_defer_unregister_thread_sig
+#define rcu_defer_barrier              rcu_defer_barrier_sig
+#define rcu_defer_barrier_thread       rcu_defer_barrier_thread_sig
+
+#elif defined(RCU_MB)
+
+#define rcu_read_lock                  rcu_read_lock_mb
+#define _rcu_read_lock                 _rcu_read_lock_mb
+#define rcu_read_unlock                        rcu_read_unlock_mb
+#define _rcu_read_unlock               _rcu_read_unlock_mb
+#define rcu_register_thread            rcu_register_thread_mb
+#define rcu_unregister_thread          rcu_unregister_thread_mb
+#define rcu_init                       rcu_init_mb
+#define rcu_exit                       rcu_exit_mb
+#define synchronize_rcu                        synchronize_rcu_mb
+#define rcu_reader                     rcu_reader_mb
+#define rcu_gp_ctr                     rcu_gp_ctr_mb
+
+#define get_cpu_call_rcu_data          get_cpu_call_rcu_data_mb
+#define get_call_rcu_thread            get_call_rcu_thread_mb
+#define create_call_rcu_data           create_call_rcu_data_mb
+#define set_cpu_call_rcu_data          set_cpu_call_rcu_data_mb
+#define get_default_call_rcu_data      get_default_call_rcu_data_mb
+#define get_call_rcu_data              get_call_rcu_data_mb
+#define get_thread_call_rcu_data       get_thread_call_rcu_data_mb
+#define set_thread_call_rcu_data       set_thread_call_rcu_data_mb
+#define create_all_cpu_call_rcu_data   create_all_cpu_call_rcu_data_mb
+#define free_all_cpu_call_rcu_data     free_all_cpu_call_rcu_data_mb
+#define call_rcu                       call_rcu_mb
+
+#define defer_rcu                      defer_rcu_mb
+#define rcu_defer_register_thread      rcu_defer_register_thread_mb
+#define rcu_defer_unregister_thread    rcu_defer_unregister_thread_mb
+#define rcu_defer_barrier              rcu_defer_barrier_mb
+#define rcu_defer_barrier_thread       rcu_defer_barrier_thread_mb
+
+#else
+
+#error "Undefined selection"
+
+#endif
+
+#endif /* _URCU_MAP_H */
This page took 0.033443 seconds and 4 git commands to generate.