summaryrefslogtreecommitdiff
path: root/recipes/mozilla/firefox-3.0.4/Bug405992.atomic.nspr.diff
diff options
context:
space:
mode:
authorDenys Dmytriyenko <denis@denix.org>2009-03-17 14:32:59 -0400
committerDenys Dmytriyenko <denis@denix.org>2009-03-17 14:32:59 -0400
commit709c4d66e0b107ca606941b988bad717c0b45d9b (patch)
tree37ee08b1eb308f3b2b6426d5793545c38396b838 /recipes/mozilla/firefox-3.0.4/Bug405992.atomic.nspr.diff
parentfa6cd5a3b993f16c27de4ff82b42684516d433ba (diff)
rename packages/ to recipes/ per earlier agreement
See links below for more details: http://thread.gmane.org/gmane.comp.handhelds.openembedded/21326 http://thread.gmane.org/gmane.comp.handhelds.openembedded/21816 Signed-off-by: Denys Dmytriyenko <denis@denix.org> Acked-by: Mike Westerhof <mwester@dls.net> Acked-by: Philip Balister <philip@balister.org> Acked-by: Khem Raj <raj.khem@gmail.com> Acked-by: Marcin Juszkiewicz <hrw@openembedded.org> Acked-by: Koen Kooi <koen@openembedded.org> Acked-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
Diffstat (limited to 'recipes/mozilla/firefox-3.0.4/Bug405992.atomic.nspr.diff')
-rw-r--r--recipes/mozilla/firefox-3.0.4/Bug405992.atomic.nspr.diff48
1 files changed, 48 insertions, 0 deletions
diff --git a/recipes/mozilla/firefox-3.0.4/Bug405992.atomic.nspr.diff b/recipes/mozilla/firefox-3.0.4/Bug405992.atomic.nspr.diff
new file mode 100644
index 0000000000..f54f916a6a
--- /dev/null
+++ b/recipes/mozilla/firefox-3.0.4/Bug405992.atomic.nspr.diff
@@ -0,0 +1,48 @@
+# Add atomic operations for ARM.
+diff --git a/nsprpub/pr/include/md/_linux.h b/nsprpub/pr/include/md/_linux.h
+index 5b794c5..cb8d58e 100644
+--- a/nsprpub/pr/include/md/_linux.h
++++ b/nsprpub/pr/include/md/_linux.h
+@@ -194,6 +194,42 @@ extern PRInt32 _PR_x86_64_AtomicSet(PRInt32 *val, PRInt32 newval);
+ })
+ #endif
+
++#if defined(__arm__)
++#define _PR_HAVE_ATOMIC_OPS
++#define _MD_INIT_ATOMIC()
++
++typedef int (__kernel_cmpxchg_t)(int oldval, int newval, volatile int *ptr);
++#define __kernel_cmpxchg (*(__kernel_cmpxchg_t *)0xffff0fc0)
++
++#define _MD_ATOMIC_INCREMENT(ptr) _MD_ATOMIC_ADD(ptr, 1)
++#define _MD_ATOMIC_DECREMENT(ptr) _MD_ATOMIC_ADD(ptr, -1)
++#define _MD_ATOMIC_ADD(ptr, n) \
++ ({ \
++ PRInt32 ov, nv; \
++ volatile PRInt32 *vp = (ptr); \
++ \
++ do { \
++ ov = *vp; \
++ nv = ov + (n); \
++ } \
++ while (__kernel_cmpxchg(ov, nv, vp)); \
++ \
++ nv; \
++ })
++#define _MD_ATOMIC_SET(ptr, nv) \
++ ({ \
++ PRInt32 ov; \
++ volatile PRInt32 *vp = (ptr); \
++ \
++ do { \
++ ov = *vp; \
++ } \
++ while (__kernel_cmpxchg(ov, (nv), vp)); \
++ \
++ ov; \
++ })
++#endif
++
+ #define USE_SETJMP
+ #if defined(__GLIBC__) && __GLIBC__ >= 2
+ #define _PR_POLL_AVAILABLE