!16 update to version 7.8.0
From: @weigang-li Reviewed-by: @liqingqing_1229 Signed-off-by: @liqingqing_1229
This commit is contained in:
commit
e38594c0bb
90
libatomic_ops-7.6.12-sw.patch → 0001-add-sw_64-support.patch
Executable file → Normal file
90
libatomic_ops-7.6.12-sw.patch → 0001-add-sw_64-support.patch
Executable file → Normal file
@ -1,7 +1,21 @@
|
||||
diff -Naur libatomic_ops-7.6.12.org/src/Makefile.am libatomic_ops-7.6.12.sw/src/Makefile.am
|
||||
--- libatomic_ops-7.6.12.org/src/Makefile.am 2022-02-26 02:35:27.760000000 +0000
|
||||
+++ libatomic_ops-7.6.12.sw/src/Makefile.am 2022-02-26 02:38:49.230000000 +0000
|
||||
@@ -81,6 +81,7 @@
|
||||
From 7473a08ba5d72c164dafd18f5d24204b650273dd Mon Sep 17 00:00:00 2001
|
||||
From: li weigang <weigangli99@gmail.com>
|
||||
Date: Wed, 1 Nov 2023 14:38:23 +0800
|
||||
Subject: [PATCH] add sw_64 support
|
||||
|
||||
---
|
||||
src/Makefile.am | 1 +
|
||||
src/atomic_ops.h | 2 +
|
||||
src/atomic_ops/sysdeps/gcc/sw_64.h | 70 ++++++++++++++++++++++++++++++
|
||||
src/atomic_ops_stack.c | 2 +-
|
||||
4 files changed, 74 insertions(+), 1 deletion(-)
|
||||
create mode 100644 src/atomic_ops/sysdeps/gcc/sw_64.h
|
||||
|
||||
diff --git a/src/Makefile.am b/src/Makefile.am
|
||||
index e71b67c..334d497 100644
|
||||
--- a/src/Makefile.am
|
||||
+++ b/src/Makefile.am
|
||||
@@ -85,6 +85,7 @@ nobase_private_HEADERS = atomic_ops/ao_version.h \
|
||||
\
|
||||
atomic_ops/sysdeps/gcc/aarch64.h \
|
||||
atomic_ops/sysdeps/gcc/alpha.h \
|
||||
@ -9,9 +23,24 @@ diff -Naur libatomic_ops-7.6.12.org/src/Makefile.am libatomic_ops-7.6.12.sw/src/
|
||||
atomic_ops/sysdeps/gcc/arm.h \
|
||||
atomic_ops/sysdeps/gcc/avr32.h \
|
||||
atomic_ops/sysdeps/gcc/cris.h \
|
||||
diff -Naur libatomic_ops-7.6.12.org/src/atomic_ops/sysdeps/gcc/sw_64.h libatomic_ops-7.6.12.sw/src/atomic_ops/sysdeps/gcc/sw_64.h
|
||||
--- libatomic_ops-7.6.12.org/src/atomic_ops/sysdeps/gcc/sw_64.h 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ libatomic_ops-7.6.12.sw/src/atomic_ops/sysdeps/gcc/sw_64.h 2022-02-26 02:41:18.020000000 +0000
|
||||
diff --git a/src/atomic_ops.h b/src/atomic_ops.h
|
||||
index b341e53..edba1c2 100644
|
||||
--- a/src/atomic_ops.h
|
||||
+++ b/src/atomic_ops.h
|
||||
@@ -348,6 +348,8 @@
|
||||
# elif defined(__hppa__)
|
||||
# include "atomic_ops/sysdeps/gcc/hppa.h"
|
||||
# define AO_CAN_EMUL_CAS
|
||||
+# elif defined(__sw_64__)
|
||||
+# include "atomic_ops/sysdeps/gcc/sw_64.h"
|
||||
# elif defined(__alpha__)
|
||||
# include "atomic_ops/sysdeps/gcc/alpha.h"
|
||||
# define AO_GENERALIZE_TWICE
|
||||
diff --git a/src/atomic_ops/sysdeps/gcc/sw_64.h b/src/atomic_ops/sysdeps/gcc/sw_64.h
|
||||
new file mode 100644
|
||||
index 0000000..fd196cf
|
||||
--- /dev/null
|
||||
+++ b/src/atomic_ops/sysdeps/gcc/sw_64.h
|
||||
@@ -0,0 +1,70 @@
|
||||
+/*
|
||||
+ * Copyright (c) 1991-1994 by Xerox Corporation. All rights reserved.
|
||||
@ -83,36 +112,19 @@ diff -Naur libatomic_ops-7.6.12.org/src/atomic_ops/sysdeps/gcc/sw_64.h libatomic
|
||||
+#define AO_HAVE_compare_and_swap
|
||||
+
|
||||
+/* TODO: implement AO_fetch_compare_and_swap */
|
||||
diff -Naur libatomic_ops-7.6.12.org/src/atomic_ops.h libatomic_ops-7.6.12.sw/src/atomic_ops.h
|
||||
--- libatomic_ops-7.6.12.org/src/atomic_ops.h 2022-02-26 02:35:27.770000000 +0000
|
||||
+++ libatomic_ops-7.6.12.sw/src/atomic_ops.h 2022-02-26 02:36:05.400000000 +0000
|
||||
@@ -310,6 +310,8 @@
|
||||
# elif defined(__hppa__)
|
||||
# include "atomic_ops/sysdeps/gcc/hppa.h"
|
||||
# define AO_CAN_EMUL_CAS
|
||||
+# elif defined(__sw_64__)
|
||||
+# include "atomic_ops/sysdeps/gcc/sw_64.h"
|
||||
# elif defined(__alpha__)
|
||||
# include "atomic_ops/sysdeps/gcc/alpha.h"
|
||||
# define AO_GENERALIZE_TWICE
|
||||
diff -Naur libatomic_ops-7.6.12.org/src/atomic_ops_stack.c libatomic_ops-7.6.12.sw/src/atomic_ops_stack.c
|
||||
--- libatomic_ops-7.6.12.org/src/atomic_ops_stack.c 2022-02-26 02:35:27.760000000 +0000
|
||||
+++ libatomic_ops-7.6.12.sw/src/atomic_ops_stack.c 2022-02-26 02:38:24.530000000 +0000
|
||||
@@ -180,7 +180,7 @@
|
||||
/* We need to make sure that first is still the first entry on the */
|
||||
/* list. Otherwise it's possible that a reinsertion of it was */
|
||||
/* already started before we added the black list entry. */
|
||||
diff --git a/src/atomic_ops_stack.c b/src/atomic_ops_stack.c
|
||||
index ec8ace4..03638be 100644
|
||||
--- a/src/atomic_ops_stack.c
|
||||
+++ b/src/atomic_ops_stack.c
|
||||
@@ -81,7 +81,7 @@ AO_API AO_uintptr_t *AO_stack_next_ptr(AO_uintptr_t next)
|
||||
} /* extern "C" */
|
||||
# endif
|
||||
|
||||
-# if defined(__alpha__) && (__GNUC__ == 4)
|
||||
+# if (defined(__alpha__) || defined(__sw_64__)) && (__GNUC__ == 4)
|
||||
if (first != AO_load_acquire(list))
|
||||
/* Workaround __builtin_expect bug found in */
|
||||
/* gcc-4.6.3/alpha causing test_stack failure. */
|
||||
@@ -196,7 +196,7 @@
|
||||
}
|
||||
first_ptr = AO_REAL_NEXT_PTR(first);
|
||||
next = AO_load_next(first_ptr);
|
||||
-# if defined(__alpha__) && (__GNUC__ == 4)
|
||||
+# if (defined(__alpha__) || defined(__sw_64__)) && (__GNUC__ == 4)
|
||||
if (!AO_compare_and_swap_release(list, first, next))
|
||||
# else
|
||||
if (AO_EXPECT_FALSE(!AO_compare_and_swap_release(list, first, next)))
|
||||
+# if (defined(__alpha__) || define(__sw_64__)) && (__GNUC__ == 4)
|
||||
/* Workaround __builtin_expect bug found in */
|
||||
/* gcc-4.6.3/alpha causing test_stack failure. */
|
||||
# undef AO_EXPECT_FALSE
|
||||
--
|
||||
2.20.1
|
||||
|
||||
Binary file not shown.
BIN
libatomic_ops-7.8.0.tar.gz
Normal file
BIN
libatomic_ops-7.8.0.tar.gz
Normal file
Binary file not shown.
@ -1,11 +1,11 @@
|
||||
Name: libatomic_ops
|
||||
Version: 7.6.14
|
||||
Version: 7.8.0
|
||||
Release: 1
|
||||
Summary: Atomic memory update operations
|
||||
License: GPLv2
|
||||
URL: https://github.com/ivmai/libatomic_ops/
|
||||
Source0: http://github.com/ivmai/libatomic_ops/releases/download/v%{version}/libatomic_ops-%{version}.tar.gz
|
||||
Patch1: libatomic_ops-7.6.12-sw.patch
|
||||
Patch1: 0001-add-sw_64-support.patch
|
||||
|
||||
BuildRequires: gcc
|
||||
|
||||
@ -40,14 +40,15 @@ The devel for %{name}
|
||||
|
||||
%files
|
||||
%license COPYING
|
||||
%license doc/LICENSING.txt
|
||||
%license LICENSE
|
||||
%{_libdir}/libatomic_ops.so.1*
|
||||
%{_libdir}/libatomic_ops_gpl.so.1*
|
||||
%exclude %{_libdir}/*.la
|
||||
%exclude %{_docdir}/libatomic_ops/{COPYING,README*,*.txt}
|
||||
%exclude %{_docdir}/libatomic_ops/{AUTHORS,ChangeLog,LICENSE}
|
||||
|
||||
%files devel
|
||||
%doc doc/README*
|
||||
%doc README*
|
||||
%{_includedir}/atomic_ops.h
|
||||
%{_includedir}/atomic_ops_malloc.h
|
||||
%{_includedir}/atomic_ops_stack.h
|
||||
@ -62,6 +63,9 @@ The devel for %{name}
|
||||
%doc AUTHORS ChangeLog README.md
|
||||
|
||||
%changelog
|
||||
* Wed Nov 01 2023 liweigang <weigangli99@gmail.com> - 7.8.0-1
|
||||
- update to version 7.8.0
|
||||
|
||||
* Tue Oct 18 2022 dillon chen <dillon.chen@gmail.com> - 7.6.14-1
|
||||
- update to 7.6.14
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
version_control: github
|
||||
src_repo: ivmai/libatomic_ops
|
||||
tag_prefix: ^v
|
||||
seperator: .
|
||||
separator: .
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user