From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from gallifrey.ext.pengutronix.de ([2001:6f8:1178:4:5054:ff:fe8d:eefb] helo=localhost) by metis.ext.pengutronix.de with esmtp (Exim 4.72) (envelope-from ) id 1Retpy-00079G-Tn for ptxdist@pengutronix.de; Sun, 25 Dec 2011 20:34:27 +0100 From: Juergen Beisert Date: Sun, 25 Dec 2011 20:33:20 +0100 MIME-Version: 1.0 Content-Disposition: inline Message-Id: <201112252033.20589.jbe@pengutronix.de> Subject: [ptxdist] [PATCH] Add the userspace RCU library Reply-To: ptxdist@pengutronix.de List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: ptxdist-bounces@pengutronix.de Errors-To: ptxdist-bounces@pengutronix.de To: ptxdist@pengutronix.de >From its README: This data synchronization library provides read-side access which scales linearly with the number of cores. It does so by allowing multiples copies of a given data structure to live at the same time, and by monitoring the data structure accesses to detect grace periods after which memory reclamation is possible. Supported architectures are: x86, PPC and ARM. Signed-off-by: Juergen Beisert diff --git a/rules/userspace-rcu.in b/rules/userspace-rcu.in new file mode 100644 index 0000000..26bcdba --- /dev/null +++ b/rules/userspace-rcu.in @@ -0,0 +1,25 @@ +## SECTION=system_libraries + +menuconfig USERSPACE_RCU + tristate + prompt "libuserspace-rcu " + select GLIBC_PTHREAD + help + liburcu is a LGPLv2.1 userspace RCU (read-copy-update) library. This + data synchronization library provides read-side access which scales + linearly with the number of cores. It does so by allowing multiples + copies of a given data structure to live at the same time, and by + monitoring the data structure accesses to detect grace periods after + which memory reclamation is possible. + +if USERSPACE_RCU + +config USERSPACE_RCU_SMP + bool + prompt "SMP support" + default y + help + Provide SMP support. Warning: Disable this only on real uniprocessor + systems. + +endif diff --git a/rules/userspace-rcu.make b/rules/userspace-rcu.make new file mode 100644 index 0000000..d896aa6 --- /dev/null +++ b/rules/userspace-rcu.make @@ -0,0 +1,73 @@ +# -*-makefile-*- +# +# Copyright (C) 2011 by Juergen Beisert +# +# See CREDITS for details about who has contributed to this project. +# +# For further information about the PTXdist project and license conditions +# see the README file. +# + +# +# We provide this package +# +PACKAGES-$(PTXCONF_USERSPACE_RCU) += userspace-rcu + +# +# Paths and names +# +USERSPACE_RCU_VERSION := 0.6.7 +USERSPACE_RCU_MD5 := 2705dadd65beda8e8960472c082e44b3 +USERSPACE_RCU := userspace-rcu-$(USERSPACE_RCU_VERSION) +USERSPACE_RCU_SUFFIX := tar.bz2 +USERSPACE_RCU_URL := http://lttng.org/files/urcu/$(USERSPACE_RCU).$(USERSPACE_RCU_SUFFIX) +USERSPACE_RCU_SOURCE := $(SRCDIR)/$(USERSPACE_RCU).$(USERSPACE_RCU_SUFFIX) +USERSPACE_RCU_DIR := $(BUILDDIR)/$(USERSPACE_RCU) +USERSPACE_RCU_LICENSE := LGPLv2.1 + +# ---------------------------------------------------------------------------- +# Prepare +# ---------------------------------------------------------------------------- + +# +# autoconf +# +USERSPACE_RCU_CONF_TOOL := autoconf +USERSPACE_RCU_CONF_OPT := $(CROSS_AUTOCONF_USR) \ + --enable-silent-rules \ + --disable-dependency-tracking \ + --enable-shared \ + --disable-static + +ifdef PTXCONF_USERSPACE_RCU_SMP +USERSPACE_RCU_CONF_OPT += --enable-smp-support +else +USERSPACE_RCU_CONF_OPT += --disable-smp-support +endif + +# ---------------------------------------------------------------------------- +# Target-Install +# ---------------------------------------------------------------------------- + +$(STATEDIR)/userspace-rcu.targetinstall: + @$(call targetinfo) + + @$(call install_init, userspace-rcu) + @$(call install_fixup, userspace-rcu,PRIORITY,optional) + @$(call install_fixup, userspace-rcu,SECTION,base) + @$(call install_fixup, userspace-rcu,AUTHOR,"Juergen Beisert ") + @$(call install_fixup, userspace-rcu,DESCRIPTION,"Userspace RCU") + + @$(call install_lib, userspace-rcu, 0, 0, 0644, liburcu) + @$(call install_lib, userspace-rcu, 0, 0, 0644, liburcu-bp) + @$(call install_lib, userspace-rcu, 0, 0, 0644, liburcu-cds) + @$(call install_lib, userspace-rcu, 0, 0, 0644, liburcu-common) + @$(call install_lib, userspace-rcu, 0, 0, 0644, liburcu-mb) + @$(call install_lib, userspace-rcu, 0, 0, 0644, liburcu-qsbr) + @$(call install_lib, userspace-rcu, 0, 0, 0644, liburcu-signal) + + @$(call install_finish, userspace-rcu) + + @$(call touch) + +# vim: syntax=make -- Pengutronix e.K. | Juergen Beisert | Linux Solutions for Science and Industry | http://www.pengutronix.de/ | -- ptxdist mailing list ptxdist@pengutronix.de