Commit 4d643114 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

Staging: hv: remove UINT32 and INT32 typedefs

The UINT32 and INT32 typedefs are now removed from the Hyper-V driver
code.

Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 5cd508bc
......@@ -33,9 +33,9 @@
static int
VmbusChannelCreateGpadlHeader(
void * Kbuffer, // must be phys and virt contiguous
UINT32 Size, // page-size multiple
u32 Size, // page-size multiple
VMBUS_CHANNEL_MSGINFO **msgInfo,
UINT32 *MessageCount
u32 *MessageCount
);
static void
......@@ -77,7 +77,7 @@ DumpMonitorPage(
{
for (j=0; j<32; j++)
{
DPRINT_DBG(VMBUS, "param-conn id (%d)(%d) - %d", i, j, MonitorPage->Parameter[i][j].ConnectionId.AsUINT32);
DPRINT_DBG(VMBUS, "param-conn id (%d)(%d) - %d", i, j, MonitorPage->Parameter[i][j].ConnectionId.Asu32);
DPRINT_DBG(VMBUS, "param-flag (%d)(%d) - %d", i, j, MonitorPage->Parameter[i][j].FlagNumber);
}
......@@ -105,13 +105,13 @@ VmbusChannelSetEvent(
if (Channel->OfferMsg.MonitorAllocated)
{
// Each UINT32 represents 32 channels
BitSet((UINT32*)gVmbusConnection.SendInterruptPage + (Channel->OfferMsg.ChildRelId >> 5), Channel->OfferMsg.ChildRelId & 31);
// Each u32 represents 32 channels
BitSet((u32*)gVmbusConnection.SendInterruptPage + (Channel->OfferMsg.ChildRelId >> 5), Channel->OfferMsg.ChildRelId & 31);
monitorPage = (HV_MONITOR_PAGE*)gVmbusConnection.MonitorPages;
monitorPage++; // Get the child to parent monitor page
BitSet((UINT32*) &monitorPage->TriggerGroup[Channel->MonitorGroup].Pending, Channel->MonitorBit);
BitSet((u32*) &monitorPage->TriggerGroup[Channel->MonitorGroup].Pending, Channel->MonitorBit);
}
else
{
......@@ -133,13 +133,13 @@ VmbusChannelClearEvent(
if (Channel->OfferMsg.MonitorAllocated)
{
// Each UINT32 represents 32 channels
BitClear((UINT32*)gVmbusConnection.SendInterruptPage + (Channel->OfferMsg.ChildRelId >> 5), Channel->OfferMsg.ChildRelId & 31);
// Each u32 represents 32 channels
BitClear((u32*)gVmbusConnection.SendInterruptPage + (Channel->OfferMsg.ChildRelId >> 5), Channel->OfferMsg.ChildRelId & 31);
monitorPage = (HV_MONITOR_PAGE*)gVmbusConnection.MonitorPages;
monitorPage++; // Get the child to parent monitor page
BitClear((UINT32*) &monitorPage->TriggerGroup[Channel->MonitorGroup].Pending, Channel->MonitorBit);
BitClear((u32*) &monitorPage->TriggerGroup[Channel->MonitorGroup].Pending, Channel->MonitorBit);
}
DPRINT_EXIT(VMBUS);
......@@ -164,7 +164,7 @@ VmbusChannelGetDebugInfo(
HV_MONITOR_PAGE *monitorPage;
u8 monitorGroup = (u8)Channel->OfferMsg.MonitorId / 32;
u8 monitorOffset = (u8)Channel->OfferMsg.MonitorId % 32;
//UINT32 monitorBit = 1 << monitorOffset;
//u32 monitorBit = 1 << monitorOffset;
DebugInfo->RelId = Channel->OfferMsg.ChildRelId;
DebugInfo->State = Channel->State;
......@@ -202,10 +202,10 @@ Description:
int
VmbusChannelOpen(
VMBUS_CHANNEL *NewChannel,
UINT32 SendRingBufferSize,
UINT32 RecvRingBufferSize,
u32 SendRingBufferSize,
u32 RecvRingBufferSize,
void * UserData,
UINT32 UserDataLen,
u32 UserDataLen,
PFN_CHANNEL_CALLBACK pfnOnChannelCallback,
void * Context
)
......@@ -330,7 +330,7 @@ Description:
--*/
static void DumpGpadlBody(
VMBUS_CHANNEL_GPADL_BODY *Gpadl,
UINT32 Len)
u32 Len)
{
int i=0;
int pfnCount=0;
......@@ -393,9 +393,9 @@ Description:
static int
VmbusChannelCreateGpadlHeader(
void * Kbuffer, // from kmalloc()
UINT32 Size, // page-size multiple
u32 Size, // page-size multiple
VMBUS_CHANNEL_MSGINFO **MsgInfo,
UINT32 *MessageCount)
u32 *MessageCount)
{
int i;
int pageCount;
......@@ -404,7 +404,7 @@ VmbusChannelCreateGpadlHeader(
VMBUS_CHANNEL_GPADL_BODY* gpadlBody;
VMBUS_CHANNEL_MSGINFO* msgHeader;
VMBUS_CHANNEL_MSGINFO* msgBody;
UINT32 msgSize;
u32 msgSize;
int pfnSum, pfnCount, pfnLeft, pfnCurr, pfnSize;
......@@ -465,7 +465,7 @@ VmbusChannelCreateGpadlHeader(
(*MessageCount)++;
gpadlBody = (VMBUS_CHANNEL_GPADL_BODY*)msgBody->Msg;
// FIXME: Gpadl is UINT32 and we are using a pointer which could be 64-bit
// FIXME: Gpadl is u32 and we are using a pointer which could be 64-bit
//gpadlBody->Gpadl = kbuffer;
for (i=0; i<pfnCurr; i++)
{
......@@ -516,8 +516,8 @@ int
VmbusChannelEstablishGpadl(
VMBUS_CHANNEL *Channel,
void * Kbuffer, // from kmalloc()
UINT32 Size, // page-size multiple
UINT32 *GpadlHandle
u32 Size, // page-size multiple
u32 *GpadlHandle
)
{
int ret=0;
......@@ -528,10 +528,10 @@ VmbusChannelEstablishGpadl(
VMBUS_CHANNEL_MSGINFO *msgInfo;
VMBUS_CHANNEL_MSGINFO *subMsgInfo;
UINT32 msgCount;
u32 msgCount;
LIST_ENTRY* anchor;
LIST_ENTRY* curr;
UINT32 nextGpadlHandle;
u32 nextGpadlHandle;
DPRINT_ENTER(VMBUS);
......@@ -619,7 +619,7 @@ Description:
int
VmbusChannelTeardownGpadl(
VMBUS_CHANNEL *Channel,
UINT32 GpadlHandle
u32 GpadlHandle
)
{
int ret=0;
......@@ -753,16 +753,16 @@ int
VmbusChannelSendPacket(
VMBUS_CHANNEL *Channel,
const void * Buffer,
UINT32 BufferLen,
u32 BufferLen,
UINT64 RequestId,
VMBUS_PACKET_TYPE Type,
UINT32 Flags
u32 Flags
)
{
int ret=0;
VMPACKET_DESCRIPTOR desc;
UINT32 packetLen = sizeof(VMPACKET_DESCRIPTOR) + BufferLen;
UINT32 packetLenAligned = ALIGN_UP(packetLen, sizeof(UINT64));
u32 packetLen = sizeof(VMPACKET_DESCRIPTOR) + BufferLen;
u32 packetLenAligned = ALIGN_UP(packetLen, sizeof(UINT64));
SG_BUFFER_LIST bufferList[3];
UINT64 alignedData=0;
......@@ -819,18 +819,18 @@ int
VmbusChannelSendPacketPageBuffer(
VMBUS_CHANNEL *Channel,
PAGE_BUFFER PageBuffers[],
UINT32 PageCount,
u32 PageCount,
void * Buffer,
UINT32 BufferLen,
u32 BufferLen,
UINT64 RequestId
)
{
int ret=0;
int i=0;
VMBUS_CHANNEL_PACKET_PAGE_BUFFER desc;
UINT32 descSize;
UINT32 packetLen;
UINT32 packetLenAligned;
u32 descSize;
u32 packetLen;
u32 packetLenAligned;
SG_BUFFER_LIST bufferList[3];
UINT64 alignedData=0;
......@@ -903,18 +903,18 @@ VmbusChannelSendPacketMultiPageBuffer(
VMBUS_CHANNEL *Channel,
MULTIPAGE_BUFFER *MultiPageBuffer,
void * Buffer,
UINT32 BufferLen,
u32 BufferLen,
UINT64 RequestId
)
{
int ret=0;
VMBUS_CHANNEL_PACKET_MULITPAGE_BUFFER desc;
UINT32 descSize;
UINT32 packetLen;
UINT32 packetLenAligned;
u32 descSize;
u32 packetLen;
u32 packetLenAligned;
SG_BUFFER_LIST bufferList[3];
UINT64 alignedData=0;
UINT32 PfnCount = NUM_PAGES_SPANNED(MultiPageBuffer->Offset, MultiPageBuffer->Length);
u32 PfnCount = NUM_PAGES_SPANNED(MultiPageBuffer->Offset, MultiPageBuffer->Length);
DPRINT_ENTER(VMBUS);
......@@ -985,14 +985,14 @@ int
VmbusChannelRecvPacket(
VMBUS_CHANNEL *Channel,
void * Buffer,
UINT32 BufferLen,
UINT32* BufferActualLen,
u32 BufferLen,
u32* BufferActualLen,
UINT64* RequestId
)
{
VMPACKET_DESCRIPTOR desc;
UINT32 packetLen;
UINT32 userLen;
u32 packetLen;
u32 userLen;
int ret;
DPRINT_ENTER(VMBUS);
......@@ -1062,14 +1062,14 @@ int
VmbusChannelRecvPacketRaw(
VMBUS_CHANNEL *Channel,
void * Buffer,
UINT32 BufferLen,
UINT32* BufferActualLen,
u32 BufferLen,
u32* BufferActualLen,
UINT64* RequestId
)
{
VMPACKET_DESCRIPTOR desc;
UINT32 packetLen;
UINT32 userLen;
u32 packetLen;
u32 userLen;
int ret;
DPRINT_ENTER(VMBUS);
......
......@@ -38,8 +38,8 @@ typedef struct _VMBUS_CHANNEL_PACKET_PAGE_BUFFER {
u16 Length8;
u16 Flags;
UINT64 TransactionId;
UINT32 Reserved;
UINT32 RangeCount;
u32 Reserved;
u32 RangeCount;
PAGE_BUFFER Range[MAX_PAGE_BUFFER_COUNT];
} VMBUS_CHANNEL_PACKET_PAGE_BUFFER;
......@@ -51,8 +51,8 @@ typedef struct _VMBUS_CHANNEL_PACKET_MULITPAGE_BUFFER {
u16 Length8;
u16 Flags;
UINT64 TransactionId;
UINT32 Reserved;
UINT32 RangeCount; // Always 1 in this case
u32 Reserved;
u32 RangeCount; // Always 1 in this case
MULTIPAGE_BUFFER Range;
} VMBUS_CHANNEL_PACKET_MULITPAGE_BUFFER;
......@@ -65,10 +65,10 @@ typedef struct _VMBUS_CHANNEL_PACKET_MULITPAGE_BUFFER {
static int
VmbusChannelOpen(
VMBUS_CHANNEL *Channel,
UINT32 SendRingBufferSize,
UINT32 RecvRingBufferSize,
u32 SendRingBufferSize,
u32 RecvRingBufferSize,
void * UserData,
UINT32 UserDataLen,
u32 UserDataLen,
PFN_CHANNEL_CALLBACK pfnOnChannelCallback,
void * Context
);
......@@ -82,19 +82,19 @@ static int
VmbusChannelSendPacket(
VMBUS_CHANNEL *Channel,
const void * Buffer,
UINT32 BufferLen,
u32 BufferLen,
UINT64 RequestId,
VMBUS_PACKET_TYPE Type,
UINT32 Flags
u32 Flags
);
static int
VmbusChannelSendPacketPageBuffer(
VMBUS_CHANNEL *Channel,
PAGE_BUFFER PageBuffers[],
UINT32 PageCount,
u32 PageCount,
void * Buffer,
UINT32 BufferLen,
u32 BufferLen,
UINT64 RequestId
);
......@@ -103,7 +103,7 @@ VmbusChannelSendPacketMultiPageBuffer(
VMBUS_CHANNEL *Channel,
MULTIPAGE_BUFFER *MultiPageBuffer,
void * Buffer,
UINT32 BufferLen,
u32 BufferLen,
UINT64 RequestId
);
......@@ -111,22 +111,22 @@ static int
VmbusChannelEstablishGpadl(
VMBUS_CHANNEL *Channel,
void * Kbuffer, // from kmalloc()
UINT32 Size, // page-size multiple
UINT32 *GpadlHandle
u32 Size, // page-size multiple
u32 *GpadlHandle
);
static int
VmbusChannelTeardownGpadl(
VMBUS_CHANNEL *Channel,
UINT32 GpadlHandle
u32 GpadlHandle
);
static int
VmbusChannelRecvPacket(
VMBUS_CHANNEL *Channel,
void * Buffer,
UINT32 BufferLen,
UINT32* BufferActualLen,
u32 BufferLen,
u32* BufferActualLen,
UINT64* RequestId
);
......@@ -134,8 +134,8 @@ static int
VmbusChannelRecvPacketRaw(
VMBUS_CHANNEL *Channel,
void * Buffer,
UINT32 BufferLen,
UINT32* BufferActualLen,
u32 BufferLen,
u32* BufferActualLen,
UINT64* RequestId
);
......
......@@ -26,10 +26,10 @@
static int
IVmbusChannelOpen(
PDEVICE_OBJECT Device,
UINT32 SendBufferSize,
UINT32 RecvRingBufferSize,
u32 SendBufferSize,
u32 RecvRingBufferSize,
void * UserData,
UINT32 UserDataLen,
u32 UserDataLen,
VMBUS_CHANNEL_CALLBACK ChannelCallback,
void * Context
)
......@@ -57,10 +57,10 @@ static int
IVmbusChannelSendPacket(
PDEVICE_OBJECT Device,
const void * Buffer,
UINT32 BufferLen,
u32 BufferLen,
UINT64 RequestId,
UINT32 Type,
UINT32 Flags
u32 Type,
u32 Flags
)
{
return VmbusChannelSendPacket((VMBUS_CHANNEL*)Device->context,
......@@ -75,9 +75,9 @@ static int
IVmbusChannelSendPacketPageBuffer(
PDEVICE_OBJECT Device,
PAGE_BUFFER PageBuffers[],
UINT32 PageCount,
u32 PageCount,
void * Buffer,
UINT32 BufferLen,
u32 BufferLen,
UINT64 RequestId
)
{
......@@ -94,7 +94,7 @@ IVmbusChannelSendPacketMultiPageBuffer(
PDEVICE_OBJECT Device,
MULTIPAGE_BUFFER *MultiPageBuffer,
void * Buffer,
UINT32 BufferLen,
u32 BufferLen,
UINT64 RequestId
)
{
......@@ -109,8 +109,8 @@ static int
IVmbusChannelRecvPacket (
PDEVICE_OBJECT Device,
void * Buffer,
UINT32 BufferLen,
UINT32* BufferActualLen,
u32 BufferLen,
u32* BufferActualLen,
UINT64* RequestId
)
{
......@@ -125,8 +125,8 @@ static int
IVmbusChannelRecvPacketRaw(
PDEVICE_OBJECT Device,
void * Buffer,
UINT32 BufferLen,
UINT32* BufferActualLen,
u32 BufferLen,
u32* BufferActualLen,
UINT64* RequestId
)
{
......@@ -141,8 +141,8 @@ static int
IVmbusChannelEstablishGpadl(
PDEVICE_OBJECT Device,
void * Buffer,
UINT32 BufferLen,
UINT32* GpadlHandle
u32 BufferLen,
u32* GpadlHandle
)
{
return VmbusChannelEstablishGpadl((VMBUS_CHANNEL*)Device->context,
......@@ -154,7 +154,7 @@ IVmbusChannelEstablishGpadl(
static int
IVmbusChannelTeardownGpadl(
PDEVICE_OBJECT Device,
UINT32 GpadlHandle
u32 GpadlHandle
)
{
return VmbusChannelTeardownGpadl((VMBUS_CHANNEL*)Device->context,
......
......@@ -56,11 +56,11 @@ typedef struct _VMBUS_CHANNEL {
u8 MonitorGroup;
u8 MonitorBit;
UINT32 RingBufferGpadlHandle;
u32 RingBufferGpadlHandle;
// Allocated memory for ring buffer
void * RingBufferPages;
UINT32 RingBufferPageCount;
u32 RingBufferPageCount;
RING_BUFFER_INFO Outbound; // send to parent
RING_BUFFER_INFO Inbound; // receive from parent
HANDLE InboundLock;
......@@ -76,17 +76,17 @@ typedef struct _VMBUS_CHANNEL {
typedef struct _VMBUS_CHANNEL_DEBUG_INFO {
UINT32 RelId;
u32 RelId;
VMBUS_CHANNEL_STATE State;
GUID InterfaceType;
GUID InterfaceInstance;
UINT32 MonitorId;
UINT32 ServerMonitorPending;
UINT32 ServerMonitorLatency;
UINT32 ServerMonitorConnectionId;
UINT32 ClientMonitorPending;
UINT32 ClientMonitorLatency;
UINT32 ClientMonitorConnectionId;
u32 MonitorId;
u32 ServerMonitorPending;
u32 ServerMonitorLatency;
u32 ServerMonitorConnectionId;
u32 ClientMonitorPending;
u32 ClientMonitorLatency;
u32 ClientMonitorConnectionId;
RING_BUFFER_DEBUG_INFO Inbound;
RING_BUFFER_DEBUG_INFO Outbound;
......@@ -117,7 +117,7 @@ typedef struct _VMBUS_CHANNEL_MSGINFO {
VMBUS_CHANNEL_MESSAGE_RESPONSE Response;
UINT32 MessageSize;
u32 MessageSize;
// The channel message that goes out on the "wire".
// It will contain at minimum the VMBUS_CHANNEL_MESSAGE_HEADER header
unsigned char Msg[0];
......
......@@ -253,7 +253,7 @@ Description:
--*/
VMBUS_CHANNEL*
GetChannelFromRelId(
UINT32 relId
u32 relId
)
{
VMBUS_CHANNEL* channel;
......@@ -294,7 +294,7 @@ VmbusProcessChannelEvent(
)
{
VMBUS_CHANNEL* channel;
UINT32 relId = (UINT32)(ULONG_PTR)context;
u32 relId = (u32)(ULONG_PTR)context;
ASSERT(relId > 0);
......@@ -333,7 +333,7 @@ VmbusOnEvents(
int maxdword = MAX_NUM_CHANNELS_SUPPORTED >> 5;
int bit;
int relid;
UINT32* recvInterruptPage = gVmbusConnection.RecvInterruptPage;
u32* recvInterruptPage = gVmbusConnection.RecvInterruptPage;
//VMBUS_CHANNEL_MESSAGE* receiveMsg;
DPRINT_ENTER(VMBUS);
......@@ -393,7 +393,7 @@ VmbusPostMessage(
HV_CONNECTION_ID connId;
connId.AsUINT32 =0;
connId.Asu32 =0;
connId.u.Id = VMBUS_MESSAGE_CONNECTION_ID;
ret = HvPostMessage(
connId,
......@@ -414,14 +414,14 @@ Description:
--*/
int
VmbusSetEvent(UINT32 childRelId)
VmbusSetEvent(u32 childRelId)
{
int ret=0;
DPRINT_ENTER(VMBUS);
// Each UINT32 represents 32 channels
BitSet((UINT32*)gVmbusConnection.SendInterruptPage + (childRelId >> 5), childRelId & 31);
// Each u32 represents 32 channels
BitSet((u32*)gVmbusConnection.SendInterruptPage + (childRelId >> 5), childRelId & 31);
ret = HvSignalEvent();
DPRINT_EXIT(VMBUS);
......
......@@ -188,16 +188,16 @@ HvDoHypercall (
#else
UINT32 controlHi = Control >> 32;
UINT32 controlLo = Control & 0xFFFFFFFF;
UINT32 hvStatusHi = 1;
UINT32 hvStatusLo = 1;
u32 controlHi = Control >> 32;
u32 controlLo = Control & 0xFFFFFFFF;
u32 hvStatusHi = 1;
u32 hvStatusLo = 1;
UINT64 inputAddress = (Input) ? GetPhysicalAddress(Input) : 0;
UINT32 inputAddressHi = inputAddress >> 32;
UINT32 inputAddressLo = inputAddress & 0xFFFFFFFF;
u32 inputAddressHi = inputAddress >> 32;
u32 inputAddressLo = inputAddress & 0xFFFFFFFF;
UINT64 outputAddress = (Output) ?GetPhysicalAddress(Output) : 0;
UINT32 outputAddressHi = outputAddress >> 32;
UINT32 outputAddressLo = outputAddress & 0xFFFFFFFF;
u32 outputAddressHi = outputAddress >> 32;
u32 outputAddressLo = outputAddress & 0xFFFFFFFF;
volatile void* hypercallPage = gHvContext.HypercallPage;
DPRINT_DBG(VMBUS, "Hypercall <control %llx input %p output %p>",
......@@ -312,7 +312,7 @@ HvInit (
}
gHvContext.SignalEventParam = (PHV_INPUT_SIGNAL_EVENT)(ALIGN_UP((ULONG_PTR)gHvContext.SignalEventBuffer, HV_HYPERCALL_PARAM_ALIGN));
gHvContext.SignalEventParam->ConnectionId.AsUINT32 = 0;
gHvContext.SignalEventParam->ConnectionId.Asu32 = 0;
gHvContext.SignalEventParam->ConnectionId.u.Id = VMBUS_EVENT_CONNECTION_ID;
gHvContext.SignalEventParam->FlagNumber = 0;
gHvContext.SignalEventParam->RsvdZ = 0;
......@@ -471,7 +471,7 @@ Description:
--*/
int
HvSynicInit (
UINT32 irqVector
u32 irqVector
)
{
UINT64 version;
......
......@@ -173,7 +173,7 @@ HvSignalEvent(
static int
HvSynicInit(
UINT32 irqVector
u32 irqVector
);
static void
......
......@@ -1402,7 +1402,7 @@ NetVscOnChannelCallback(
DEVICE_OBJECT *device=(DEVICE_OBJECT*)Context;
NETVSC_DEVICE *netDevice;
UINT32 bytesRecvd;
u32 bytesRecvd;
UINT64 requestId;
UCHAR packet[netPacketSize];
VMPACKET_DESCRIPTOR *desc;
......
......@@ -66,15 +66,15 @@ typedef struct _NETVSC_DEVICE {
// Send buffer allocated by us but manages by NetVSP
void * SendBuffer;
UINT32 SendBufferSize;
UINT32 SendBufferGpadlHandle;
UINT32 SendSectionSize;
u32 SendBufferSize;
u32 SendBufferGpadlHandle;
u32 SendSectionSize;
// Receive buffer allocated by us but manages by NetVSP
void * ReceiveBuffer;
UINT32 ReceiveBufferSize;
UINT32 ReceiveBufferGpadlHandle;
UINT32 ReceiveSectionCount;
u32 ReceiveBufferSize;
u32 ReceiveBufferGpadlHandle;
u32 ReceiveSectionCount;
PNVSP_1_RECEIVE_BUFFER_SECTION ReceiveSections;
// Used for NetVSP initialization protocol
......
......@@ -44,9 +44,9 @@ Description:
--*/
static inline void
GetRingBufferAvailBytes(RING_BUFFER_INFO *rbi, UINT32 *read, UINT32 *write)
GetRingBufferAvailBytes(RING_BUFFER_INFO *rbi, u32 *read, u32 *write)
{
UINT32 read_loc,write_loc;
u32 read_loc,write_loc;
// Capture the read/write indices before they changed
read_loc = rbi->RingBuffer->ReadIndex;
......@@ -65,10 +65,10 @@ Description:
Get the next write location for the specified ring buffer
--*/
static inline UINT32
static inline u32
GetNextWriteLocation(RING_BUFFER_INFO* RingInfo)
{
UINT32 next = RingInfo->RingBuffer->WriteIndex;
u32 next = RingInfo->RingBuffer->WriteIndex;
ASSERT(next < RingInfo->RingDataSize);
......@@ -85,7 +85,7 @@ Description:
--*/
static inline void
SetNextWriteLocation(RING_BUFFER_INFO* RingInfo, UINT32 NextWriteLocation)
SetNextWriteLocation(RING_BUFFER_INFO* RingInfo, u32 NextWriteLocation)
{
RingInfo->RingBuffer->WriteIndex = NextWriteLocation;
}
......@@ -99,10 +99,10 @@ Description:
Get the next read location for the specified ring buffer
--*/
static inline UINT32
static inline u32
GetNextReadLocation(RING_BUFFER_INFO* RingInfo)
{
UINT32 next = RingInfo->RingBuffer->ReadIndex;
u32 next = RingInfo->RingBuffer->ReadIndex;
ASSERT(next < RingInfo->RingDataSize);
......@@ -119,10 +119,10 @@ Description:
This allows the caller to skip
--*/
static inline UINT32
GetNextReadLocationWithOffset(RING_BUFFER_INFO* RingInfo, UINT32 Offset)
static inline u32
GetNextReadLocationWithOffset(RING_BUFFER_INFO* RingInfo, u32 Offset)
{
UINT32 next = RingInfo->RingBuffer->ReadIndex;
u32 next = RingInfo->RingBuffer->ReadIndex;
ASSERT(next < RingInfo->RingDataSize);
next += Offset;
......@@ -141,7 +141,7 @@ Description:
--*/
static inline void
SetNextReadLocation(RING_BUFFER_INFO* RingInfo, UINT32 NextReadLocation)
SetNextReadLocation(RING_BUFFER_INFO* RingInfo, u32 NextReadLocation)
{
RingInfo->RingBuffer->ReadIndex = NextReadLocation;
}
......@@ -172,7 +172,7 @@ Description:
Get the size of the ring buffer
--*/
static inline UINT32
static inline u32
GetRingBufferSize(RING_BUFFER_INFO* RingInfo)
{
return RingInfo->RingDataSize;
......@@ -206,8 +206,8 @@ Description:
void
DumpRingInfo(RING_BUFFER_INFO* RingInfo, char *Prefix)
{
UINT32 bytesAvailToWrite;
UINT32 bytesAvailToRead;
u32 bytesAvailToWrite;
u32 bytesAvailToRead;
GetRingBufferAvailBytes(RingInfo, &bytesAvailToRead, &bytesAvailToWrite);
......@@ -224,19 +224,19 @@ DumpRingInfo(RING_BUFFER_INFO* RingInfo, char *Prefix)
//
// Internal routines
//
static UINT32
static u32
CopyToRingBuffer(
RING_BUFFER_INFO *RingInfo,
UINT32 StartWriteOffset,
u32 StartWriteOffset,
void * Src,
UINT32 SrcLen);
u32 SrcLen);
static UINT32
static u32
CopyFromRingBuffer(
RING_BUFFER_INFO *RingInfo,
void * Dest,
UINT32 DestLen,
UINT32 StartReadOffset);
u32 DestLen,
u32 StartReadOffset);
......@@ -255,8 +255,8 @@ RingBufferGetDebugInfo(
RING_BUFFER_DEBUG_INFO *DebugInfo
)
{
UINT32 bytesAvailToWrite;
UINT32 bytesAvailToRead;
u32 bytesAvailToWrite;
u32 bytesAvailToRead;
if (RingInfo->RingBuffer)
{
......@@ -281,7 +281,7 @@ Description:
Get the interrupt mask for the specified ring buffer
--*/
UINT32
u32
GetRingBufferInterruptMask(
RING_BUFFER_INFO *rbi
)
......@@ -302,7 +302,7 @@ int
RingBufferInit(
RING_BUFFER_INFO *RingInfo,
void *Buffer,
UINT32 BufferLen
u32 BufferLen
)
{
ASSERT(sizeof(RING_BUFFER) == PAGE_SIZE);
......@@ -350,15 +350,15 @@ int
RingBufferWrite(
RING_BUFFER_INFO* OutRingInfo,
SG_BUFFER_LIST SgBuffers[],
UINT32 SgBufferCount
u32 SgBufferCount
)
{
int i=0;
UINT32 byteAvailToWrite;
UINT32 byteAvailToRead;
UINT32 totalBytesToWrite=0;
u32 byteAvailToWrite;
u32 byteAvailToRead;
u32 totalBytesToWrite=0;
volatile UINT32 nextWriteLocation;
volatile u32 nextWriteLocation;
UINT64 prevIndices=0;
DPRINT_ENTER(VMBUS);
......@@ -439,12 +439,12 @@ int
RingBufferPeek(
RING_BUFFER_INFO* InRingInfo,
void* Buffer,
UINT32 BufferLen
u32 BufferLen
)
{
UINT32 bytesAvailToWrite;
UINT32 bytesAvailToRead;
UINT32 nextReadLocation=0;
u32 bytesAvailToWrite;
u32 bytesAvailToRead;
u32 nextReadLocation=0;
SpinlockAcquire(InRingInfo->RingLock);
......@@ -487,13 +487,13 @@ int
RingBufferRead(
RING_BUFFER_INFO* InRingInfo,
void * Buffer,
UINT32 BufferLen,
UINT32 Offset
u32 BufferLen,
u32 Offset
)
{
UINT32 bytesAvailToWrite;
UINT32 bytesAvailToRead;
UINT32 nextReadLocation=0;
u32 bytesAvailToWrite;
u32 bytesAvailToRead;
u32 nextReadLocation=0;
UINT64 prevIndices=0;
ASSERT(BufferLen > 0);
......@@ -553,16 +553,16 @@ Description:
Assume there is enough room. Handles wrap-around in dest case only!!
--*/
UINT32
u32
CopyToRingBuffer(
RING_BUFFER_INFO *RingInfo,
UINT32 StartWriteOffset,
u32 StartWriteOffset,
void * Src,
UINT32 SrcLen)
u32 SrcLen)
{
void * ringBuffer=GetRingBuffer(RingInfo);
UINT32 ringBufferSize=GetRingBufferSize(RingInfo);
UINT32 fragLen;
u32 ringBufferSize=GetRingBufferSize(RingInfo);
u32 fragLen;
if (SrcLen > ringBufferSize - StartWriteOffset) // wrap-around detected!
{
......@@ -594,17 +594,17 @@ Description:
Assume there is enough room. Handles wrap-around in src case only!!
--*/
UINT32
u32
CopyFromRingBuffer(
RING_BUFFER_INFO *RingInfo,
void * Dest,
UINT32 DestLen,
UINT32 StartReadOffset)
u32 DestLen,
u32 StartReadOffset)
{
void * ringBuffer=GetRingBuffer(RingInfo);
UINT32 ringBufferSize=GetRingBufferSize(RingInfo);
u32 ringBufferSize=GetRingBufferSize(RingInfo);
UINT32 fragLen;
u32 fragLen;
if (DestLen > ringBufferSize - StartReadOffset) // wrap-around detected at the src
{
......
......@@ -29,39 +29,39 @@
typedef struct _SG_BUFFER_LIST {
void * Data;
UINT32 Length;
u32 Length;
} SG_BUFFER_LIST;
typedef struct _RING_BUFFER {
volatile UINT32 WriteIndex; // Offset in bytes from the start of ring data below
volatile UINT32 ReadIndex; // Offset in bytes from the start of ring data below
volatile u32 WriteIndex; // Offset in bytes from the start of ring data below
volatile u32 ReadIndex; // Offset in bytes from the start of ring data below
volatile UINT32 InterruptMask;
volatile u32 InterruptMask;
u8 Reserved[4084]; // Pad it to PAGE_SIZE so that data starts on page boundary
// NOTE: The InterruptMask field is used only for channels but since our vmbus connection
// also uses this data structure and its data starts here, we commented out this field.
// volatile UINT32 InterruptMask;
// volatile u32 InterruptMask;
// Ring data starts here + RingDataStartOffset !!! DO NOT place any fields below this !!!
u8 Buffer[0];
} STRUCT_PACKED RING_BUFFER;
typedef struct _RING_BUFFER_INFO {
RING_BUFFER* RingBuffer;
UINT32 RingSize; // Include the shared header
u32 RingSize; // Include the shared header
HANDLE RingLock;
UINT32 RingDataSize; // < ringSize
UINT32 RingDataStartOffset;
u32 RingDataSize; // < ringSize
u32 RingDataStartOffset;
} RING_BUFFER_INFO;
typedef struct _RING_BUFFER_DEBUG_INFO {
UINT32 CurrentInterruptMask;
UINT32 CurrentReadIndex;
UINT32 CurrentWriteIndex;
UINT32 BytesAvailToRead;
UINT32 BytesAvailToWrite;
u32 CurrentInterruptMask;
u32 CurrentReadIndex;
u32 CurrentWriteIndex;
u32 BytesAvailToRead;
u32 BytesAvailToWrite;
}RING_BUFFER_DEBUG_INFO;
......@@ -73,7 +73,7 @@ static int
RingBufferInit(
RING_BUFFER_INFO *RingInfo,
void * Buffer,
UINT32 BufferLen
u32 BufferLen
);
static void
......@@ -85,25 +85,25 @@ static int
RingBufferWrite(
RING_BUFFER_INFO *RingInfo,
SG_BUFFER_LIST SgBuffers[],
UINT32 SgBufferCount
u32 SgBufferCount
);
static int
RingBufferPeek(
RING_BUFFER_INFO *RingInfo,
void * Buffer,
UINT32 BufferLen
u32 BufferLen
);
static int
RingBufferRead(
RING_BUFFER_INFO *RingInfo,
void * Buffer,
UINT32 BufferLen,
UINT32 Offset
u32 BufferLen,
u32 Offset
);
static UINT32
static u32
GetRingBufferInterruptMask(
RING_BUFFER_INFO *RingInfo
);
......
......@@ -50,8 +50,8 @@ typedef struct _RNDIS_DEVICE {
NETVSC_DEVICE *NetDevice;
RNDIS_DEVICE_STATE State;
UINT32 LinkStatus;
UINT32 NewRequestId;
u32 LinkStatus;
u32 NewRequestId;
HANDLE RequestLock;
LIST_ENTRY RequestList;
......@@ -120,9 +120,9 @@ RndisFilterOnReceive(
static int
RndisFilterQueryDevice(
RNDIS_DEVICE *Device,
UINT32 Oid,
u32 Oid,
void *Result,
UINT32 *ResultSize
u32 *ResultSize
);
static inline int
......@@ -138,7 +138,7 @@ RndisFilterQueryDeviceLinkStatus(
static int
RndisFilterSetPacketFilter(
RNDIS_DEVICE *Device,
UINT32 NewFilter
u32 NewFilter
);
static int
......@@ -235,7 +235,7 @@ static inline void PutRndisDevice(RNDIS_DEVICE *Device)
MemFree(Device);
}
static inline RNDIS_REQUEST* GetRndisRequest(RNDIS_DEVICE *Device, UINT32 MessageType, UINT32 MessageLength)
static inline RNDIS_REQUEST* GetRndisRequest(RNDIS_DEVICE *Device, u32 MessageType, u32 MessageLength)
{
RNDIS_REQUEST *request;
RNDIS_MESSAGE *rndisMessage;
......@@ -465,7 +465,7 @@ RndisFilterReceiveData(
)
{
RNDIS_PACKET *rndisPacket;
UINT32 dataOffset;
u32 dataOffset;
DPRINT_ENTER(NETVSC);
......@@ -585,13 +585,13 @@ RndisFilterOnReceive(
static int
RndisFilterQueryDevice(
RNDIS_DEVICE *Device,
UINT32 Oid,
u32 Oid,
void *Result,
UINT32 *ResultSize
u32 *ResultSize
)
{
RNDIS_REQUEST *request;
UINT32 inresultSize = *ResultSize;
u32 inresultSize = *ResultSize;
RNDIS_QUERY_REQUEST *query;
RNDIS_QUERY_COMPLETE *queryComplete;
int ret=0;
......@@ -653,7 +653,7 @@ RndisFilterQueryDeviceMac(
RNDIS_DEVICE *Device
)
{
UINT32 size=HW_MACADDR_LEN;
u32 size=HW_MACADDR_LEN;
return RndisFilterQueryDevice(Device,
RNDIS_OID_802_3_PERMANENT_ADDRESS,
......@@ -666,7 +666,7 @@ RndisFilterQueryDeviceLinkStatus(
RNDIS_DEVICE *Device
)
{
UINT32 size=sizeof(UINT32);
u32 size=sizeof(u32);
return RndisFilterQueryDevice(Device,
RNDIS_OID_GEN_MEDIA_CONNECT_STATUS,
......@@ -677,20 +677,20 @@ RndisFilterQueryDeviceLinkStatus(
static int
RndisFilterSetPacketFilter(
RNDIS_DEVICE *Device,
UINT32 NewFilter
u32 NewFilter
)
{
RNDIS_REQUEST *request;
RNDIS_SET_REQUEST *set;
RNDIS_SET_COMPLETE *setComplete;
UINT32 status;
u32 status;
int ret;
DPRINT_ENTER(NETVSC);
ASSERT(RNDIS_MESSAGE_SIZE(RNDIS_SET_REQUEST) + sizeof(UINT32) <= sizeof(RNDIS_MESSAGE));
ASSERT(RNDIS_MESSAGE_SIZE(RNDIS_SET_REQUEST) + sizeof(u32) <= sizeof(RNDIS_MESSAGE));
request = GetRndisRequest(Device, REMOTE_NDIS_SET_MSG, RNDIS_MESSAGE_SIZE(RNDIS_SET_REQUEST) + sizeof(UINT32));
request = GetRndisRequest(Device, REMOTE_NDIS_SET_MSG, RNDIS_MESSAGE_SIZE(RNDIS_SET_REQUEST) + sizeof(u32));
if (!request)
{
ret = -1;
......@@ -700,10 +700,10 @@ RndisFilterSetPacketFilter(
// Setup the rndis set
set = &request->RequestMessage.Message.SetRequest;
set->Oid = RNDIS_OID_GEN_CURRENT_PACKET_FILTER;
set->InformationBufferLength = sizeof(UINT32);
set->InformationBufferLength = sizeof(u32);
set->InformationBufferOffset = sizeof(RNDIS_SET_REQUEST);
memcpy((void*)(ULONG_PTR)set + sizeof(RNDIS_SET_REQUEST), &NewFilter, sizeof(UINT32));
memcpy((void*)(ULONG_PTR)set + sizeof(RNDIS_SET_REQUEST), &NewFilter, sizeof(u32));
ret = RndisFilterSendRequest(Device, request);
if (ret != 0)
......@@ -795,7 +795,7 @@ RndisFilterInitDevice(
RNDIS_REQUEST *request;
RNDIS_INITIALIZE_REQUEST *init;
RNDIS_INITIALIZE_COMPLETE *initComplete;
UINT32 status;
u32 status;
int ret;
DPRINT_ENTER(NETVSC);
......@@ -1091,7 +1091,7 @@ RndisFilterOnSend(
RNDIS_FILTER_PACKET *filterPacket;
RNDIS_MESSAGE *rndisMessage;
RNDIS_PACKET *rndisPacket;
UINT32 rndisMessageSize;
u32 rndisMessageSize;
DPRINT_ENTER(NETVSC);
......
......@@ -908,7 +908,7 @@ StorVscOnChannelCallback(
int ret=0;
DEVICE_OBJECT *device = (DEVICE_OBJECT*)Context;
STORVSC_DEVICE *storDevice;
UINT32 bytesRecvd;
u32 bytesRecvd;
UINT64 requestId;
UCHAR packet[ALIGN_UP(sizeof(VSTOR_PACKET),8)];
STORVSC_REQUEST_EXTENSION *request;
......
......@@ -307,7 +307,7 @@ VmbusOnDeviceAdd(
void *AdditionalInfo
)
{
UINT32 *irqvector = (UINT32*) AdditionalInfo;
u32 *irqvector = (u32*) AdditionalInfo;
int ret=0;
DPRINT_ENTER(VMBUS);
......
......@@ -64,7 +64,7 @@ typedef struct _VMBUS_CONNECTION {
VMBUS_CONNECT_STATE ConnectState;
UINT32 NextGpadlHandle;
u32 NextGpadlHandle;
// Represents channel interrupts. Each bit position
// represents a channel.
......@@ -130,7 +130,7 @@ VmbusChildDeviceRemove(
static VMBUS_CHANNEL*
GetChannelFromRelId(
UINT32 relId
u32 relId
);
//
......@@ -154,7 +154,7 @@ VmbusPostMessage(
static int
VmbusSetEvent(
UINT32 childRelId
u32 childRelId
);
static void
......
......@@ -27,7 +27,7 @@
#include "VmbusPacketFormat.h"
#define C_ASSERT(x)
typedef UINT32 NTSTATUS;
typedef u32 NTSTATUS;
#pragma pack(push,1)
......@@ -68,14 +68,14 @@ typedef enum _VMBUS_CHANNEL_MESSAGE_TYPE
typedef struct _VMBUS_CHANNEL_MESSAGE_HEADER
{
VMBUS_CHANNEL_MESSAGE_TYPE MessageType;
UINT32 Padding;
u32 Padding;
} VMBUS_CHANNEL_MESSAGE_HEADER, *PVMBUS_CHANNEL_MESSAGE_HEADER;
// Query VMBus Version parameters
typedef struct _VMBUS_CHANNEL_QUERY_VMBUS_VERSION
{
VMBUS_CHANNEL_MESSAGE_HEADER Header;
UINT32 Version;
u32 Version;
} VMBUS_CHANNEL_QUERY_VMBUS_VERSION, *PVMBUS_CHANNEL_QUERY_VMBUS_VERSION;
// VMBus Version Supported parameters
......@@ -90,7 +90,7 @@ typedef struct _VMBUS_CHANNEL_OFFER_CHANNEL
{
VMBUS_CHANNEL_MESSAGE_HEADER Header;
VMBUS_CHANNEL_OFFER Offer;
UINT32 ChildRelId;
u32 ChildRelId;
u8 MonitorId;
BOOLEAN MonitorAllocated;
} VMBUS_CHANNEL_OFFER_CHANNEL, *PVMBUS_CHANNEL_OFFER_CHANNEL;
......@@ -104,7 +104,7 @@ C_ASSERT(sizeof(VMBUS_CHANNEL_OFFER_CHANNEL) <= MAXIMUM_SYNIC_MESSAGE_BYTES);
typedef struct _VMBUS_CHANNEL_RESCIND_OFFER
{
VMBUS_CHANNEL_MESSAGE_HEADER Header;
UINT32 ChildRelId;
u32 ChildRelId;
} VMBUS_CHANNEL_RESCIND_OFFER, *PVMBUS_CHANNEL_RESCIND_OFFER;
// Request Offer -- no parameters, SynIC message contains the partition ID
......@@ -121,12 +121,12 @@ typedef struct _VMBUS_CHANNEL_OPEN_CHANNEL
//
// Identifies the specific VMBus channel that is being opened.
//
UINT32 ChildRelId;
u32 ChildRelId;
//
// ID making a particular open request at a channel offer unique.
//
UINT32 OpenId;
u32 OpenId;
//
// GPADL for the channel's ring buffer.
......@@ -143,7 +143,7 @@ typedef struct _VMBUS_CHANNEL_OPEN_CHANNEL
// by RingBufferGpadlHandle. The downstream ring buffer follows it at this
// offset (in pages).
//
UINT32 DownstreamRingBufferPageOffset;
u32 DownstreamRingBufferPageOffset;
//
// User-specific data to be passed along to the server endpoint.
......@@ -159,8 +159,8 @@ typedef VMBUS_CHANNEL_OPEN_CHANNEL VMBUS_CHANNEL_REOPEN_CHANNEL, *PVMBUS_CHANNEL
typedef struct _VMBUS_CHANNEL_OPEN_RESULT
{
VMBUS_CHANNEL_MESSAGE_HEADER Header;
UINT32 ChildRelId;
UINT32 OpenId;
u32 ChildRelId;
u32 OpenId;
NTSTATUS Status;
} VMBUS_CHANNEL_OPEN_RESULT, *PVMBUS_CHANNEL_OPEN_RESULT;
......@@ -168,7 +168,7 @@ typedef struct _VMBUS_CHANNEL_OPEN_RESULT
typedef struct _VMBUS_CHANNEL_CLOSE_CHANNEL
{
VMBUS_CHANNEL_MESSAGE_HEADER Header;
UINT32 ChildRelId;
u32 ChildRelId;
} VMBUS_CHANNEL_CLOSE_CHANNEL, *PVMBUS_CHANNEL_CLOSE_CHANNEL;
// Channel Message GPADL
......@@ -186,8 +186,8 @@ typedef struct _VMBUS_CHANNEL_CLOSE_CHANNEL
typedef struct _VMBUS_CHANNEL_GPADL_HEADER
{
VMBUS_CHANNEL_MESSAGE_HEADER Header;
UINT32 ChildRelId;
UINT32 Gpadl;
u32 ChildRelId;
u32 Gpadl;
u16 RangeBufLen;
u16 RangeCount;
GPA_RANGE Range[0];
......@@ -201,8 +201,8 @@ typedef struct _VMBUS_CHANNEL_GPADL_HEADER
typedef struct _VMBUS_CHANNEL_GPADL_BODY
{
VMBUS_CHANNEL_MESSAGE_HEADER Header;
UINT32 MessageNumber;
UINT32 Gpadl;
u32 MessageNumber;
u32 Gpadl;
UINT64 Pfn[0];
} VMBUS_CHANNEL_GPADL_BODY, *PVMBUS_CHANNEL_GPADL_BODY;
......@@ -210,22 +210,22 @@ typedef struct _VMBUS_CHANNEL_GPADL_BODY
typedef struct _VMBUS_CHANNEL_GPADL_CREATED
{
VMBUS_CHANNEL_MESSAGE_HEADER Header;
UINT32 ChildRelId;
UINT32 Gpadl;
UINT32 CreationStatus;
u32 ChildRelId;
u32 Gpadl;
u32 CreationStatus;
} VMBUS_CHANNEL_GPADL_CREATED, *PVMBUS_CHANNEL_GPADL_CREATED;
typedef struct _VMBUS_CHANNEL_GPADL_TEARDOWN
{
VMBUS_CHANNEL_MESSAGE_HEADER Header;
UINT32 ChildRelId;
UINT32 Gpadl;
u32 ChildRelId;
u32 Gpadl;
} VMBUS_CHANNEL_GPADL_TEARDOWN, *PVMBUS_CHANNEL_GPADL_TEARDOWN;
typedef struct _VMBUS_CHANNEL_GPADL_TORNDOWN
{
VMBUS_CHANNEL_MESSAGE_HEADER Header;
UINT32 Gpadl;
u32 Gpadl;
} VMBUS_CHANNEL_GPADL_TORNDOWN, *PVMBUS_CHANNEL_GPADL_TORNDOWN;
#ifdef VMBUS_FEATURE_PARENT_OR_PEER_MEMORY_MAPPED_INTO_A_CHILD
......@@ -234,28 +234,28 @@ typedef struct _VMBUS_CHANNEL_VIEW_RANGE_ADD
VMBUS_CHANNEL_MESSAGE_HEADER Header;
PHYSICAL_ADDRESS ViewRangeBase;
UINT64 ViewRangeLength;
UINT32 ChildRelId;
u32 ChildRelId;
} VMBUS_CHANNEL_VIEW_RANGE_ADD, *PVMBUS_CHANNEL_VIEW_RANGE_ADD;
typedef struct _VMBUS_CHANNEL_VIEW_RANGE_REMOVE
{
VMBUS_CHANNEL_MESSAGE_HEADER Header;
PHYSICAL_ADDRESS ViewRangeBase;
UINT32 ChildRelId;
u32 ChildRelId;
} VMBUS_CHANNEL_VIEW_RANGE_REMOVE, *PVMBUS_CHANNEL_VIEW_RANGE_REMOVE;
#endif
typedef struct _VMBUS_CHANNEL_RELID_RELEASED
{
VMBUS_CHANNEL_MESSAGE_HEADER Header;
UINT32 ChildRelId;
u32 ChildRelId;
} VMBUS_CHANNEL_RELID_RELEASED, *PVMBUS_CHANNEL_RELID_RELEASED;
typedef struct _VMBUS_CHANNEL_INITIATE_CONTACT
{
VMBUS_CHANNEL_MESSAGE_HEADER Header;
UINT32 VMBusVersionRequested;
UINT32 Padding2;
u32 VMBusVersionRequested;
u32 Padding2;
UINT64 InterruptPage;
UINT64 MonitorPage1;
UINT64 MonitorPage2;
......
......@@ -41,9 +41,9 @@ typedef enum _HV_CALL_CODE
typedef struct _HV_INPUT_POST_MESSAGE
{
HV_CONNECTION_ID ConnectionId;
UINT32 Reserved;
u32 Reserved;
HV_MESSAGE_TYPE MessageType;
UINT32 PayloadSize;
u32 PayloadSize;
UINT64 Payload[HV_MESSAGE_PAYLOAD_QWORD_COUNT];
} HV_INPUT_POST_MESSAGE, *PHV_INPUT_POST_MESSAGE;
......
......@@ -84,7 +84,7 @@
#define HV_EVENT_FLAGS_COUNT (256 * 8)
#define HV_EVENT_FLAGS_BYTE_COUNT (256)
#define HV_EVENT_FLAGS_DWORD_COUNT (256 / sizeof(UINT32))
#define HV_EVENT_FLAGS_DWORD_COUNT (256 / sizeof(u32))
//
// Define hypervisor message types.
......@@ -139,7 +139,7 @@ typedef enum _HV_MESSAGE_TYPE
// Define the synthetic interrupt source index type.
//
typedef UINT32 HV_SYNIC_SINT_INDEX, *PHV_SYNIC_SINT_INDEX;
typedef u32 HV_SYNIC_SINT_INDEX, *PHV_SYNIC_SINT_INDEX;
//
// Define partition identifier type.
......@@ -158,12 +158,12 @@ typedef UINT64 HV_PARTITION_ID, *PHV_PARTITION_ID;
typedef union _HV_CONNECTION_ID
{
UINT32 AsUINT32;
u32 Asu32;
struct
{
UINT32 Id:24;
UINT32 Reserved:8;
u32 Id:24;
u32 Reserved:8;
} u;
} HV_CONNECTION_ID, *PHV_CONNECTION_ID;
......@@ -174,12 +174,12 @@ typedef union _HV_CONNECTION_ID
typedef union _HV_PORT_ID
{
UINT32 AsUINT32;
u32 Asu32;
struct
{
UINT32 Id:24;
UINT32 Reserved:8;
u32 Id:24;
u32 Reserved:8;
} u ;
} HV_PORT_ID, *PHV_PORT_ID;
......@@ -202,7 +202,7 @@ typedef enum _HV_PORT_TYPE
typedef struct _HV_PORT_INFO
{
HV_PORT_TYPE PortType;
UINT32 Padding;
u32 Padding;
union
{
......@@ -219,7 +219,7 @@ typedef struct _HV_PORT_INFO
HV_VP_INDEX TargetVp;
u16 BaseFlagNumber;
u16 FlagCount;
UINT32 RsvdZ;
u32 RsvdZ;
} EventPortInfo;
struct
......@@ -235,7 +235,7 @@ typedef const HV_PORT_INFO *PCHV_PORT_INFO;
typedef struct _HV_CONNECTION_INFO
{
HV_PORT_TYPE PortType;
UINT32 Padding;
u32 Padding;
union
{
......@@ -296,8 +296,8 @@ typedef struct _HV_MESSAGE_HEADER
//
typedef struct _HV_TIMER_MESSAGE_PAYLOAD
{
UINT32 TimerIndex;
UINT32 Reserved;
u32 TimerIndex;
u32 Reserved;
HV_NANO100_TIME ExpirationTime; // When the timer expired
HV_NANO100_TIME DeliveryTime; // When the message was delivered
} HV_TIMER_MESSAGE_PAYLOAD, *PHV_TIMER_MESSAGE_PAYLOAD;
......@@ -338,7 +338,7 @@ typedef struct _HV_MESSAGE_PAGE
typedef union _HV_SYNIC_EVENT_FLAGS
{
u8 Flags8[HV_EVENT_FLAGS_BYTE_COUNT];
UINT32 Flags32[HV_EVENT_FLAGS_DWORD_COUNT];
u32 Flags32[HV_EVENT_FLAGS_DWORD_COUNT];
} HV_SYNIC_EVENT_FLAGS, *PHV_SYNIC_EVENT_FLAGS;
......@@ -422,8 +422,8 @@ typedef union _HV_MONITOR_TRIGGER_GROUP
struct
{
UINT32 Pending;
UINT32 Armed;
u32 Pending;
u32 Armed;
};
} HV_MONITOR_TRIGGER_GROUP, *PHV_MONITOR_TRIGGER_GROUP;
......@@ -437,12 +437,12 @@ typedef struct _HV_MONITOR_PARAMETER
typedef union _HV_MONITOR_TRIGGER_STATE
{
UINT32 AsUINT32;
u32 Asu32;
struct
{
UINT32 GroupEnable : 4;
UINT32 RsvdZ : 28;
u32 GroupEnable : 4;
u32 RsvdZ : 28;
};
} HV_MONITOR_TRIGGER_STATE, *PHV_MONITOR_TRIGGER_STATE;
......@@ -471,12 +471,12 @@ typedef union _HV_MONITOR_TRIGGER_STATE
typedef struct _HV_MONITOR_PAGE
{
HV_MONITOR_TRIGGER_STATE TriggerState;
UINT32 RsvdZ1;
u32 RsvdZ1;
HV_MONITOR_TRIGGER_GROUP TriggerGroup[4];
UINT64 RsvdZ2[3];
INT32 NextCheckTime[4][32];
s32 NextCheckTime[4][32];
u16 Latency[4][32];
UINT64 RsvdZ3[32];
......
......@@ -26,7 +26,7 @@
//
// Virtual Processor Indices
//
typedef UINT32 HV_VP_INDEX, *PHV_VP_INDEX;
typedef u32 HV_VP_INDEX, *PHV_VP_INDEX;
//
// The below CPUID leaves are present if VersionAndFeatures.HypervisorPresent
......
......@@ -52,14 +52,14 @@ typedef int (*PFN_ON_SEND)(DEVICE_OBJECT *dev, PNETVSC_PACKET packet);
typedef void (*PFN_ON_SENDRECVCOMPLETION)(void * Context);
typedef int (*PFN_ON_RECVCALLBACK)(DEVICE_OBJECT *dev, PNETVSC_PACKET packet);
typedef void (*PFN_ON_LINKSTATUS_CHANGED)(DEVICE_OBJECT *dev, UINT32 Status);
typedef void (*PFN_ON_LINKSTATUS_CHANGED)(DEVICE_OBJECT *dev, u32 Status);
// Represent the xfer page packet which contains 1 or more netvsc packet
typedef struct _XFERPAGE_PACKET {
DLIST_ENTRY ListEntry;
// # of netvsc packets this xfer packet contains
UINT32 Count;
u32 Count;
} XFERPAGE_PACKET;
......@@ -93,9 +93,9 @@ typedef struct _NETVSC_PACKET {
// This points to the memory after PageBuffers
void * Extension;
UINT32 TotalDataBufferLength;
u32 TotalDataBufferLength;
// Points to the send/receive buffer where the ethernet frame is
UINT32 PageBufferCount;
u32 PageBufferCount;
PAGE_BUFFER PageBuffers[NETVSC_PACKET_MAXPAGE];
} NETVSC_PACKET;
......@@ -105,11 +105,11 @@ typedef struct _NETVSC_PACKET {
typedef struct _NETVSC_DRIVER_OBJECT {
DRIVER_OBJECT Base; // Must be the first field
UINT32 RingBufferSize;
UINT32 RequestExtSize;
u32 RingBufferSize;
u32 RequestExtSize;
// Additional num of page buffers to allocate
UINT32 AdditionalRequestPageBufferCount;
u32 AdditionalRequestPageBufferCount;
// This is set by the caller to allow us to callback when we receive a packet
// from the "wire"
......
......@@ -71,17 +71,17 @@ typedef enum _STORVSC_REQUEST_TYPE{
typedef struct _STORVSC_REQUEST {
STORVSC_REQUEST_TYPE Type;
UINT32 Host;
UINT32 Bus;
UINT32 TargetId;
UINT32 LunId;
u32 Host;
u32 Bus;
u32 TargetId;
u32 LunId;
u8 * Cdb;
UINT32 CdbLen;
UINT32 Status;
UINT32 BytesXfer;
u32 CdbLen;
u32 Status;
u32 BytesXfer;
UCHAR* SenseBuffer;
UINT32 SenseBufferSize;
u32 SenseBufferSize;
void * Context;
......@@ -99,13 +99,13 @@ typedef struct _STORVSC_DRIVER_OBJECT {
DRIVER_OBJECT Base; // Must be the first field
// Set by caller (in bytes)
UINT32 RingBufferSize;
u32 RingBufferSize;
// Allocate this much private extension for each I/O request
UINT32 RequestExtSize;
u32 RequestExtSize;
// Maximum # of requests in flight per channel/device
UINT32 MaxOutstandingRequestsPerChannel;
u32 MaxOutstandingRequestsPerChannel;
// Set by the caller to allow us to re-enumerate the bus on the host
PFN_ON_HOST_RESCAN OnHostRescan;
......
......@@ -49,16 +49,16 @@ typedef struct _DEVICE_OBJECT *PDEVICE_OBJECT;
// Single-page buffer
typedef struct _PAGE_BUFFER {
UINT32 Length;
UINT32 Offset;
u32 Length;
u32 Offset;
UINT64 Pfn;
} PAGE_BUFFER;
// Multiple-page buffer
typedef struct _MULTIPAGE_BUFFER {
// Length and Offset determines the # of pfns in the array
UINT32 Length;
UINT32 Offset;
u32 Length;
u32 Offset;
UINT64 PfnArray[MAX_MULTIPAGE_BUFFER_COUNT];
}MULTIPAGE_BUFFER;
......@@ -92,10 +92,10 @@ typedef void (*VMBUS_CHANNEL_CALLBACK)(void * context);
typedef int (*VMBUS_CHANNEL_OPEN)(
PDEVICE_OBJECT Device,
UINT32 SendBufferSize,
UINT32 RecvRingBufferSize,
u32 SendBufferSize,
u32 RecvRingBufferSize,
void * UserData,
UINT32 UserDataLen,
u32 UserDataLen,
VMBUS_CHANNEL_CALLBACK ChannelCallback,
void * Context
);
......@@ -107,18 +107,18 @@ typedef void (*VMBUS_CHANNEL_CLOSE)(
typedef int (*VMBUS_CHANNEL_SEND_PACKET)(
PDEVICE_OBJECT Device,
const void * Buffer,
UINT32 BufferLen,
u32 BufferLen,
UINT64 RequestId,
UINT32 Type,
UINT32 Flags
u32 Type,
u32 Flags
);
typedef int (*VMBUS_CHANNEL_SEND_PACKET_PAGEBUFFER)(
PDEVICE_OBJECT Device,
PAGE_BUFFER PageBuffers[],
UINT32 PageCount,
u32 PageCount,
void * Buffer,
UINT32 BufferLen,
u32 BufferLen,
UINT64 RequestId
);
......@@ -126,61 +126,61 @@ typedef int (*VMBUS_CHANNEL_SEND_PACKET_MULTIPAGEBUFFER)(
PDEVICE_OBJECT Device,
MULTIPAGE_BUFFER *MultiPageBuffer,
void * Buffer,
UINT32 BufferLen,
u32 BufferLen,
UINT64 RequestId
);
typedef int (*VMBUS_CHANNEL_RECV_PACKET)(
PDEVICE_OBJECT Device,
void * Buffer,
UINT32 BufferLen,
UINT32* BufferActualLen,
u32 BufferLen,
u32* BufferActualLen,
UINT64* RequestId
);
typedef int (*VMBUS_CHANNEL_RECV_PACKET_PAW)(
PDEVICE_OBJECT Device,
void * Buffer,
UINT32 BufferLen,
UINT32* BufferActualLen,
u32 BufferLen,
u32* BufferActualLen,
UINT64* RequestId
);
typedef int (*VMBUS_CHANNEL_ESTABLISH_GPADL)(
PDEVICE_OBJECT Device,
void * Buffer, // from kmalloc()
UINT32 BufferLen, // page-size multiple
UINT32* GpadlHandle
u32 BufferLen, // page-size multiple
u32* GpadlHandle
);
typedef int (*VMBUS_CHANNEL_TEARDOWN_GPADL)(
PDEVICE_OBJECT Device,
UINT32 GpadlHandle
u32 GpadlHandle
);
typedef struct _PORT_INFO {
UINT32 InterruptMask;
UINT32 ReadIndex;
UINT32 WriteIndex;
UINT32 BytesAvailToRead;
UINT32 BytesAvailToWrite;
u32 InterruptMask;
u32 ReadIndex;
u32 WriteIndex;
u32 BytesAvailToRead;
u32 BytesAvailToWrite;
} PORT_INFO;
typedef struct _DEVICE_INFO {
UINT32 ChannelId;
UINT32 ChannelState;
u32 ChannelId;
u32 ChannelState;
GUID ChannelType;
GUID ChannelInstance;
UINT32 MonitorId;
UINT32 ServerMonitorPending;
UINT32 ServerMonitorLatency;
UINT32 ServerMonitorConnectionId;
UINT32 ClientMonitorPending;
UINT32 ClientMonitorLatency;
UINT32 ClientMonitorConnectionId;
u32 MonitorId;
u32 ServerMonitorPending;
u32 ServerMonitorLatency;
u32 ServerMonitorConnectionId;
u32 ClientMonitorPending;
u32 ClientMonitorLatency;
u32 ClientMonitorConnectionId;
PORT_INFO Inbound;
PORT_INFO Outbound;
......
......@@ -67,8 +67,8 @@ typedef struct
GUID InterfaceType;
GUID InterfaceInstance;
UINT64 InterruptLatencyIn100nsUnits;
UINT32 InterfaceRevision;
UINT32 ServerContextAreaSize; // in bytes
u32 InterfaceRevision;
u32 ServerContextAreaSize; // in bytes
u16 ChannelFlags;
u16 MmioMegabytes; // in bytes * 1024 * 1024
......@@ -89,11 +89,11 @@ typedef struct
//
struct
{
UINT32 PipeMode;
u32 PipeMode;
UCHAR UserDefined[MAX_PIPE_USER_DEFINED_BYTES];
} Pipe;
} u;
UINT32 Padding;
u32 Padding;
} VMBUS_CHANNEL_OFFER, *PVMBUS_CHANNEL_OFFER;
#pragma pack(pop)
......@@ -107,7 +107,7 @@ typedef struct
// FIELD_OFFSET(VMBUS_CHANNEL_OFFER, u.Standard.UserDefined)));
//
typedef UINT32 GPADL_HANDLE;
typedef u32 GPADL_HANDLE;
//
// Server Flags
......
......@@ -41,8 +41,8 @@ typedef struct
{
struct
{
volatile UINT32 In; // Offset in bytes from the ring base
volatile UINT32 Out; // Offset in bytes from the ring base
volatile u32 In; // Offset in bytes from the ring base
volatile u32 Out; // Offset in bytes from the ring base
};
volatile LONGLONG InOut;
};
......@@ -52,7 +52,7 @@ typedef struct
// endpoint should not send any interrupts.
//
volatile UINT32 InterruptMask;
volatile u32 InterruptMask;
} VMRCB, *PVMRCB;
......@@ -86,7 +86,7 @@ typedef struct
UINT64 TransactionId;
} VMPACKET_DESCRIPTOR, *PVMPACKET_DESCRIPTOR;
typedef UINT32 PREVIOUS_PACKET_OFFSET, *PPREVIOUS_PACKET_OFFSET;
typedef u32 PREVIOUS_PACKET_OFFSET, *PPREVIOUS_PACKET_OFFSET;
typedef struct
{
......@@ -96,8 +96,8 @@ typedef struct
typedef struct
{
UINT32 ByteCount;
UINT32 ByteOffset;
u32 ByteCount;
u32 ByteOffset;
} VMTRANSFER_PAGE_RANGE, *PVMTRANSFER_PAGE_RANGE;
#ifdef __cplusplus
......@@ -115,7 +115,7 @@ typedef struct VMTRANSFER_PAGE_PACKET_HEADER {
u16 TransferPageSetId;
BOOLEAN SenderOwnsSet;
u8 Reserved;
UINT32 RangeCount;
u32 RangeCount;
VMTRANSFER_PAGE_RANGE Ranges[1];
} VMTRANSFER_PAGE_PACKET_HEADER, *PVMTRANSFER_PAGE_PACKET_HEADER;
......@@ -134,8 +134,8 @@ typedef struct _VMGPADL_PACKET_HEADER {
#endif
UINT32 Gpadl;
UINT32 Reserved;
u32 Gpadl;
u32 Reserved;
} VMGPADL_PACKET_HEADER, *PVMGPADL_PACKET_HEADER;
......@@ -151,7 +151,7 @@ typedef struct _VMADD_REMOVE_TRANSFER_PAGE_SET {
#endif
UINT32 Gpadl;
u32 Gpadl;
u16 TransferPageSetId;
u16 Reserved;
......@@ -166,8 +166,8 @@ typedef struct _VMADD_REMOVE_TRANSFER_PAGE_SET {
typedef struct _GPA_RANGE {
UINT32 ByteCount;
UINT32 ByteOffset;
u32 ByteCount;
u32 ByteOffset;
UINT64 PfnArray[0];
} GPA_RANGE, *PGPA_RANGE;
......@@ -196,8 +196,8 @@ typedef struct _VMESTABLISH_GPADL {
#endif
UINT32 Gpadl;
UINT32 RangeCount;
u32 Gpadl;
u32 RangeCount;
GPA_RANGE Range[1];
} VMESTABLISH_GPADL, *PVMESTABLISH_GPADL;
......@@ -220,8 +220,8 @@ typedef struct _VMTEARDOWN_GPADL {
#endif
UINT32 Gpadl;
UINT32 Reserved; // for alignment to a 8-byte boundary
u32 Gpadl;
u32 Reserved; // for alignment to a 8-byte boundary
} VMTEARDOWN_GPADL, *PVMTEARDOWN_GPADL;
......@@ -242,8 +242,8 @@ typedef struct _VMDATA_GPA_DIRECT {
#endif
UINT32 Reserved;
UINT32 RangeCount;
u32 Reserved;
u32 RangeCount;
GPA_RANGE Range[1];
} VMDATA_GPA_DIRECT, *PVMDATA_GPA_DIRECT;
......@@ -267,8 +267,8 @@ typedef struct _VMADDITIONAL_DATA {
#endif
UINT64 TotalBytes;
UINT32 ByteOffset;
UINT32 ByteCount;
u32 ByteOffset;
u32 ByteCount;
UCHAR Data[1];
} VMADDITIONAL_DATA, *PVMADDITIONAL_DATA;
......
......@@ -26,7 +26,7 @@
#include "VmbusChannelInterface.h"
#define NVSP_INVALID_PROTOCOL_VERSION ((UINT32)0xFFFFFFFF)
#define NVSP_INVALID_PROTOCOL_VERSION ((u32)0xFFFFFFFF)
#define NVSP_PROTOCOL_VERSION_1 2
#define NVSP_MIN_PROTOCOL_VERSION NVSP_PROTOCOL_VERSION_1
......@@ -84,7 +84,7 @@ typedef enum _NVSP_STATUS
typedef struct _NVSP_MESSAGE_HEADER
{
UINT32 MessageType;
u32 MessageType;
} NVSP_MESSAGE_HEADER, *PNVSP_MESSAGE_HEADER;
//
......@@ -99,8 +99,8 @@ typedef struct _NVSP_MESSAGE_HEADER
//
typedef struct _NVSP_MESSAGE_INIT
{
UINT32 MinProtocolVersion;
UINT32 MaxProtocolVersion;
u32 MinProtocolVersion;
u32 MaxProtocolVersion;
} NVSP_MESSAGE_INIT, *PNVSP_MESSAGE_INIT;
//
......@@ -110,9 +110,9 @@ typedef struct _NVSP_MESSAGE_INIT
//
typedef struct _NVSP_MESSAGE_INIT_COMPLETE
{
UINT32 NegotiatedProtocolVersion;
UINT32 MaximumMdlChainLength;
UINT32 Status;
u32 NegotiatedProtocolVersion;
u32 MaximumMdlChainLength;
u32 Status;
} NVSP_MESSAGE_INIT_COMPLETE, *PNVSP_MESSAGE_INIT_COMPLETE;
typedef union _NVSP_MESSAGE_INIT_UBER
......@@ -132,8 +132,8 @@ typedef union _NVSP_MESSAGE_INIT_UBER
//
typedef struct _NVSP_1_MESSAGE_SEND_NDIS_VERSION
{
UINT32 NdisMajorVersion;
UINT32 NdisMinorVersion;
u32 NdisMajorVersion;
u32 NdisMinorVersion;
} NVSP_1_MESSAGE_SEND_NDIS_VERSION, *PNVSP_1_MESSAGE_SEND_NDIS_VERSION;
//
......@@ -149,10 +149,10 @@ typedef struct _NVSP_1_MESSAGE_SEND_RECEIVE_BUFFER
typedef struct _NVSP_1_RECEIVE_BUFFER_SECTION
{
UINT32 Offset;
UINT32 SubAllocationSize;
UINT32 NumSubAllocations;
UINT32 EndOffset;
u32 Offset;
u32 SubAllocationSize;
u32 NumSubAllocations;
u32 EndOffset;
} NVSP_1_RECEIVE_BUFFER_SECTION, *PNVSP_1_RECEIVE_BUFFER_SECTION;
//
......@@ -162,8 +162,8 @@ typedef struct _NVSP_1_RECEIVE_BUFFER_SECTION
//
typedef struct _NVSP_1_MESSAGE_SEND_RECEIVE_BUFFER_COMPLETE
{
UINT32 Status;
UINT32 NumSections;
u32 Status;
u32 NumSections;
//
// The receive buffer is split into two parts, a large
......@@ -213,7 +213,7 @@ typedef struct _NVSP_1_MESSAGE_SEND_SEND_BUFFER
//
typedef struct _NVSP_1_MESSAGE_SEND_SEND_BUFFER_COMPLETE
{
UINT32 Status;
u32 Status;
//
// The VSC gets to choose the size of the send buffer and
......@@ -221,7 +221,7 @@ typedef struct _NVSP_1_MESSAGE_SEND_SEND_BUFFER_COMPLETE
// This was done to enable dynamic reconfigurations when
// the cost of GPA-direct buffers decreases.
//
UINT32 SectionSize;
u32 SectionSize;
} NVSP_1_MESSAGE_SEND_SEND_BUFFER_COMPLETE, *PNVSP_1_MESSAGE_SEND_SEND_BUFFER_COMPLETE;
//
......@@ -246,7 +246,7 @@ typedef struct _NVSP_1_MESSAGE_SEND_RNDIS_PACKET
// the Network VSP only has one. Therefore, the channel
// travels with the RNDIS packet.
//
UINT32 ChannelType;
u32 ChannelType;
//
// This field is used to send part or all of the data
......@@ -256,8 +256,8 @@ typedef struct _NVSP_1_MESSAGE_SEND_RNDIS_PACKET
// and all of the data was sent through other VMBus
// mechanisms.
//
UINT32 SendBufferSectionIndex;
UINT32 SendBufferSectionSize;
u32 SendBufferSectionIndex;
u32 SendBufferSectionSize;
} NVSP_1_MESSAGE_SEND_RNDIS_PACKET, *PNVSP_1_MESSAGE_SEND_RNDIS_PACKET;
//
......@@ -268,7 +268,7 @@ typedef struct _NVSP_1_MESSAGE_SEND_RNDIS_PACKET
//
typedef struct _NVSP_1_MESSAGE_SEND_RNDIS_PACKET_COMPLETE
{
UINT32 Status;
u32 Status;
} NVSP_1_MESSAGE_SEND_RNDIS_PACKET_COMPLETE, *PNVSP_1_MESSAGE_SEND_RNDIS_PACKET_COMPLETE;
typedef union _NVSP_MESSAGE_1_UBER
......
......@@ -97,7 +97,6 @@ typedef struct _DLIST_ENTRY {
//
// unsigned types
//
typedef unsigned int UINT32;
#ifdef __x86_64__
typedef unsigned long UINT64;
#else
......@@ -112,7 +111,6 @@ typedef unsigned char UCHAR;
//
// signed types
//
typedef int INT32;
#ifdef __x86_64__
typedef long INT64;
#else
......@@ -131,7 +129,7 @@ typedef unsigned long SIZE_T;
typedef unsigned char BOOL;
typedef unsigned char BOOLEAN;
typedef void* HANDLE;
typedef UINT32 DWORD;
typedef u32 DWORD;
typedef char* PCHAR;
typedef unsigned char BYTE;
......@@ -148,7 +146,7 @@ typedef void (*PFN_TIMER_CALLBACK)(void* context);
#ifdef __x86_64__
#define RDMSR(reg, v) { \
UINT32 h, l; \
u32 h, l; \
__asm__ __volatile__("rdmsr" \
: "=a" (l), "=d" (h) \
: "c" (reg)); \
......@@ -156,9 +154,9 @@ typedef void (*PFN_TIMER_CALLBACK)(void* context);
}
#define WRMSR(reg, v) { \
UINT32 h, l; \
l = (UINT32)(((UINT64)(v)) & 0xFFFFFFFF); \
h = (UINT32)((((UINT64)(v)) >> 32) & 0xFFFFFFFF); \
u32 h, l; \
l = (u32)(((UINT64)(v)) & 0xFFFFFFFF); \
h = (u32)((((UINT64)(v)) >> 32) & 0xFFFFFFFF); \
__asm__ __volatile__("wrmsr" \
: /* no outputs */ \
: "c" (reg), "a" (l), "d" (h)); \
......@@ -219,7 +217,7 @@ extern void MemoryFence(void);
extern HANDLE TimerCreate(PFN_TIMER_CALLBACK pfnTimerCB, void* context);
extern void TimerClose(HANDLE hTimer);
extern int TimerStop(HANDLE hTimer);
extern void TimerStart(HANDLE hTimer, UINT32 expirationInUs);
extern void TimerStart(HANDLE hTimer, u32 expirationInUs);
extern SIZE_T GetTickCount(void);
extern HANDLE WaitEventCreate(void);
......@@ -228,7 +226,7 @@ extern void WaitEventSet(HANDLE hWait);
extern int WaitEventWait(HANDLE hWait);
// If >0, hWait got signaled. If ==0, timeout. If < 0, error
extern int WaitEventWaitEx(HANDLE hWait, UINT32 TimeoutInMs);
extern int WaitEventWaitEx(HANDLE hWait, u32 TimeoutInMs);
extern HANDLE SpinlockCreate(void);
extern void SpinlockClose(HANDLE hSpin);
......
This diff is collapsed.
......@@ -289,7 +289,7 @@ HANDLE TimerCreate(PFN_TIMER_CALLBACK pfnTimerCB, void* context)
return t;
}
void TimerStart(HANDLE hTimer, UINT32 expirationInUs)
void TimerStart(HANDLE hTimer, u32 expirationInUs)
{
TIMER* t = (TIMER* )hTimer;
......@@ -363,7 +363,7 @@ int WaitEventWait(HANDLE hWait)
return ret;
}
int WaitEventWaitEx(HANDLE hWait, UINT32 TimeoutInMs)
int WaitEventWaitEx(HANDLE hWait, u32 TimeoutInMs)
{
int ret=0;
WAITEVENT* waitEvent = (WAITEVENT* )hWait;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment