加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
userspace-rcu-0.13.0-sw.patch 6.33 KB
一键复制 编辑 原始数据 按行查看 历史
wuzx 提交于 2022-08-10 09:49 . e2fsprogs add sw
diff -Naur userspace-rcu-0.13.0.org/LICENSE userspace-rcu-0.13.0.sw/LICENSE
--- userspace-rcu-0.13.0.org/LICENSE 2022-02-26 01:43:47.240000000 +0000
+++ userspace-rcu-0.13.0.sw/LICENSE 2022-02-26 01:46:41.140000000 +0000
@@ -44,6 +44,7 @@
compiler.h
arch/s390.h
uatomic/alpha.h
+uatomic/sw_64.h
uatomic/mips.h
uatomic/nios2.h
uatomic/s390.h
diff -Naur userspace-rcu-0.13.0.org/include/Makefile.am userspace-rcu-0.13.0.sw/include/Makefile.am
--- userspace-rcu-0.13.0.org/include/Makefile.am 2022-02-26 01:43:47.240000000 +0000
+++ userspace-rcu-0.13.0.sw/include/Makefile.am 2022-02-26 01:44:36.980000000 +0000
@@ -1,6 +1,7 @@
nobase_include_HEADERS = \
urcu/arch/aarch64.h \
urcu/arch/alpha.h \
+ urcu/arch/sw_64.h \
urcu/arch/arm.h \
urcu/arch/gcc.h \
urcu/arch/generic.h \
@@ -60,6 +61,7 @@
urcu/tls-compat.h \
urcu/uatomic/aarch64.h \
urcu/uatomic/alpha.h \
+ urcu/uatomic/sw_64.h \
urcu/uatomic_arch.h \
urcu/uatomic/arm.h \
urcu/uatomic/gcc.h \
diff -Naur userspace-rcu-0.13.0.org/include/Makefile.in userspace-rcu-0.13.0.sw/include/Makefile.in
--- userspace-rcu-0.13.0.org/include/Makefile.in 2022-02-26 01:43:47.250000000 +0000
+++ userspace-rcu-0.13.0.sw/include/Makefile.in 2022-02-26 01:44:17.140000000 +0000
@@ -318,6 +318,7 @@
nobase_include_HEADERS = \
urcu/arch/aarch64.h \
urcu/arch/alpha.h \
+ urcu/arch/sw_64.h \
urcu/arch/arm.h \
urcu/arch/gcc.h \
urcu/arch/generic.h \
@@ -377,6 +378,7 @@
urcu/tls-compat.h \
urcu/uatomic/aarch64.h \
urcu/uatomic/alpha.h \
+ urcu/uatomic/sw_64.h \
urcu/uatomic_arch.h \
urcu/uatomic/arm.h \
urcu/uatomic/gcc.h \
diff -Naur userspace-rcu-0.13.0.org/include/urcu/arch/sw_64.h userspace-rcu-0.13.0.sw/include/urcu/arch/sw_64.h
--- userspace-rcu-0.13.0.org/include/urcu/arch/sw_64.h 1970-01-01 00:00:00.000000000 +0000
+++ userspace-rcu-0.13.0.sw/include/urcu/arch/sw_64.h 2022-02-26 01:49:14.100000000 +0000
@@ -0,0 +1,42 @@
+#ifndef _URCU_ARCH_SW_64_H
+#define _URCU_ARCH_SW_64_H
+
+/*
+ * arch_sw_64.h: trivial definitions for the Sw_64 architecture.
+ *
+ * Copyright (c) 2010 Paolo Bonzini <pbonzini@redhat.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
+ */
+
+#include <urcu/compiler.h>
+#include <urcu/config.h>
+#include <urcu/syscall-compat.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define cmm_mb() __asm__ __volatile__ ("memb":::"memory")
+#define cmm_wmb() __asm__ __volatile__ ("memb":::"memory")
+#define cmm_read_barrier_depends() __asm__ __volatile__ ("memb":::"memory")
+
+#ifdef __cplusplus
+}
+#endif
+
+#include <urcu/arch/generic.h>
+
+#endif /* _URCU_ARCH_SW_64_H */
diff -Naur userspace-rcu-0.13.0.org/include/urcu/arch.h userspace-rcu-0.13.0.sw/include/urcu/arch.h
--- userspace-rcu-0.13.0.org/include/urcu/arch.h 2022-02-26 01:43:47.250000000 +0000
+++ userspace-rcu-0.13.0.sw/include/urcu/arch.h 2022-02-26 01:46:28.100000000 +0000
@@ -39,6 +39,7 @@
* URCU_ARCH_SPARC64 : All Sun SPARC variants
*
* URCU_ARCH_ALPHA : All DEC Alpha variants
+ * URCU_ARCH_SW_64 : All DEC Sw_64 variants
* URCU_ARCH_IA64 : All Intel Itanium variants
* URCU_ARCH_ARM : All ARM 32 bits variants
* URCU_ARCH_ARMV7 : All ARMv7 ISA variants
@@ -101,6 +102,11 @@
#define URCU_ARCH_ALPHA 1
#include <urcu/arch/alpha.h>
+#elif (defined(__sw_64__) || defined(__sw_64))
+
+#define URCU_ARCH_SW_64 1
+#include <urcu/arch/sw_64.h>
+
#elif (defined(__ia64__) || defined(__ia64))
#define URCU_ARCH_IA64 1
diff -Naur userspace-rcu-0.13.0.org/include/urcu/uatomic/sw_64.h userspace-rcu-0.13.0.sw/include/urcu/uatomic/sw_64.h
--- userspace-rcu-0.13.0.org/include/urcu/uatomic/sw_64.h 1970-01-01 00:00:00.000000000 +0000
+++ userspace-rcu-0.13.0.sw/include/urcu/uatomic/sw_64.h 2022-02-26 01:47:48.170000000 +0000
@@ -0,0 +1,32 @@
+#ifndef _URCU_UATOMIC_ARCH_SW_64_H
+#define _URCU_UATOMIC_ARCH_SW_64_H
+
+/*
+ * Atomic exchange operations for the Sw_64 architecture. Let GCC do it.
+ *
+ * Copyright (c) 2010 Paolo Bonzini <pbonzini@redhat.com>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to
+ * deal in the Software without restriction, including without limitation the
+ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ * IN THE SOFTWARE.
+ */
+
+#include <urcu/compiler.h>
+#include <urcu/system.h>
+#include <urcu/uatomic/generic.h>
+
+#endif /* _URCU_UATOMIC_ARCH_SW_64_H */
diff -Naur userspace-rcu-0.13.0.org/include/urcu/uatomic.h userspace-rcu-0.13.0.sw/include/urcu/uatomic.h
--- userspace-rcu-0.13.0.org/include/urcu/uatomic.h 2022-02-26 01:43:47.250000000 +0000
+++ userspace-rcu-0.13.0.sw/include/urcu/uatomic.h 2022-02-26 01:52:01.610000000 +0000
@@ -31,6 +31,8 @@
#include <urcu/uatomic/s390.h>
#elif defined(URCU_ARCH_SPARC64)
#include <urcu/uatomic/sparc64.h>
+#elif defined(URCU_ARCH_SW_64)
+#include <urcu/uatomic/sw_64.h>
#elif defined(URCU_ARCH_ALPHA)
#include <urcu/uatomic/alpha.h>
#elif defined(URCU_ARCH_IA64)
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化