|author||Kaushal M <firstname.lastname@example.org>||2015-01-06 15:12:59 +0530|
|committer||Krishnan Parthasarathi <email@example.com>||2015-02-23 04:35:37 -0800|
build, glusterd: Add liburcu to build system
This patch adds liburcu related checks to the build system and updates the spec file to require 'userspace-rcu'. liburcu >= 0.7 is required to build GlusterFS, but 0.8 and above is preferred. For cases when liburcu 0.7.x is the available version, some function definitions (currently just one) from liburcu-0.8.6 have been made available in /contrib/userspace-rcu/. This change was developed on the git branch at . This commit is a combination of the following commits on the development branch. a5cd6bd Add userspace-rcu checks to configure.ac fe5ced3 Add URCU libs to glusterd libtool flags 1e43302 Add local definition of cds_list_add_tail_rcu for liburcu-0.7 98da755 Move local definition of cds_list_add_tail_rcu into contrib 8c44dfd Update spec file to include userspace-rcu0466e33 Rename rculist-additional.h to rculist-extra.h 947c7b3 Add rculist-extra.h to dist 19f32ad Address review comments 9605/1 : https://github.com/kshlm/glusterfs/tree/urcu Change-Id: Ifbb617d0dacce8fa01214f894badb9d8cdcaf56f BUG: 1191030 Signed-off-by: Kaushal M <firstname.lastname@example.org> Reviewed-on: http://review.gluster.org/9605 Tested-by: Gluster Build System <email@example.com> Reviewed-by: Atin Mukherjee <firstname.lastname@example.org> Reviewed-by: Niels de Vos <email@example.com> Reviewed-by: Krishnan Parthasarathi <firstname.lastname@example.org> Tested-by: Krishnan Parthasarathi <email@example.com>
Diffstat (limited to 'contrib/userspace-rcu')
1 files changed, 42 insertions, 0 deletions
diff --git a/contrib/userspace-rcu/rculist-extra.h b/contrib/userspace-rcu/rculist-extra.h
new file mode 100644
@@ -0,0 +1,42 @@
+ * Copyright (C) 2002 Free Software Foundation, Inc.
+ * (originally part of the GNU C Library)
+ * Contributed by Ulrich Drepper <firstname.lastname@example.org>, 2002.
+ * Copyright (C) 2009 Pierre-Marc Fournier
+ * Conversion to RCU list.
+ * Copyright (C) 2010 Mathieu Desnoyers <email@example.com>
+ * 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
+/* Copying this definition from liburcu-0.8 as liburcu-0.7 does not have this
+ * particular list api
+/* Add new element at the tail of the list. */
+void cds_list_add_tail_rcu(struct cds_list_head *newp,
+ struct cds_list_head *head)
+ newp->next = head;
+ newp->prev = head->prev;
+ rcu_assign_pointer(head->prev->next, newp);
+ head->prev = newp;