[ACPICA]
[reactos.git] / reactos / drivers / bus / acpi / acpica / include / platform / acwin.h
index cf1a5ee..d6645ab 100644 (file)
 
 /*! [Begin] no source code translation (Keep the include) */
 
-/* Windows uses VC */
-#ifdef _MSC_VER
+/* Windows uses VC or GCC */
+#if defined(_MSC_VER)
 #include "acmsvc.h"
+#elif defined(__GNUC__)
+#include "acgcc.h"
 #endif
 /*! [End] no source code translation !*/
 
@@ -152,67 +154,10 @@ typedef COMPILER_DEPENDENT_UINT64       u64;
 
 /*! [Begin] no source code translation  */
 
-#ifdef ACPI_APPLICATION
-#define ACPI_FLUSH_CPU_CACHE()
-#else
-#define ACPI_FLUSH_CPU_CACHE()  __asm {WBINVD}
-#endif
-
 #ifdef _DEBUG
 #define ACPI_SIMPLE_RETURN_MACROS
 #endif
 
 /*! [End] no source code translation !*/
 
-/*
- * Global Lock acquire/release code
- *
- * Note: Handles case where the FACS pointer is null
- */
-#define ACPI_ACQUIRE_GLOBAL_LOCK(FacsPtr, Acq)  __asm \
-{                                                   \
-        __asm mov           eax, 0xFF               \
-        __asm mov           ecx, FacsPtr            \
-        __asm or            ecx, ecx                \
-        __asm jz            exit_acq                \
-        __asm lea           ecx, [ecx].GlobalLock   \
-                                                    \
-        __asm acq10:                                \
-        __asm mov           eax, [ecx]              \
-        __asm mov           edx, eax                \
-        __asm and           edx, 0xFFFFFFFE         \
-        __asm bts           edx, 1                  \
-        __asm adc           edx, 0                  \
-        __asm lock cmpxchg  dword ptr [ecx], edx    \
-        __asm jnz           acq10                   \
-                                                    \
-        __asm cmp           dl, 3                   \
-        __asm sbb           eax, eax                \
-                                                    \
-        __asm exit_acq:                             \
-        __asm mov           Acq, al                 \
-}
-
-#define ACPI_RELEASE_GLOBAL_LOCK(FacsPtr, Pnd) __asm \
-{                                                   \
-        __asm xor           eax, eax                \
-        __asm mov           ecx, FacsPtr            \
-        __asm or            ecx, ecx                \
-        __asm jz            exit_rel                \
-        __asm lea           ecx, [ecx].GlobalLock   \
-                                                    \
-        __asm Rel10:                                \
-        __asm mov           eax, [ecx]              \
-        __asm mov           edx, eax                \
-        __asm and           edx, 0xFFFFFFFC         \
-        __asm lock cmpxchg  dword ptr [ecx], edx    \
-        __asm jnz           Rel10                   \
-                                                    \
-        __asm cmp           dl, 3                   \
-        __asm and           eax, 1                  \
-                                                    \
-        __asm exit_rel:                             \
-        __asm mov           Pnd, al                 \
-}
-
 #endif /* __ACWIN_H__ */