mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-03 04:13:31 +00:00
[XDK]
- Introduce some _ANONYMOUS_STRUCT and NONAMELESSUNION based definitions. [DDK] - Update XDK generated headers to reflect the recent changes. - Update some header guards. - Add some missing new lines at the end of files. - Fix PUSB_DEVICE_HANDLE guard. - Introduce some _ANONYMOUS_STRUCT and NONAMELESSUNION based definitions. [PSDK] - Update some header guards. - Add missing new line at the end of driverspecs.h [NDIS] - Update the ndis header guard. svn path=/trunk/; revision=48511
This commit is contained in:
@@ -27,7 +27,7 @@ typedef struct _NDIS_M_DRIVER_BLOCK {
|
||||
PDRIVER_OBJECT DriverObject; /* Driver object of miniport */
|
||||
LIST_ENTRY DeviceList; /* Adapters created by miniport */
|
||||
PUNICODE_STRING RegistryPath; /* SCM Registry key */
|
||||
#if !defined(_MSC_VER) && defined(__NDIS_H)
|
||||
#if !defined(_MSC_VER) && defined(_NDIS_)
|
||||
} NDIS_M_DRIVER_BLOCK_COMPATIBILITY_HACK_DONT_USE;
|
||||
#else
|
||||
} NDIS_M_DRIVER_BLOCK, *PNDIS_M_DRIVER_BLOCK;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
ULONG
|
||||
DxApiGetVersion();
|
||||
DxApiGetVersion(void);
|
||||
|
||||
ULONG
|
||||
DxApi(
|
||||
|
||||
+34
-30
@@ -3,7 +3,7 @@
|
||||
#if defined(_X86_) || defined(_IA64_) || defined(_AMD64_)
|
||||
|
||||
typedef union _MCI_ADDR {
|
||||
struct {
|
||||
_ANONYMOUS_STRUCT struct {
|
||||
ULONG Address;
|
||||
ULONG Reserved;
|
||||
} DUMMYSTRUCTNAME;
|
||||
@@ -157,7 +157,7 @@ typedef enum _ERROR_SEVERITY_VALUE {
|
||||
|
||||
typedef union _ERROR_REVISION {
|
||||
USHORT Revision;
|
||||
struct {
|
||||
_ANONYMOUS_STRUCT struct {
|
||||
UCHAR Minor;
|
||||
UCHAR Major;
|
||||
} DUMMYSTRUCTNAME;
|
||||
@@ -174,7 +174,7 @@ typedef union _ERROR_REVISION {
|
||||
|
||||
typedef union _ERROR_TIMESTAMP {
|
||||
ULONGLONG TimeStamp;
|
||||
struct {
|
||||
_ANONYMOUS_STRUCT struct {
|
||||
UCHAR Seconds;
|
||||
UCHAR Minutes;
|
||||
UCHAR Hours;
|
||||
@@ -201,7 +201,7 @@ typedef _ERROR_PLATFORM_GUID ERROR_PLATFORM_GUID, *PERROR_PLATFORM_GUID;
|
||||
|
||||
typedef union _ERROR_RECORD_VALID {
|
||||
UCHAR Valid;
|
||||
struct {
|
||||
_ANONYMOUS_STRUCT struct {
|
||||
UCHAR OemPlatformID:1;
|
||||
UCHAR Reserved:7;
|
||||
} DUMMYSTRUCTNAME;
|
||||
@@ -219,7 +219,7 @@ typedef struct _ERROR_RECORD_HEADER {
|
||||
|
||||
typedef union _ERROR_RECOVERY_INFO {
|
||||
UCHAR RecoveryInfo;
|
||||
struct {
|
||||
_ANONYMOUS_STRUCT struct {
|
||||
UCHAR Corrected:1;
|
||||
UCHAR NotContained:1;
|
||||
UCHAR Reset:1;
|
||||
@@ -236,7 +236,7 @@ typedef struct _ERROR_SECTION_HEADER {
|
||||
ULONG Length;
|
||||
} ERROR_SECTION_HEADER, *PERROR_SECTION_HEADER;
|
||||
|
||||
#if !defined(__midl) && defined(_MSC_EXTENSIONS)
|
||||
#if !defined(__midl)
|
||||
__inline
|
||||
USHORT
|
||||
NTAPI
|
||||
@@ -245,16 +245,20 @@ GetFwMceLogProcessorNumber(
|
||||
{
|
||||
PERROR_SECTION_HEADER section = (PERROR_SECTION_HEADER)((ULONG64)Log + sizeof(*Log));
|
||||
USHORT lid = (USHORT)((UCHAR)(section->Reserved));
|
||||
#ifdef NONAMELESSUNION
|
||||
lid |= (USHORT)((UCHAR)(Log->TimeStamp.s.Reserved) << 8);
|
||||
#else
|
||||
lid |= (USHORT)((UCHAR)(Log->TimeStamp.Reserved) << 8);
|
||||
#endif
|
||||
return( lid );
|
||||
}
|
||||
#endif
|
||||
#endif /* !__midl */
|
||||
|
||||
#define ERROR_PROCESSOR_GUID {0xe429faf1, 0x3cb7, 0x11d4, {0xbc, 0xa7, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81}}
|
||||
|
||||
typedef union _ERROR_MODINFO_VALID {
|
||||
ULONGLONG Valid;
|
||||
struct {
|
||||
_ANONYMOUS_STRUCT struct {
|
||||
ULONGLONG CheckInfo:1;
|
||||
ULONGLONG RequestorIdentifier:1;
|
||||
ULONGLONG ResponderIdentifier:1;
|
||||
@@ -291,7 +295,7 @@ typedef enum _ERROR_CACHE_CHECK_MESI {
|
||||
|
||||
typedef union _ERROR_CACHE_CHECK {
|
||||
ULONGLONG CacheCheck;
|
||||
struct {
|
||||
_ANONYMOUS_STRUCT struct {
|
||||
ULONGLONG Operation:4;
|
||||
ULONGLONG Level:2;
|
||||
ULONGLONG Reserved1:2;
|
||||
@@ -324,7 +328,7 @@ typedef union _ERROR_CACHE_CHECK {
|
||||
|
||||
typedef union _ERROR_CACHE_CHECK {
|
||||
ULONGLONG CacheCheck;
|
||||
struct {
|
||||
_ANONYMOUS_STRUCT struct {
|
||||
ULONGLONG Operation:4;
|
||||
ULONGLONG Level:2;
|
||||
ULONGLONG Reserved1:2;
|
||||
@@ -367,7 +371,7 @@ typedef enum _ERROR_TLB_CHECK_OPERATION {
|
||||
|
||||
typedef union _ERROR_TLB_CHECK {
|
||||
ULONGLONG TlbCheck;
|
||||
struct {
|
||||
_ANONYMOUS_STRUCT struct {
|
||||
ULONGLONG TRSlot:8;
|
||||
ULONGLONG TRSlotValid:1;
|
||||
ULONGLONG Reserved1:1;
|
||||
@@ -407,7 +411,7 @@ typedef enum _ERROR_BUS_CHECK_OPERATION {
|
||||
|
||||
typedef union _ERROR_BUS_CHECK {
|
||||
ULONGLONG BusCheck;
|
||||
struct {
|
||||
_ANONYMOUS_STRUCT struct {
|
||||
ULONGLONG Size:5;
|
||||
ULONGLONG Internal:1;
|
||||
ULONGLONG External:1;
|
||||
@@ -434,7 +438,7 @@ typedef union _ERROR_BUS_CHECK {
|
||||
|
||||
typedef union _ERROR_BUS_CHECK {
|
||||
ULONGLONG BusCheck;
|
||||
struct {
|
||||
_ANONYMOUS_STRUCT struct {
|
||||
ULONGLONG Size:5;
|
||||
ULONGLONG Internal:1;
|
||||
ULONGLONG External:1;
|
||||
@@ -484,7 +488,7 @@ typedef enum _ERROR_REGFILE_CHECK_OPERATION {
|
||||
|
||||
typedef union _ERROR_REGFILE_CHECK {
|
||||
ULONGLONG RegFileCheck;
|
||||
struct {
|
||||
_ANONYMOUS_STRUCT struct {
|
||||
ULONGLONG Identifier:4;
|
||||
ULONGLONG Operation:4;
|
||||
ULONGLONG RegisterNumber:7;
|
||||
@@ -518,7 +522,7 @@ typedef enum _ERROR_MS_CHECK_OPERATION {
|
||||
|
||||
typedef union _ERROR_MS_CHECK {
|
||||
ULONGLONG MsCheck;
|
||||
struct {
|
||||
_ANONYMOUS_STRUCT struct {
|
||||
ULONGLONG StructureIdentifier:5;
|
||||
ULONGLONG Level:3;
|
||||
ULONGLONG ArrayId:4;
|
||||
@@ -561,7 +565,7 @@ typedef struct _ERROR_MODINFO {
|
||||
|
||||
typedef union _ERROR_PROCESSOR_VALID {
|
||||
ULONGLONG Valid;
|
||||
struct {
|
||||
_ANONYMOUS_STRUCT struct {
|
||||
ULONGLONG ErrorMap:1;
|
||||
ULONGLONG StateParameter:1;
|
||||
ULONGLONG CRLid:1;
|
||||
@@ -578,7 +582,7 @@ typedef union _ERROR_PROCESSOR_VALID {
|
||||
|
||||
typedef union _ERROR_PROCESSOR_ERROR_MAP {
|
||||
ULONGLONG ErrorMap;
|
||||
struct {
|
||||
_ANONYMOUS_STRUCT struct {
|
||||
ULONGLONG Cid:4;
|
||||
ULONGLONG Tid:4;
|
||||
ULONGLONG Eic:4;
|
||||
@@ -597,7 +601,7 @@ typedef _ERROR_PROCESSOR_LEVEL_INDEX ERROR_PROCESSOR_LEVEL_INDEX, *PERROR_PROCES
|
||||
|
||||
typedef union _ERROR_PROCESSOR_STATE_PARAMETER {
|
||||
ULONGLONG StateParameter;
|
||||
struct {
|
||||
_ANONYMOUS_STRUCT struct {
|
||||
ULONGLONG reserved0:2;
|
||||
ULONGLONG rz:1;
|
||||
ULONGLONG ra:1;
|
||||
@@ -641,7 +645,7 @@ typedef union _ERROR_PROCESSOR_STATE_PARAMETER {
|
||||
|
||||
typedef union _PROCESSOR_LOCAL_ID {
|
||||
ULONGLONG LocalId;
|
||||
struct {
|
||||
_ANONYMOUS_STRUCT struct {
|
||||
ULONGLONG reserved:16;
|
||||
ULONGLONG eid:8;
|
||||
ULONGLONG id:8;
|
||||
@@ -664,7 +668,7 @@ typedef struct _ERROR_PROCESSOR_CPUID_INFO {
|
||||
|
||||
typedef union _ERROR_PROCESSOR_STATIC_INFO_VALID {
|
||||
ULONGLONG Valid;
|
||||
struct {
|
||||
_ANONYMOUS_STRUCT struct {
|
||||
ULONGLONG MinState:1;
|
||||
ULONGLONG BR:1;
|
||||
ULONGLONG CR:1;
|
||||
@@ -730,7 +734,7 @@ typedef enum _ERR_TYPES {
|
||||
|
||||
typedef union _ERROR_STATUS {
|
||||
ULONGLONG Status;
|
||||
struct {
|
||||
_ANONYMOUS_STRUCT struct {
|
||||
ULONGLONG Reserved0:8;
|
||||
ULONGLONG Type:8;
|
||||
ULONGLONG Address:1;
|
||||
@@ -750,7 +754,7 @@ typedef struct _ERROR_OEM_DATA {
|
||||
|
||||
typedef union _ERROR_BUS_SPECIFIC_DATA {
|
||||
ULONGLONG BusSpecificData;
|
||||
struct {
|
||||
_ANONYMOUS_STRUCT struct {
|
||||
ULONGLONG LockAsserted:1;
|
||||
ULONGLONG DeferLogged:1;
|
||||
ULONGLONG IOQEmpty:1;
|
||||
@@ -777,7 +781,7 @@ typedef union _ERROR_BUS_SPECIFIC_DATA {
|
||||
|
||||
typedef union _ERROR_MEMORY_VALID {
|
||||
ULONGLONG Valid;
|
||||
struct {
|
||||
_ANONYMOUS_STRUCT struct {
|
||||
ULONGLONG ErrorStatus:1;
|
||||
ULONGLONG PhysicalAddress:1;
|
||||
ULONGLONG AddressMask:1;
|
||||
@@ -825,7 +829,7 @@ typedef struct _ERROR_MEMORY {
|
||||
|
||||
typedef union _ERROR_PCI_BUS_VALID {
|
||||
ULONGLONG Valid;
|
||||
struct {
|
||||
_ANONYMOUS_STRUCT struct {
|
||||
ULONGLONG ErrorStatus:1;
|
||||
ULONGLONG ErrorType:1;
|
||||
ULONGLONG Id:1;
|
||||
@@ -881,7 +885,7 @@ typedef struct _ERROR_PCI_BUS {
|
||||
|
||||
typedef union _ERROR_PCI_COMPONENT_VALID {
|
||||
ULONGLONG Valid;
|
||||
struct {
|
||||
_ANONYMOUS_STRUCT struct {
|
||||
ULONGLONG ErrorStatus:1;
|
||||
ULONGLONG Info:1;
|
||||
ULONGLONG MemoryMappedRegistersPairs:1;
|
||||
@@ -919,7 +923,7 @@ typedef struct _ERROR_PCI_COMPONENT {
|
||||
|
||||
typedef union _ERROR_SYSTEM_EVENT_LOG_VALID {
|
||||
ULONGLONG Valid;
|
||||
struct {
|
||||
_ANONYMOUS_STRUCT struct {
|
||||
ULONGLONG RecordId:1;
|
||||
ULONGLONG RecordType:1;
|
||||
ULONGLONG GeneratorId:1;
|
||||
@@ -954,7 +958,7 @@ typedef struct _ERROR_SYSTEM_EVENT_LOG {
|
||||
|
||||
typedef union _ERROR_SMBIOS_VALID {
|
||||
ULONGLONG Valid;
|
||||
struct {
|
||||
_ANONYMOUS_STRUCT struct {
|
||||
ULONGLONG EventType:1;
|
||||
ULONGLONG Length:1;
|
||||
ULONGLONG TimeStamp:1;
|
||||
@@ -978,7 +982,7 @@ typedef struct _ERROR_SMBIOS {
|
||||
|
||||
typedef union _ERROR_PLATFORM_SPECIFIC_VALID {
|
||||
ULONGLONG Valid;
|
||||
struct {
|
||||
_ANONYMOUS_STRUCT struct {
|
||||
ULONGLONG ErrorStatus:1;
|
||||
ULONGLONG RequestorId:1;
|
||||
ULONGLONG ResponderId:1;
|
||||
@@ -1007,7 +1011,7 @@ typedef struct _ERROR_PLATFORM_SPECIFIC {
|
||||
|
||||
typedef union _ERROR_PLATFORM_BUS_VALID {
|
||||
ULONGLONG Valid;
|
||||
struct {
|
||||
_ANONYMOUS_STRUCT struct {
|
||||
ULONGLONG ErrorStatus:1;
|
||||
ULONGLONG RequestorId:1;
|
||||
ULONGLONG ResponderId:1;
|
||||
@@ -1036,7 +1040,7 @@ typedef struct _ERROR_PLATFORM_BUS {
|
||||
|
||||
typedef union _ERROR_PLATFORM_HOST_CONTROLLER_VALID {
|
||||
ULONGLONG Valid;
|
||||
struct {
|
||||
_ANONYMOUS_STRUCT struct {
|
||||
ULONGLONG ErrorStatus:1;
|
||||
ULONGLONG RequestorId:1;
|
||||
ULONGLONG ResponderId:1;
|
||||
|
||||
@@ -29,8 +29,8 @@
|
||||
* NDIS51_MINIPORT - Building NDIS 5.1 miniport driver
|
||||
*/
|
||||
|
||||
#ifndef __NDIS_H
|
||||
#define __NDIS_H
|
||||
#ifndef _NDIS_
|
||||
#define _NDIS_
|
||||
|
||||
#ifndef NDIS_WDM
|
||||
#define NDIS_WDM 0
|
||||
@@ -5987,6 +5987,6 @@ typedef NDIS_WAN_MAC_CHARACTERISTICS *PNDIS_WAN_MAC_CHARACTERISTICS;
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __NDIS_H */
|
||||
#endif /* _NDIS_ */
|
||||
|
||||
/* EOF */
|
||||
|
||||
@@ -20,8 +20,10 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __NDISTAPI_H
|
||||
#define __NDISTAPI_H
|
||||
#pragma once
|
||||
|
||||
#ifndef _NDIS_TAPI_
|
||||
#define _NDIS_TAPI_
|
||||
|
||||
#include "ndis.h"
|
||||
|
||||
@@ -1301,4 +1303,4 @@ typedef struct _CO_AF_TAPI_MAKE_CALL_PARAMETERS {
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __NDISTAPI_H */
|
||||
#endif /* _NDIS_TAPI_ */
|
||||
|
||||
@@ -22,6 +22,9 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef _NDIS_WAN_
|
||||
#define _NDIS_WAN_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
@@ -352,3 +355,6 @@ typedef struct _WAN_CO_MTULINKPARAMS {
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _NDIS_WAN_ */
|
||||
|
||||
|
||||
@@ -20,8 +20,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __NTDDPCM_H
|
||||
#define __NTDDPCM_H
|
||||
#ifndef _NTDDPCMH_
|
||||
#define _NTDDPCMH_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -156,4 +156,4 @@ typedef struct _PCMCIA_INTERFACE_STANDARD {
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __NTDDPCM_H */
|
||||
#endif /* _NTDDPCMH_ */
|
||||
|
||||
@@ -40,4 +40,4 @@ DeRegisterOpRegionHandler (IN PDEVICE_OBJECT DeviceObject,
|
||||
#define ACPI_OPREGION_REGION_SPACE_SMB 0x4
|
||||
#define ACPI_OPREGION_READ 0x0
|
||||
#define ACPI_OPREGION_WRITE 0x1
|
||||
#define ACPI_OPREGION_ACCESS_AT_HIGH_LEVEL 0x1
|
||||
#define ACPI_OPREGION_ACCESS_AT_HIGH_LEVEL 0x1
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
#if (NTDDI_VERSION >= NTDDI_WINXP)
|
||||
|
||||
#if !defined(_USBBUSIF_)
|
||||
#if !defined(_HUBBUSIF_)
|
||||
typedef PVOID PUSB_DEVICE_HANDLE;
|
||||
#endif
|
||||
|
||||
|
||||
+100
-9
@@ -1242,7 +1242,7 @@ typedef struct _KDEVICE_QUEUE {
|
||||
CSHORT Size;
|
||||
LIST_ENTRY DeviceListHead;
|
||||
KSPIN_LOCK Lock;
|
||||
#if defined(_AMD64_)
|
||||
# if defined(_AMD64_)
|
||||
_ANONYMOUS_UNION union {
|
||||
BOOLEAN Busy;
|
||||
_ANONYMOUS_STRUCT struct {
|
||||
@@ -1250,9 +1250,9 @@ typedef struct _KDEVICE_QUEUE {
|
||||
LONG64 Hint:56;
|
||||
} DUMMYSTRUCTNAME;
|
||||
} DUMMYUNIONNAME;
|
||||
#else
|
||||
# else
|
||||
BOOLEAN Busy;
|
||||
#endif
|
||||
# endif
|
||||
} KDEVICE_QUEUE, *PKDEVICE_QUEUE, *RESTRICTED_POINTER PRKDEVICE_QUEUE;
|
||||
|
||||
#define TIMER_EXPIRED_INDEX_BITS 6
|
||||
@@ -1374,9 +1374,9 @@ typedef struct _KTIMER {
|
||||
ULARGE_INTEGER DueTime;
|
||||
LIST_ENTRY TimerListEntry;
|
||||
struct _KDPC *Dpc;
|
||||
#if !defined(_X86_)
|
||||
# if !defined(_X86_)
|
||||
ULONG Processor;
|
||||
#endif
|
||||
# endif
|
||||
ULONG Period;
|
||||
} KTIMER, *PKTIMER, *RESTRICTED_POINTER PRKTIMER;
|
||||
|
||||
@@ -5692,30 +5692,35 @@ typedef struct _SCATTER_GATHER_ELEMENT {
|
||||
ULONG_PTR Reserved;
|
||||
} SCATTER_GATHER_ELEMENT, *PSCATTER_GATHER_ELEMENT;
|
||||
|
||||
#if defined(_MSC_EXTENSIONS)
|
||||
#if defined(_MSC_EXTENSIONS) || defined(__GNUC__)
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#if _MSC_VER >= 1200
|
||||
#pragma warning(push)
|
||||
#endif
|
||||
#pragma warning(disable:4200)
|
||||
#endif /* _MSC_VER */
|
||||
|
||||
typedef struct _SCATTER_GATHER_LIST {
|
||||
ULONG NumberOfElements;
|
||||
ULONG_PTR Reserved;
|
||||
SCATTER_GATHER_ELEMENT Elements[1];
|
||||
} SCATTER_GATHER_LIST, *PSCATTER_GATHER_LIST;
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#if _MSC_VER >= 1200
|
||||
#pragma warning(pop)
|
||||
#else
|
||||
#pragma warning(default:4200)
|
||||
#endif
|
||||
#endif /* _MSC_VER */
|
||||
|
||||
#else
|
||||
#else /* defined(_MSC_EXTENSIONS) || defined(__GNUC__) */
|
||||
|
||||
struct _SCATTER_GATHER_LIST;
|
||||
typedef struct _SCATTER_GATHER_LIST SCATTER_GATHER_LIST, *PSCATTER_GATHER_LIST;
|
||||
|
||||
#endif
|
||||
#endif /* defined(_MSC_EXTENSIONS) || defined(__GNUC__) */
|
||||
|
||||
typedef NTSTATUS
|
||||
(NTAPI DRIVER_ADD_DEVICE)(
|
||||
@@ -7803,9 +7808,15 @@ _KeQueryTickCount(
|
||||
OUT PLARGE_INTEGER CurrentCount)
|
||||
{
|
||||
for (;;) {
|
||||
#ifdef NONAMELESSUNION
|
||||
CurrentCount->s.HighPart = KeTickCount.High1Time;
|
||||
CurrentCount->s.LowPart = KeTickCount.LowPart;
|
||||
if (CurrentCount->s.HighPart == KeTickCount.High2Time) break;
|
||||
#else
|
||||
CurrentCount->HighPart = KeTickCount.High1Time;
|
||||
CurrentCount->LowPart = KeTickCount.LowPart;
|
||||
if (CurrentCount->HighPart == KeTickCount.High2Time) break;
|
||||
#endif
|
||||
YieldProcessor();
|
||||
}
|
||||
}
|
||||
@@ -12748,7 +12759,11 @@ IoSkipCurrentIrpStackLocation(
|
||||
{
|
||||
ASSERT(Irp->CurrentLocation <= Irp->StackCount);
|
||||
Irp->CurrentLocation++;
|
||||
#ifdef NONAMELESSUNION
|
||||
Irp->Tail.Overlay.s.u.CurrentStackLocation++;
|
||||
#else
|
||||
Irp->Tail.Overlay.CurrentStackLocation++;
|
||||
#endif
|
||||
}
|
||||
|
||||
FORCEINLINE
|
||||
@@ -12758,7 +12773,11 @@ IoSetNextIrpStackLocation(
|
||||
{
|
||||
ASSERT(Irp->CurrentLocation > 0);
|
||||
Irp->CurrentLocation--;
|
||||
#ifdef NONAMELESSUNION
|
||||
Irp->Tail.Overlay.s.u.CurrentStackLocation--;
|
||||
#else
|
||||
Irp->Tail.Overlay.CurrentStackLocation--;
|
||||
#endif
|
||||
}
|
||||
|
||||
FORCEINLINE
|
||||
@@ -12767,7 +12786,11 @@ IoGetNextIrpStackLocation(
|
||||
IN PIRP Irp)
|
||||
{
|
||||
ASSERT(Irp->CurrentLocation > 0);
|
||||
#ifdef NONAMELESSUNION
|
||||
return ((Irp)->Tail.Overlay.s.u.CurrentStackLocation - 1 );
|
||||
#else
|
||||
return ((Irp)->Tail.Overlay.CurrentStackLocation - 1 );
|
||||
#endif
|
||||
}
|
||||
|
||||
FORCEINLINE
|
||||
@@ -12858,7 +12881,11 @@ IoGetCurrentIrpStackLocation(
|
||||
IN PIRP Irp)
|
||||
{
|
||||
ASSERT(Irp->CurrentLocation <= Irp->StackCount + 1);
|
||||
#ifdef NONAMELESSUNION
|
||||
return Irp->Tail.Overlay.s.u.CurrentStackLocation;
|
||||
#else
|
||||
return Irp->Tail.Overlay.CurrentStackLocation;
|
||||
#endif
|
||||
}
|
||||
|
||||
FORCEINLINE
|
||||
@@ -13243,7 +13270,11 @@ ExpInterlockedPushEntrySList(
|
||||
|
||||
#else /* !defined(_WIN64) */
|
||||
|
||||
#ifdef NONAMELESSUNION
|
||||
#define ExQueryDepthSList(listhead) (listhead)->s.Depth
|
||||
#else
|
||||
#define ExQueryDepthSList(listhead) (listhead)->Depth
|
||||
#endif
|
||||
|
||||
NTKERNELAPI
|
||||
PSINGLE_LIST_ENTRY
|
||||
@@ -13300,6 +13331,15 @@ ExAllocateFromPagedLookasideList(
|
||||
PVOID Entry;
|
||||
|
||||
Lookaside->L.TotalAllocates++;
|
||||
#ifdef NONAMELESSUNION
|
||||
Entry = InterlockedPopEntrySList(&Lookaside->L.u.ListHead);
|
||||
if (Entry == NULL) {
|
||||
Lookaside->L.u2.AllocateMisses++;
|
||||
Entry = (Lookaside->L.u4.Allocate)(Lookaside->L.Type,
|
||||
Lookaside->L.Size,
|
||||
Lookaside->L.Tag);
|
||||
}
|
||||
#else /* NONAMELESSUNION */
|
||||
Entry = InterlockedPopEntrySList(&Lookaside->L.ListHead);
|
||||
if (Entry == NULL) {
|
||||
Lookaside->L.AllocateMisses++;
|
||||
@@ -13307,6 +13347,7 @@ ExAllocateFromPagedLookasideList(
|
||||
Lookaside->L.Size,
|
||||
Lookaside->L.Tag);
|
||||
}
|
||||
#endif /* NONAMELESSUNION */
|
||||
return Entry;
|
||||
}
|
||||
|
||||
@@ -13317,12 +13358,21 @@ ExFreeToPagedLookasideList(
|
||||
IN PVOID Entry)
|
||||
{
|
||||
Lookaside->L.TotalFrees++;
|
||||
#ifdef NONAMELESSUNION
|
||||
if (ExQueryDepthSList(&Lookaside->L.u.ListHead) >= Lookaside->L.Depth) {
|
||||
Lookaside->L.u3.FreeMisses++;
|
||||
(Lookaside->L.u5.Free)(Entry);
|
||||
} else {
|
||||
InterlockedPushEntrySList(&Lookaside->L.u.ListHead, (PSLIST_ENTRY)Entry);
|
||||
}
|
||||
#else /* NONAMELESSUNION */
|
||||
if (ExQueryDepthSList(&Lookaside->L.ListHead) >= Lookaside->L.Depth) {
|
||||
Lookaside->L.FreeMisses++;
|
||||
(Lookaside->L.Free)(Entry);
|
||||
} else {
|
||||
InterlockedPushEntrySList(&Lookaside->L.ListHead, (PSLIST_ENTRY)Entry);
|
||||
}
|
||||
#endif /* NONAMELESSUNION */
|
||||
}
|
||||
|
||||
#endif /* _WIN2K_COMPAT_SLIST_USAGE */
|
||||
@@ -13936,6 +13986,16 @@ ExAllocateFromLookasideListEx(
|
||||
PVOID Entry;
|
||||
|
||||
Lookaside->L.TotalAllocates += 1;
|
||||
#ifdef NONAMELESSUNION
|
||||
Entry = InterlockedPopEntrySList(&Lookaside->L.u.ListHead);
|
||||
if (Entry == NULL) {
|
||||
Lookaside->L.u2.AllocateMisses += 1;
|
||||
Entry = (Lookaside->L.u4.AllocateEx)(Lookaside->L.Type,
|
||||
Lookaside->L.Size,
|
||||
Lookaside->L.Tag,
|
||||
Lookaside);
|
||||
}
|
||||
#else /* NONAMELESSUNION */
|
||||
Entry = InterlockedPopEntrySList(&Lookaside->L.ListHead);
|
||||
if (Entry == NULL) {
|
||||
Lookaside->L.AllocateMisses += 1;
|
||||
@@ -13944,6 +14004,7 @@ ExAllocateFromLookasideListEx(
|
||||
Lookaside->L.Tag,
|
||||
Lookaside);
|
||||
}
|
||||
#endif /* NONAMELESSUNION */
|
||||
return Entry;
|
||||
}
|
||||
|
||||
@@ -13986,6 +14047,20 @@ ExAllocateFromNPagedLookasideList(
|
||||
PVOID Entry;
|
||||
|
||||
Lookaside->L.TotalAllocates++;
|
||||
#ifdef NONAMELESSUNION
|
||||
#if defined(_WIN2K_COMPAT_SLIST_USAGE) && defined(_X86_)
|
||||
Entry = ExInterlockedPopEntrySList(&Lookaside->L.u.ListHead,
|
||||
&Lookaside->Lock__ObsoleteButDoNotDelete);
|
||||
#else
|
||||
Entry = InterlockedPopEntrySList(&Lookaside->L.u.ListHead);
|
||||
#endif
|
||||
if (Entry == NULL) {
|
||||
Lookaside->L.u2.AllocateMisses++;
|
||||
Entry = (Lookaside->L.u4.Allocate)(Lookaside->L.Type,
|
||||
Lookaside->L.Size,
|
||||
Lookaside->L.Tag);
|
||||
}
|
||||
#else /* NONAMELESSUNION */
|
||||
#if defined(_WIN2K_COMPAT_SLIST_USAGE) && defined(_X86_)
|
||||
Entry = ExInterlockedPopEntrySList(&Lookaside->L.ListHead,
|
||||
&Lookaside->Lock__ObsoleteButDoNotDelete);
|
||||
@@ -13998,6 +14073,7 @@ ExAllocateFromNPagedLookasideList(
|
||||
Lookaside->L.Size,
|
||||
Lookaside->L.Tag);
|
||||
}
|
||||
#endif /* NONAMELESSUNION */
|
||||
return Entry;
|
||||
}
|
||||
|
||||
@@ -14007,6 +14083,20 @@ ExFreeToNPagedLookasideList(
|
||||
IN PVOID Entry)
|
||||
{
|
||||
Lookaside->L.TotalFrees++;
|
||||
#ifdef NONAMELESSUNION
|
||||
if (ExQueryDepthSList(&Lookaside->L.u.ListHead) >= Lookaside->L.Depth) {
|
||||
Lookaside->L.u3.FreeMisses++;
|
||||
(Lookaside->L.u5.Free)(Entry);
|
||||
} else {
|
||||
#if defined(_WIN2K_COMPAT_SLIST_USAGE) && defined(_X86_)
|
||||
ExInterlockedPushEntrySList(&Lookaside->L.u.ListHead,
|
||||
(PSLIST_ENTRY)Entry,
|
||||
&Lookaside->Lock__ObsoleteButDoNotDelete);
|
||||
#else
|
||||
InterlockedPushEntrySList(&Lookaside->L.u.ListHead, (PSLIST_ENTRY)Entry);
|
||||
#endif
|
||||
}
|
||||
#else /* NONAMELESSUNION */
|
||||
if (ExQueryDepthSList(&Lookaside->L.ListHead) >= Lookaside->L.Depth) {
|
||||
Lookaside->L.FreeMisses++;
|
||||
(Lookaside->L.Free)(Entry);
|
||||
@@ -14019,6 +14109,7 @@ ExFreeToNPagedLookasideList(
|
||||
InterlockedPushEntrySList(&Lookaside->L.ListHead, (PSLIST_ENTRY)Entry);
|
||||
#endif
|
||||
}
|
||||
#endif /* NONAMELESSUNION */
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
@@ -14225,7 +14316,7 @@ WmiTraceMessage(
|
||||
#endif
|
||||
#endif /* RUN_WPP */
|
||||
|
||||
#if (NTDDI_VERSION >= NTDDI_WINXP)
|
||||
#if (NTDDI_VERSION >= NTDDI_WINXP)
|
||||
|
||||
NTKERNELAPI
|
||||
NTSTATUS
|
||||
|
||||
@@ -26,4 +26,4 @@
|
||||
|
||||
#define __inout
|
||||
|
||||
#define __deref_out_ecount(Size)
|
||||
#define __deref_out_ecount(Size)
|
||||
|
||||
@@ -20,8 +20,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __NTDD8042_H
|
||||
#define __NTDD8042_H
|
||||
#ifndef _NTDD8042_
|
||||
#define _NTDD8042_
|
||||
|
||||
#include "ntddkbd.h"
|
||||
#include "ntddmou.h"
|
||||
@@ -205,4 +205,4 @@ typedef struct _INTERNAL_I8042_HOOK_MOUSE {
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __NTDD8042_H */
|
||||
#endif /* _NTDD8042_ */
|
||||
|
||||
@@ -20,8 +20,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __NTDDCDRM_H
|
||||
#define __NTDDCDRM_H
|
||||
#ifndef _NTDDCDRM_
|
||||
#define _NTDDCDRM_
|
||||
|
||||
#include "ntddstor.h"
|
||||
|
||||
@@ -342,4 +342,4 @@ typedef struct __RAW_READ_INFO {
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __NTDDCDRM_H */
|
||||
#endif /* _NTDDCDRM_ */
|
||||
|
||||
@@ -20,8 +20,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __NTDDCDVD_H
|
||||
#define __NTDDCDVD_H
|
||||
#ifndef _NTDDCDVD_
|
||||
#define _NTDDCDVD_
|
||||
|
||||
#include "ntddstor.h"
|
||||
|
||||
@@ -205,4 +205,4 @@ typedef struct _DVD_REGION {
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __NTDDCDVD_H */
|
||||
#endif /* _NTDDCDVD_ */
|
||||
|
||||
@@ -20,8 +20,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __NTDDDISK_H
|
||||
#define __NTDDDISK_H
|
||||
#ifndef _NTDDDISK_H_
|
||||
#define _NTDDDISK_H_
|
||||
|
||||
/* Helper macro to enable gcc's extension. */
|
||||
#ifndef __GNU_EXTENSION
|
||||
@@ -606,4 +606,4 @@ typedef struct _MAPPED_ADDRESS {
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __NTDDDISK_H */
|
||||
#endif /* _NTDDDISK_H_ */
|
||||
|
||||
@@ -20,8 +20,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __NTDDNDIS_H
|
||||
#define __NTDDNDIS_H
|
||||
#ifndef _NTDDNDIS_
|
||||
#define _NTDDNDIS_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -326,7 +326,7 @@ typedef enum _NDIS_MEDIA_STATE {
|
||||
NdisMediaStateDisconnected
|
||||
} NDIS_MEDIA_STATE, *PNDIS_MEDIA_STATE;
|
||||
|
||||
#ifndef __NDIS_H
|
||||
#ifndef _NDIS_
|
||||
typedef int NDIS_STATUS, *PNDIS_STATUS;
|
||||
#endif
|
||||
|
||||
@@ -379,4 +379,4 @@ typedef struct _NDIS_CO_LINK_SPEED {
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __NTDDNDIS_H */
|
||||
#endif /* _NTDDNDIS_ */
|
||||
|
||||
@@ -20,8 +20,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __NTDDPAR_H
|
||||
#define __NTDDPAR_H
|
||||
#ifndef _NTDDPAR_
|
||||
#define _NTDDPAR_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -110,4 +110,4 @@ typedef struct _PARCLASS_NEGOTIATION_MASK {
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __NTDDPAR_H */
|
||||
#endif /* _NTDDPAR_ */
|
||||
|
||||
@@ -20,8 +20,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __NTDDSER_H
|
||||
#define __NTDDSER_H
|
||||
#ifndef _NTDDSER_
|
||||
#define _NTDDSER_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -444,4 +444,4 @@ typedef struct _SERIALCONFIG {
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __NTDDSER_H */
|
||||
#endif /* _NTDDSER_ */
|
||||
|
||||
@@ -20,8 +20,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __NTDDTAPE_H
|
||||
#define __NTDDTAPE_H
|
||||
#ifndef _NTDDTAPE_
|
||||
#define _NTDDTAPE_
|
||||
|
||||
#include "ntddstor.h"
|
||||
|
||||
@@ -71,4 +71,4 @@ typedef enum _TAPE_DRIVE_PROBLEM_TYPE {
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __NTDDTAPE_H */
|
||||
#endif /* _NTDDTAPE_ */
|
||||
|
||||
@@ -20,8 +20,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __NTDDVDEO_H
|
||||
#define __NTDDVDEO_H
|
||||
#ifndef _NTDDVDEO_
|
||||
#define _NTDDVDEO_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -473,4 +473,4 @@ typedef struct _ENG_EVENT
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __NTDDVDEO_H */
|
||||
#endif /* _NTDDVDEO_ */
|
||||
|
||||
@@ -20,8 +20,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __NTDDVOL_H
|
||||
#define __NTDDVOL_H
|
||||
#ifndef _NTDDVOL_
|
||||
#define _NTDDVOL_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -132,4 +132,4 @@ typedef struct _VOLUME_FAILOVER_SET {
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __NTDDVOL_H */
|
||||
#endif /* _NTDDVOL_ */
|
||||
|
||||
@@ -84,7 +84,7 @@ DECLARE_HANDLE(DHSURF);
|
||||
DECLARE_HANDLE(DHPDEV);
|
||||
DECLARE_HANDLE(HDRVOBJ);
|
||||
|
||||
#ifndef __NTDDVDEO_H
|
||||
#ifndef _NTDDVDEO_
|
||||
typedef struct _ENG_EVENT *PEVENT;
|
||||
#endif
|
||||
|
||||
|
||||
@@ -114,7 +114,11 @@ ExpInterlockedPushEntrySList(
|
||||
|
||||
#else /* !defined(_WIN64) */
|
||||
|
||||
#ifdef NONAMELESSUNION
|
||||
#define ExQueryDepthSList(listhead) (listhead)->s.Depth
|
||||
#else
|
||||
#define ExQueryDepthSList(listhead) (listhead)->Depth
|
||||
#endif
|
||||
|
||||
NTKERNELAPI
|
||||
PSINGLE_LIST_ENTRY
|
||||
@@ -171,6 +175,15 @@ ExAllocateFromPagedLookasideList(
|
||||
PVOID Entry;
|
||||
|
||||
Lookaside->L.TotalAllocates++;
|
||||
#ifdef NONAMELESSUNION
|
||||
Entry = InterlockedPopEntrySList(&Lookaside->L.u.ListHead);
|
||||
if (Entry == NULL) {
|
||||
Lookaside->L.u2.AllocateMisses++;
|
||||
Entry = (Lookaside->L.u4.Allocate)(Lookaside->L.Type,
|
||||
Lookaside->L.Size,
|
||||
Lookaside->L.Tag);
|
||||
}
|
||||
#else /* NONAMELESSUNION */
|
||||
Entry = InterlockedPopEntrySList(&Lookaside->L.ListHead);
|
||||
if (Entry == NULL) {
|
||||
Lookaside->L.AllocateMisses++;
|
||||
@@ -178,6 +191,7 @@ ExAllocateFromPagedLookasideList(
|
||||
Lookaside->L.Size,
|
||||
Lookaside->L.Tag);
|
||||
}
|
||||
#endif /* NONAMELESSUNION */
|
||||
return Entry;
|
||||
}
|
||||
|
||||
@@ -188,12 +202,21 @@ ExFreeToPagedLookasideList(
|
||||
IN PVOID Entry)
|
||||
{
|
||||
Lookaside->L.TotalFrees++;
|
||||
#ifdef NONAMELESSUNION
|
||||
if (ExQueryDepthSList(&Lookaside->L.u.ListHead) >= Lookaside->L.Depth) {
|
||||
Lookaside->L.u3.FreeMisses++;
|
||||
(Lookaside->L.u5.Free)(Entry);
|
||||
} else {
|
||||
InterlockedPushEntrySList(&Lookaside->L.u.ListHead, (PSLIST_ENTRY)Entry);
|
||||
}
|
||||
#else /* NONAMELESSUNION */
|
||||
if (ExQueryDepthSList(&Lookaside->L.ListHead) >= Lookaside->L.Depth) {
|
||||
Lookaside->L.FreeMisses++;
|
||||
(Lookaside->L.Free)(Entry);
|
||||
} else {
|
||||
InterlockedPushEntrySList(&Lookaside->L.ListHead, (PSLIST_ENTRY)Entry);
|
||||
}
|
||||
#endif /* NONAMELESSUNION */
|
||||
}
|
||||
|
||||
#endif /* _WIN2K_COMPAT_SLIST_USAGE */
|
||||
@@ -1002,6 +1025,16 @@ ExAllocateFromLookasideListEx(
|
||||
PVOID Entry;
|
||||
|
||||
Lookaside->L.TotalAllocates += 1;
|
||||
#ifdef NONAMELESSUNION
|
||||
Entry = InterlockedPopEntrySList(&Lookaside->L.u.ListHead);
|
||||
if (Entry == NULL) {
|
||||
Lookaside->L.u2.AllocateMisses += 1;
|
||||
Entry = (Lookaside->L.u4.AllocateEx)(Lookaside->L.Type,
|
||||
Lookaside->L.Size,
|
||||
Lookaside->L.Tag,
|
||||
Lookaside);
|
||||
}
|
||||
#else /* NONAMELESSUNION */
|
||||
Entry = InterlockedPopEntrySList(&Lookaside->L.ListHead);
|
||||
if (Entry == NULL) {
|
||||
Lookaside->L.AllocateMisses += 1;
|
||||
@@ -1010,6 +1043,7 @@ ExAllocateFromLookasideListEx(
|
||||
Lookaside->L.Tag,
|
||||
Lookaside);
|
||||
}
|
||||
#endif /* NONAMELESSUNION */
|
||||
return Entry;
|
||||
}
|
||||
|
||||
@@ -1052,6 +1086,20 @@ ExAllocateFromNPagedLookasideList(
|
||||
PVOID Entry;
|
||||
|
||||
Lookaside->L.TotalAllocates++;
|
||||
#ifdef NONAMELESSUNION
|
||||
#if defined(_WIN2K_COMPAT_SLIST_USAGE) && defined(_X86_)
|
||||
Entry = ExInterlockedPopEntrySList(&Lookaside->L.u.ListHead,
|
||||
&Lookaside->Lock__ObsoleteButDoNotDelete);
|
||||
#else
|
||||
Entry = InterlockedPopEntrySList(&Lookaside->L.u.ListHead);
|
||||
#endif
|
||||
if (Entry == NULL) {
|
||||
Lookaside->L.u2.AllocateMisses++;
|
||||
Entry = (Lookaside->L.u4.Allocate)(Lookaside->L.Type,
|
||||
Lookaside->L.Size,
|
||||
Lookaside->L.Tag);
|
||||
}
|
||||
#else /* NONAMELESSUNION */
|
||||
#if defined(_WIN2K_COMPAT_SLIST_USAGE) && defined(_X86_)
|
||||
Entry = ExInterlockedPopEntrySList(&Lookaside->L.ListHead,
|
||||
&Lookaside->Lock__ObsoleteButDoNotDelete);
|
||||
@@ -1064,6 +1112,7 @@ ExAllocateFromNPagedLookasideList(
|
||||
Lookaside->L.Size,
|
||||
Lookaside->L.Tag);
|
||||
}
|
||||
#endif /* NONAMELESSUNION */
|
||||
return Entry;
|
||||
}
|
||||
|
||||
@@ -1073,6 +1122,20 @@ ExFreeToNPagedLookasideList(
|
||||
IN PVOID Entry)
|
||||
{
|
||||
Lookaside->L.TotalFrees++;
|
||||
#ifdef NONAMELESSUNION
|
||||
if (ExQueryDepthSList(&Lookaside->L.u.ListHead) >= Lookaside->L.Depth) {
|
||||
Lookaside->L.u3.FreeMisses++;
|
||||
(Lookaside->L.u5.Free)(Entry);
|
||||
} else {
|
||||
#if defined(_WIN2K_COMPAT_SLIST_USAGE) && defined(_X86_)
|
||||
ExInterlockedPushEntrySList(&Lookaside->L.u.ListHead,
|
||||
(PSLIST_ENTRY)Entry,
|
||||
&Lookaside->Lock__ObsoleteButDoNotDelete);
|
||||
#else
|
||||
InterlockedPushEntrySList(&Lookaside->L.u.ListHead, (PSLIST_ENTRY)Entry);
|
||||
#endif
|
||||
}
|
||||
#else /* NONAMELESSUNION */
|
||||
if (ExQueryDepthSList(&Lookaside->L.ListHead) >= Lookaside->L.Depth) {
|
||||
Lookaside->L.FreeMisses++;
|
||||
(Lookaside->L.Free)(Entry);
|
||||
@@ -1085,6 +1148,7 @@ ExFreeToNPagedLookasideList(
|
||||
InterlockedPushEntrySList(&Lookaside->L.ListHead, (PSLIST_ENTRY)Entry);
|
||||
#endif
|
||||
}
|
||||
#endif /* NONAMELESSUNION */
|
||||
}
|
||||
|
||||
$endif (_WDMDDK_)
|
||||
$endif (_WDMDDK_)
|
||||
|
||||
@@ -2435,7 +2435,11 @@ IoSkipCurrentIrpStackLocation(
|
||||
{
|
||||
ASSERT(Irp->CurrentLocation <= Irp->StackCount);
|
||||
Irp->CurrentLocation++;
|
||||
#ifdef NONAMELESSUNION
|
||||
Irp->Tail.Overlay.s.u.CurrentStackLocation++;
|
||||
#else
|
||||
Irp->Tail.Overlay.CurrentStackLocation++;
|
||||
#endif
|
||||
}
|
||||
|
||||
FORCEINLINE
|
||||
@@ -2445,7 +2449,11 @@ IoSetNextIrpStackLocation(
|
||||
{
|
||||
ASSERT(Irp->CurrentLocation > 0);
|
||||
Irp->CurrentLocation--;
|
||||
#ifdef NONAMELESSUNION
|
||||
Irp->Tail.Overlay.s.u.CurrentStackLocation--;
|
||||
#else
|
||||
Irp->Tail.Overlay.CurrentStackLocation--;
|
||||
#endif
|
||||
}
|
||||
|
||||
FORCEINLINE
|
||||
@@ -2454,7 +2462,11 @@ IoGetNextIrpStackLocation(
|
||||
IN PIRP Irp)
|
||||
{
|
||||
ASSERT(Irp->CurrentLocation > 0);
|
||||
#ifdef NONAMELESSUNION
|
||||
return ((Irp)->Tail.Overlay.s.u.CurrentStackLocation - 1 );
|
||||
#else
|
||||
return ((Irp)->Tail.Overlay.CurrentStackLocation - 1 );
|
||||
#endif
|
||||
}
|
||||
|
||||
FORCEINLINE
|
||||
@@ -2545,7 +2557,11 @@ IoGetCurrentIrpStackLocation(
|
||||
IN PIRP Irp)
|
||||
{
|
||||
ASSERT(Irp->CurrentLocation <= Irp->StackCount + 1);
|
||||
#ifdef NONAMELESSUNION
|
||||
return Irp->Tail.Overlay.s.u.CurrentStackLocation;
|
||||
#else
|
||||
return Irp->Tail.Overlay.CurrentStackLocation;
|
||||
#endif
|
||||
}
|
||||
|
||||
FORCEINLINE
|
||||
|
||||
@@ -2029,30 +2029,35 @@ typedef struct _SCATTER_GATHER_ELEMENT {
|
||||
ULONG_PTR Reserved;
|
||||
} SCATTER_GATHER_ELEMENT, *PSCATTER_GATHER_ELEMENT;
|
||||
|
||||
#if defined(_MSC_EXTENSIONS)
|
||||
#if defined(_MSC_EXTENSIONS) || defined(__GNUC__)
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#if _MSC_VER >= 1200
|
||||
#pragma warning(push)
|
||||
#endif
|
||||
#pragma warning(disable:4200)
|
||||
#endif /* _MSC_VER */
|
||||
|
||||
typedef struct _SCATTER_GATHER_LIST {
|
||||
ULONG NumberOfElements;
|
||||
ULONG_PTR Reserved;
|
||||
SCATTER_GATHER_ELEMENT Elements[1];
|
||||
} SCATTER_GATHER_LIST, *PSCATTER_GATHER_LIST;
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#if _MSC_VER >= 1200
|
||||
#pragma warning(pop)
|
||||
#else
|
||||
#pragma warning(default:4200)
|
||||
#endif
|
||||
#endif /* _MSC_VER */
|
||||
|
||||
#else
|
||||
#else /* defined(_MSC_EXTENSIONS) || defined(__GNUC__) */
|
||||
|
||||
struct _SCATTER_GATHER_LIST;
|
||||
typedef struct _SCATTER_GATHER_LIST SCATTER_GATHER_LIST, *PSCATTER_GATHER_LIST;
|
||||
|
||||
#endif
|
||||
#endif /* defined(_MSC_EXTENSIONS) || defined(__GNUC__) */
|
||||
|
||||
typedef NTSTATUS
|
||||
(NTAPI DRIVER_ADD_DEVICE)(
|
||||
|
||||
@@ -678,7 +678,7 @@ typedef struct _KDEVICE_QUEUE {
|
||||
CSHORT Size;
|
||||
LIST_ENTRY DeviceListHead;
|
||||
KSPIN_LOCK Lock;
|
||||
#if defined(_AMD64_)
|
||||
# if defined(_AMD64_)
|
||||
_ANONYMOUS_UNION union {
|
||||
BOOLEAN Busy;
|
||||
_ANONYMOUS_STRUCT struct {
|
||||
@@ -686,9 +686,9 @@ typedef struct _KDEVICE_QUEUE {
|
||||
LONG64 Hint:56;
|
||||
} DUMMYSTRUCTNAME;
|
||||
} DUMMYUNIONNAME;
|
||||
#else
|
||||
# else
|
||||
BOOLEAN Busy;
|
||||
#endif
|
||||
# endif
|
||||
} KDEVICE_QUEUE, *PKDEVICE_QUEUE, *RESTRICTED_POINTER PRKDEVICE_QUEUE;
|
||||
|
||||
#define TIMER_EXPIRED_INDEX_BITS 6
|
||||
@@ -810,9 +810,9 @@ typedef struct _KTIMER {
|
||||
ULARGE_INTEGER DueTime;
|
||||
LIST_ENTRY TimerListEntry;
|
||||
struct _KDPC *Dpc;
|
||||
#if !defined(_X86_)
|
||||
# if !defined(_X86_)
|
||||
ULONG Processor;
|
||||
#endif
|
||||
# endif
|
||||
ULONG Period;
|
||||
} KTIMER, *PKTIMER, *RESTRICTED_POINTER PRKTIMER;
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ WmiTraceMessage(
|
||||
#endif
|
||||
#endif /* RUN_WPP */
|
||||
|
||||
#if (NTDDI_VERSION >= NTDDI_WINXP)
|
||||
#if (NTDDI_VERSION >= NTDDI_WINXP)
|
||||
|
||||
NTKERNELAPI
|
||||
NTSTATUS
|
||||
|
||||
@@ -151,9 +151,15 @@ _KeQueryTickCount(
|
||||
OUT PLARGE_INTEGER CurrentCount)
|
||||
{
|
||||
for (;;) {
|
||||
#ifdef NONAMELESSUNION
|
||||
CurrentCount->s.HighPart = KeTickCount.High1Time;
|
||||
CurrentCount->s.LowPart = KeTickCount.LowPart;
|
||||
if (CurrentCount->s.HighPart == KeTickCount.High2Time) break;
|
||||
#else
|
||||
CurrentCount->HighPart = KeTickCount.High1Time;
|
||||
CurrentCount->LowPart = KeTickCount.LowPart;
|
||||
if (CurrentCount->HighPart == KeTickCount.High2Time) break;
|
||||
#endif
|
||||
YieldProcessor();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user