+#endif /* _WIN32 && !__CYGWIN__ */
+
+/* The Windows95 kernel does not export InterlockedCompareExchange.
+ This provides a substitute. When building apps that reference
+ gthread_mutex_try_lock, the __GTHREAD_I486_INLINE_LOCK_PRIMITIVES
+ macro must be defined if Windows95 is a target. Currently
+ gthread_mutex_try_lock is not referenced by libgcc or libstdc++. */
+#ifdef __GTHREAD_I486_INLINE_LOCK_PRIMITIVES
+static inline long
+__gthr_i486_lock_cmp_xchg(long *__dest, long __xchg, long __comperand)
+{
+ long result;
+ __asm__ __volatile__ ("\n\
+ lock\n\
+ cmpxchg{l} {%4, %1|%1, %4}\n"
+ : "=a" (result), "=m" (*__dest)
+ : "0" (__comperand), "m" (*__dest), "r" (__xchg)
+ : "cc");
+ return result;
+}
+#define __GTHR_W32_InterlockedCompareExchange __gthr_i486_lock_cmp_xchg
+#else /* __GTHREAD_I486_INLINE_LOCK_PRIMITIVES */
+#define __GTHR_W32_InterlockedCompareExchange InterlockedCompareExchange
+#endif /* __GTHREAD_I486_INLINE_LOCK_PRIMITIVES */