rts: Fix ASSERTs with space before opening paren
[ghc.git] / rts / OldARMAtomic.c
index 2a3c6c6..e76f4c6 100644 (file)
@@ -1,13 +1,26 @@
+/* -----------------------------------------------------------------------------
+ *
+ * (c) The GHC Team, 2011
+ *
+ * Inefficient but necessary atomic locks used for implementing atomic
+ * operations on ARM architectures pre-ARMv6.
+ *
+ * These operations are not only referenced in the threaded RTS, but also in
+ * ghc (the library), via the operations in compiler/cbits/genSym.c.
+ * They are not actually called in a non-threaded environment, but we still
+ * need them in every RTS to make the linker happy, hence no
+ * #if defined(THREADED_RTS) here. See #8951.
+ *
+ * -------------------------------------------------------------------------- */
+
 #include "PosixSource.h"
-#include "Stg.h"
+#include "Rts.h"
 
 #if defined(HAVE_SCHED_H)
 #include <sched.h>
 #endif
 
-#if defined(THREADED_RTS)
-
-#if arm_HOST_ARCH && defined(PRE_ARMv6)
+#if defined(arm_HOST_ARCH) && defined(arm_HOST_ARCH_PRE_ARMv6)
 
 static volatile int atomic_spin = 0;
 
@@ -39,9 +52,6 @@ void arm_atomic_spin_lock()
 void arm_atomic_spin_unlock()
 {
   atomic_spin = 0;
-} 
-
-#endif  /* arm_HOST_ARCH && defined(PRE_ARMv6) */
-
-#endif  /* defined(THREADED_RTS) */
+}
 
+#endif  /* arm_HOST_ARCH && defined(arm_HOST_ARCH_PRE_ARMv6) */