|
@@ -28,8 +28,7 @@
|
|
# define PT_EI __extern_always_inline
|
|
# define PT_EI __extern_always_inline
|
|
#endif
|
|
#endif
|
|
|
|
|
|
-#if defined(__thumb__)
|
|
+#if defined(__thumb2__)
|
|
-#if defined(__USE_LDREXSTREX__)
|
|
|
|
PT_EI long int ldrex(int *spinlock)
|
|
PT_EI long int ldrex(int *spinlock)
|
|
{
|
|
{
|
|
long int ret;
|
|
long int ret;
|
|
@@ -63,7 +62,7 @@ testandset (int *spinlock)
|
|
return ret;
|
|
return ret;
|
|
}
|
|
}
|
|
|
|
|
|
-#else /* __USE_LDREXSTREX__ */
|
|
+#elif defined(__thumb__)
|
|
|
|
|
|
/* This will not work on ARM1 or ARM2 because SWP is lacking on those
|
|
/* This will not work on ARM1 or ARM2 because SWP is lacking on those
|
|
machines. Unfortunately we have no way to detect this at compile
|
|
machines. Unfortunately we have no way to detect this at compile
|
|
@@ -88,7 +87,7 @@ PT_EI long int testandset (int *spinlock)
|
|
: "0"(1), "r"(spinlock));
|
|
: "0"(1), "r"(spinlock));
|
|
return ret;
|
|
return ret;
|
|
}
|
|
}
|
|
-#endif
|
|
+
|
|
#else /* __thumb__ */
|
|
#else /* __thumb__ */
|
|
|
|
|
|
PT_EI long int testandset (int *spinlock);
|
|
PT_EI long int testandset (int *spinlock);
|