mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-29 13:46:49 +00:00
boost: add upstream patch
Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
parent
7e80b2a621
commit
2c14cb4d8c
@ -0,0 +1,58 @@
|
|||||||
|
From 8d1ba081260f98d879759433a9d7248d6bd98966 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Peter Dimov <pdimov@boostpro.com>
|
||||||
|
Date: Mon, 12 Mar 2012 17:31:21 +0000
|
||||||
|
Subject: [PATCH] Apply patch from #5331. Refs #5331.
|
||||||
|
|
||||||
|
SVN-Revision: 77315
|
||||||
|
---
|
||||||
|
boost/smart_ptr/detail/spinlock_gcc_arm.hpp | 29 +++++++++++++++++++++++++--
|
||||||
|
1 file changed, 27 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/boost/smart_ptr/detail/spinlock_gcc_arm.hpp b/boost/smart_ptr/detail/spinlock_gcc_arm.hpp
|
||||||
|
index f58ea44..f1bbaf6 100644
|
||||||
|
--- a/boost/smart_ptr/detail/spinlock_gcc_arm.hpp
|
||||||
|
+++ b/boost/smart_ptr/detail/spinlock_gcc_arm.hpp
|
||||||
|
@@ -43,13 +43,38 @@ class spinlock
|
||||||
|
{
|
||||||
|
int r;
|
||||||
|
|
||||||
|
+#if defined(__ARM_ARCH_6__) \
|
||||||
|
+ || defined(__ARM_ARCH_6J__) \
|
||||||
|
+ || defined(__ARM_ARCH_6K__) \
|
||||||
|
+ || defined(__ARM_ARCH_6Z__) \
|
||||||
|
+ || defined(__ARM_ARCH_6ZK__) \
|
||||||
|
+ || defined(__ARM_ARCH_6T2__) \
|
||||||
|
+ || defined(__ARM_ARCH_7__) \
|
||||||
|
+ || defined(__ARM_ARCH_7A__) \
|
||||||
|
+ || defined(__ARM_ARCH_7R__) \
|
||||||
|
+ || defined(__ARM_ARCH_7M__) \
|
||||||
|
+ || defined(__ARM_ARCH_7EM__)
|
||||||
|
+
|
||||||
|
+ __asm__ __volatile__(
|
||||||
|
+ "ldrex %0, [%2]; \n"
|
||||||
|
+ "cmp %0, %1; \n"
|
||||||
|
+ "strexne %0, %1, [%2]; \n"
|
||||||
|
+ BOOST_SP_ARM_BARRIER :
|
||||||
|
+ "=&r"( r ): // outputs
|
||||||
|
+ "r"( 1 ), "r"( &v_ ): // inputs
|
||||||
|
+ "memory", "cc" );
|
||||||
|
+
|
||||||
|
+#else
|
||||||
|
+
|
||||||
|
__asm__ __volatile__(
|
||||||
|
- "swp %0, %1, [%2]\n\t"
|
||||||
|
- BOOST_SP_ARM_BARRIER :
|
||||||
|
+ "swp %0, %1, [%2];\n"
|
||||||
|
+ BOOST_SP_ARM_BARRIER :
|
||||||
|
"=&r"( r ): // outputs
|
||||||
|
"r"( 1 ), "r"( &v_ ): // inputs
|
||||||
|
"memory", "cc" );
|
||||||
|
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
return r == 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
--
|
||||||
|
1.7.10
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user