Merged from trunk:
	2011-04-21  Jacek Caban  <jacek@codeweavers.com>  (rev. 4146)
	* _mingw.h: Added __MINGW_INTRIN_INLINE as a new macro. Added
	__debugbreak implementation.
	* winnt.h: Added __faststorefence implementation.


git-svn-id: svn+ssh://svn.code.sf.net/p/mingw-w64/code/branches/releases/v1.0@4147 4407c894-4637-0410-b4f5-ada5f102cad1
diff --git a/mingw-w64-headers/include/ChangeLog b/mingw-w64-headers/include/ChangeLog
index a79ebf4..3223125 100644
--- a/mingw-w64-headers/include/ChangeLog
+++ b/mingw-w64-headers/include/ChangeLog
@@ -1,3 +1,11 @@
+2011-04-21  Ozkan Sezer  <sezeroz@gmail.com>
+
+	Merged from trunk:
+	2011-04-21  Jacek Caban  <jacek@codeweavers.com>  (rev. 4146)
+	* _mingw.h: Added __MINGW_INTRIN_INLINE as a new macro. Added
+	__debugbreak implementation.
+	* winnt.h: Added __faststorefence implementation.
+
 2011-04-16  Ozkan Sezer  <sezeroz@gmail.com>
 
 	Merged from trunk:
diff --git a/mingw-w64-headers/include/_mingw.h b/mingw-w64-headers/include/_mingw.h
index ecdfebb..5991c60 100644
--- a/mingw-w64-headers/include/_mingw.h
+++ b/mingw-w64-headers/include/_mingw.h
@@ -83,6 +83,10 @@
 # endif
 #endif
 
+#if !defined(__MINGW_INTRIN_INLINE) && defined(__GNUC__)
+#define __MINGW_INTRIN_INLINE extern __inline__ __attribute__((always_inline,__gnu_inline__))
+#endif
+
 #ifdef __NO_INLINE__
 #undef __CRT__NO_INLINE
 #define __CRT__NO_INLINE 1
@@ -607,6 +611,13 @@
 extern "C" {
 #endif
 
+#ifdef __MINGW_INTRIN_INLINE
+__MINGW_INTRIN_INLINE void __cdecl __debugbreak(void)
+{
+  __asm__ __volatile__("int $3");
+}
+#endif
+
 /* mingw-w64 specific functions: */
 const char *__mingw_get_crt_info (void);
 
diff --git a/mingw-w64-headers/include/winnt.h b/mingw-w64-headers/include/winnt.h
index d242000..9987e3a 100644
--- a/mingw-w64-headers/include/winnt.h
+++ b/mingw-w64-headers/include/winnt.h
@@ -1424,7 +1424,12 @@
 #define MemoryFence _mm_mfence
 #define StoreFence _mm_sfence
 
-    void __faststorefence(void);
+#ifdef __MINGW_INTRIN_INLINE
+    __MINGW_INTRIN_INLINE void __faststorefence(void) {
+      __asm__ __volatile__ ("" ::: "memory");
+    }
+#endif
+
     void _m_prefetchw(void *Source);
 
 #include <intrin.h>