aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-support/db/db/arm-thumb-mutex_db5.patch
diff options
context:
space:
mode:
authorMark Hatle <mark.hatle@windriver.com>2011-01-15 21:14:46 -0600
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-01-27 21:53:24 +0000
commite77207ccdf15f34651a086099ed4816712e3656b (patch)
tree985194b5787bc01a278c1a68e8c347a03e5d609e /meta/recipes-support/db/db/arm-thumb-mutex_db5.patch
parent156405e57871d2339c99fc9b0ef58f0ee9b24e2e (diff)
downloadopenembedded-core-contrib-e77207ccdf15f34651a086099ed4816712e3656b.tar.gz
BerkleyDB: Uprev db from 4.2 to 5.1.19
The latest version of Berkley DB (5.1.19) is required by RPM. This version is backwards compatible with the 4.2 version that was enabled previously. Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Diffstat (limited to 'meta/recipes-support/db/db/arm-thumb-mutex_db5.patch')
-rw-r--r--meta/recipes-support/db/db/arm-thumb-mutex_db5.patch36
1 files changed, 36 insertions, 0 deletions
diff --git a/meta/recipes-support/db/db/arm-thumb-mutex_db5.patch b/meta/recipes-support/db/db/arm-thumb-mutex_db5.patch
new file mode 100644
index 0000000000..37d0d93abd
--- /dev/null
+++ b/meta/recipes-support/db/db/arm-thumb-mutex_db5.patch
@@ -0,0 +1,36 @@
+--- db-5.1.19/../src/dbinc/mutex_int.h.orig 2011-01-05 19:21:42.181805366 -0600
++++ db-5.1.19/../src/dbinc/mutex_int.h 2011-01-05 19:24:53.141853117 -0600
+@@ -474,6 +474,25 @@
+
+ #ifdef LOAD_ACTUAL_MUTEX_CODE
+ /* gcc/arm: 0 is clear, 1 is set. */
++#if defined __thumb__
++#define MUTEX_SET(tsl) ({ \
++ int __r, __p; \
++ __asm__ volatile( \
++ ".align 2\n\t" \
++ "bx pc\n\t" \
++ "nop\n\t" \
++ ".arm\n\t" \
++ "swpb %0, %2, [%3]\n\t" \
++ "eor %0, %0, #1\n\t" \
++ "orr %1, pc, #1\n\t" \
++ "bx %1\n\t" \
++ ".force_thumb" \
++ : "=&r" (__r), "=r" (__p) \
++ : "r" (1), "r" (tsl) \
++ ); \
++ __r & 1; \
++})
++#else
+ #define MUTEX_SET(tsl) ({ \
+ int __r; \
+ __asm__ volatile( \
+@@ -484,6 +503,7 @@
+ ); \
+ __r & 1; \
+ })
++#endif
+
+ #define MUTEX_UNSET(tsl) (*(volatile tsl_t *)(tsl) = 0)
+ #define MUTEX_INIT(tsl) (MUTEX_UNSET(tsl), 0)