Author: tfaber Date: Sat Jul 6 10:11:21 2013 New Revision: 59431
URL: http://svn.reactos.org/svn/reactos?rev=59431&view=rev Log: [INCLUDE] - Properly declare and use DECLSPEC_CACHEALIGN. Patch by Samuel Serapión. CORE-7139 #resolve
Modified: trunk/reactos/include/ddk/wdm.h trunk/reactos/include/psdk/ntdef.h trunk/reactos/include/xdk/extypes.h
Modified: trunk/reactos/include/ddk/wdm.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/include/ddk/wdm.h?rev=59431... ============================================================================== --- trunk/reactos/include/ddk/wdm.h [iso-8859-1] (original) +++ trunk/reactos/include/ddk/wdm.h [iso-8859-1] Sat Jul 6 10:11:21 2013 @@ -1878,7 +1878,7 @@ #if !defined(_WIN64) && (defined(_NTDDK_) || defined(_NTIFS_) || defined(_NDIS_)) #define LOOKASIDE_ALIGN #else -#define LOOKASIDE_ALIGN /* FIXME: DECLSPEC_CACHEALIGN */ +#define LOOKASIDE_ALIGN DECLSPEC_CACHEALIGN #endif
typedef struct _LOOKASIDE_LIST_EX *PLOOKASIDE_LIST_EX; @@ -8333,7 +8333,7 @@ #define HIGH_LEVEL 15
#define KI_USER_SHARED_DATA ((ULONG_PTR)(KADDRESS_BASE + 0xFFFE0000)) -extern volatile LARGE_INTEGER KeTickCount; +extern DECLSPEC_CACHEALIGN volatile LARGE_INTEGER KeTickCount;
#define PAUSE_PROCESSOR __yield();
Modified: trunk/reactos/include/psdk/ntdef.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/ntdef.h?rev=59... ============================================================================== --- trunk/reactos/include/psdk/ntdef.h [iso-8859-1] (original) +++ trunk/reactos/include/psdk/ntdef.h [iso-8859-1] Sat Jul 6 10:11:21 2013 @@ -298,6 +298,18 @@ #define DECLSPEC_ALIGN(x) #endif #endif /* DECLSPEC_ALIGN */ + +#ifndef SYSTEM_CACHE_ALIGNMENT_SIZE +#if defined(_AMD64_) || defined(_X86_) +#define SYSTEM_CACHE_ALIGNMENT_SIZE 64 +#else +#define SYSTEM_CACHE_ALIGNMENT_SIZE 128 +#endif +#endif + +#ifndef DECLSPEC_CACHEALIGN +#define DECLSPEC_CACHEALIGN DECLSPEC_ALIGN(SYSTEM_CACHE_ALIGNMENT_SIZE) +#endif
#ifndef DECLSPEC_SELECTANY #if (_MSC_VER >= 1100) || defined(__GNUC__)
Modified: trunk/reactos/include/xdk/extypes.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/include/xdk/extypes.h?rev=5... ============================================================================== --- trunk/reactos/include/xdk/extypes.h [iso-8859-1] (original) +++ trunk/reactos/include/xdk/extypes.h [iso-8859-1] Sat Jul 6 10:11:21 2013 @@ -51,7 +51,7 @@ #if !defined(_WIN64) && (defined(_NTDDK_) || defined(_NTIFS_) || defined(_NDIS_)) #define LOOKASIDE_ALIGN #else -#define LOOKASIDE_ALIGN /* FIXME: DECLSPEC_CACHEALIGN */ +#define LOOKASIDE_ALIGN DECLSPEC_CACHEALIGN #endif
typedef struct _LOOKASIDE_LIST_EX *PLOOKASIDE_LIST_EX;