[ACPICA] Fix MSVC x64 build

See CORE-16082
This commit is contained in:
Timo Kreuzer 2019-05-26 15:06:32 +02:00
parent 6997a7a36f
commit ad60726288
3 changed files with 44 additions and 3 deletions

View file

@ -149,7 +149,7 @@
#endif
#ifdef __REACTOS__
#ifdef _M_IX86
/* Flush CPU cache - used when going to sleep. Wbinvd or similar. */
#ifdef ACPI_APPLICATION
@ -208,7 +208,7 @@
__asm exit_rel: \
__asm mov Pnd, al \
}
#endif /* _M_IX86 */
#endif /* __REACTOS__ */
/* warn C4100: unreferenced formal parameter */

View file

@ -83,6 +83,7 @@
/*! [Begin] no source code translation */
#ifndef __REACTOS__
#define ACPI_FLUSH_CPU_CACHE()
/*
@ -99,6 +100,46 @@
#endif
#else /* __REACTOS__ */
#ifdef ACPI_APPLICATION
#define ACPI_FLUSH_CPU_CACHE()
#else
#define ACPI_FLUSH_CPU_CACHE() __wbinvd()
#endif
#define ACPI_ACQUIRE_GLOBAL_LOCK(FacsPtr, Acq) \
{ \
BOOLEAN acquired = 0xFF; \
\
if ((FacsPtr) != 0) \
{ \
UINT32 compare, prev, newval; \
UINT32* lock = &((FacsPtr)->GlobalLock); \
do \
{ \
compare = *lock; \
newval = (compare & ~1) | ((compare >> 1) & 1) | 2; \
prev = InterlockedCompareExchange(lock, newval, compare); \
} while (prev != compare); \
acquired = ((newval & 0xFF) < 3) ? 0xFF : 0x00; \
} \
(Acq) = acquired; \
}
#define ACPI_RELEASE_GLOBAL_LOCK(FacsPtr, Pnd) \
{ \
BOOLEAN pending = 0; \
\
if ((FacsPtr) != 0) \
{ \
pending = InterlockedAnd(&(FacsPtr)->GlobalLock, ~3) & 1; \
} \
(Pnd) = pending; \
}
#endif /* __REACTOS__ */
/*! [End] no source code translation !*/
#endif /* __ACWIN_H__ */

View file

@ -434,7 +434,7 @@ AcpiNsBuildPrefixedPathname (
char *FullPath = NULL;
char *ExternalPath = NULL;
char *PrefixPath = NULL;
UINT32 PrefixPathLength = 0;
SIZE_T PrefixPathLength = 0;
/* If there is a prefix, get the pathname to it */