From: Christian Mauderer <christian.maude...@embedded-brains.de>

This patch should be replaced by one that uses libatomic as soon as it
is provided by our toolchain.
---
 cpukit/mghttpd/civetweb.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/cpukit/mghttpd/civetweb.c b/cpukit/mghttpd/civetweb.c
index 0c907f0..edc13d6 100644
--- a/cpukit/mghttpd/civetweb.c
+++ b/cpukit/mghttpd/civetweb.c
@@ -1371,7 +1371,9 @@ mg_atomic_inc(volatile int *addr)
         * so whatever you use, the other SDK is likely to raise a warning. */
        ret = InterlockedIncrement((volatile long *)addr);
 #elif defined(__GNUC__)                                                        
\
-    && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ > 0)))
+    && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ > 0)))           
\
+    && !defined(__rtems__)
+    /* FIXME: Use libatomic support as soon as it is provided. */
        ret = __sync_add_and_fetch(addr, 1);
 #else
        ret = (++(*addr));
@@ -1390,7 +1392,9 @@ mg_atomic_dec(volatile int *addr)
         * so whatever you use, the other SDK is likely to raise a warning. */
        ret = InterlockedDecrement((volatile long *)addr);
 #elif defined(__GNUC__)                                                        
\
-    && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ > 0)))
+    && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ > 0)))           
\
+    && !defined(__rtems__)
+    /* FIXME: Use libatomic support as soon as it is provided. */
        ret = __sync_sub_and_fetch(addr, 1);
 #else
        ret = (--(*addr));
-- 
1.8.4.5

_______________________________________________
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Reply via email to