mirror of
https://github.com/reactos/reactos.git
synced 2025-08-04 23:25:45 +00:00
[SDK:NDK/XDK] Remove x86 KeGetPcr() definition from the DDK (#6526)
The official MS DDK/WDK does not expose KeGetPcr() for x86, so do not expose it there as well. Use instead the private NDK definition. If it were exposed in the DDK/WDK, it would have to be a multiprocessor-compatible definition. Note that the broken definition was working only in single-processor mode, using the PCR static memory pointer value. The official MS DDK/WDK exposes KeGetPcr() as an alias to such a PCR value only for IA64, MIPS and PPC, which is of course not great.
This commit is contained in:
parent
e6c0081c28
commit
bf9cac8a67
2 changed files with 15 additions and 3 deletions
|
@ -75,8 +75,10 @@ Author:
|
||||||
#define K0IPCR ((ULONG_PTR)(KIP0PCRADDRESS))
|
#define K0IPCR ((ULONG_PTR)(KIP0PCRADDRESS))
|
||||||
#define PCR ((KPCR *)K0IPCR)
|
#define PCR ((KPCR *)K0IPCR)
|
||||||
#if defined(CONFIG_SMP) || defined(NT_BUILD)
|
#if defined(CONFIG_SMP) || defined(NT_BUILD)
|
||||||
#undef KeGetPcr
|
//#undef KeGetPcr
|
||||||
#define KeGetPcr() ((KPCR *)__readfsdword(FIELD_OFFSET(KPCR, SelfPcr)))
|
#define KeGetPcr() ((KPCR *)__readfsdword(FIELD_OFFSET(KPCR, SelfPcr)))
|
||||||
|
#else
|
||||||
|
#define KeGetPcr() PCR
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
|
@ -283,8 +283,6 @@ typedef struct _CONTEXT {
|
||||||
} CONTEXT;
|
} CONTEXT;
|
||||||
#include "poppack.h"
|
#include "poppack.h"
|
||||||
|
|
||||||
#define KeGetPcr() PCR
|
|
||||||
|
|
||||||
#define PCR_MINOR_VERSION 1
|
#define PCR_MINOR_VERSION 1
|
||||||
#define PCR_MAJOR_VERSION 1
|
#define PCR_MAJOR_VERSION 1
|
||||||
|
|
||||||
|
@ -325,6 +323,18 @@ typedef struct _KPCR {
|
||||||
ULONG HalReserved[16];
|
ULONG HalReserved[16];
|
||||||
} KPCR, *PKPCR;
|
} KPCR, *PKPCR;
|
||||||
|
|
||||||
|
/* NOTE: This macro is not exposed in the DDK/WDK for _M_IX86.
|
||||||
|
* If it were, this would be its definition. */
|
||||||
|
#if 0
|
||||||
|
// #define KeGetPcr() ((PKPCR)__readfsdword(FIELD_OFFSET(KPCR, SelfPcr)))
|
||||||
|
FORCEINLINE
|
||||||
|
PKPCR
|
||||||
|
KeGetPcr(VOID)
|
||||||
|
{
|
||||||
|
return (PKPCR)__readfsdword(FIELD_OFFSET(KPCR, SelfPcr));
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#if (NTDDI_VERSION >= NTDDI_WIN7)
|
#if (NTDDI_VERSION >= NTDDI_WIN7)
|
||||||
_CRT_DEPRECATE_TEXT("KeGetCurrentProcessorNumber is deprecated. Use KeGetCurrentProcessorNumberEx or KeGetCurrentProcessorIndex instead.")
|
_CRT_DEPRECATE_TEXT("KeGetCurrentProcessorNumber is deprecated. Use KeGetCurrentProcessorNumberEx or KeGetCurrentProcessorIndex instead.")
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue