Author: tkreuzer
Date: Sun Apr 12 12:24:01 2015
New Revision: 67171
URL:
http://svn.reactos.org/svn/reactos?rev=67171&view=rev
Log:
[REACTOS]
Fix usage of interlocked[Compare]ExchangePointer. These functions take a PVOID* as first
parameter and nothing else. In native headers they are inline functions, not macros.
Modified:
trunk/reactos/dll/win32/kernel32/client/proc.c
trunk/reactos/dll/win32/setupapi/stringtable.c
trunk/reactos/drivers/bluetooth/fbtusb/fbtdev.c
trunk/reactos/drivers/bluetooth/fbtusb/fbtpwr.c
trunk/reactos/drivers/serial/serial/devctrl.c
trunk/reactos/drivers/storage/classpnp/autorun.c
trunk/reactos/lib/3rdparty/libwine/debug_ros.c
trunk/reactos/ntoskrnl/ke/ipi.c
trunk/reactos/ntoskrnl/ps/kill.c
trunk/reactos/ntoskrnl/ps/quota.c
trunk/reactos/win32ss/user/winsrv/consrv/frontends/gui/guiterm.c
Modified: trunk/reactos/dll/win32/kernel32/client/proc.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/client/…
==============================================================================
--- trunk/reactos/dll/win32/kernel32/client/proc.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/kernel32/client/proc.c [iso-8859-1] Sun Apr 12 12:24:01 2015
@@ -1437,7 +1437,7 @@
StartupInfo->lpTitle = TitleString.Buffer;
/* We finished with the ANSI version, try to cache it */
- if (!InterlockedCompareExchangePointer(&BaseAnsiStartupInfo,
+ if
(!InterlockedCompareExchangePointer((PVOID*)&BaseAnsiStartupInfo,
StartupInfo,
NULL))
{
Modified: trunk/reactos/dll/win32/setupapi/stringtable.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/setupapi/stringt…
==============================================================================
--- trunk/reactos/dll/win32/setupapi/stringtable.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/setupapi/stringtable.c [iso-8859-1] Sun Apr 12 12:24:01 2015
@@ -244,7 +244,7 @@
return (DWORD)-1;
memset(&pNewSlots[pStringTable->dwMaxSlots], 0, sizeof(TABLE_SLOT) *
(dwNewMaxSlots - pStringTable->dwMaxSlots));
memcpy(pNewSlots, pStringTable->pSlots, sizeof(TABLE_SLOT) *
pStringTable->dwMaxSlots);
- pNewSlots = InterlockedExchangePointer(&pStringTable->pSlots, pNewSlots);
+ pNewSlots = InterlockedExchangePointer((PVOID*)&pStringTable->pSlots,
pNewSlots);
MyFree(pNewSlots);
pStringTable->dwMaxSlots = dwNewMaxSlots;
Modified: trunk/reactos/drivers/bluetooth/fbtusb/fbtdev.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bluetooth/fbtusb/f…
==============================================================================
--- trunk/reactos/drivers/bluetooth/fbtusb/fbtdev.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/bluetooth/fbtusb/fbtdev.c [iso-8859-1] Sun Apr 12 12:24:01 2015
@@ -1042,7 +1042,7 @@
idleCallbackInfo = DeviceExtension->IdleCallbackInfo;
DeviceExtension->IdleCallbackInfo = NULL;
- idleIrp = (PIRP) InterlockedExchangePointer(&DeviceExtension->PendingIdleIrp,
NULL);
+ idleIrp = (PIRP)
InterlockedExchangePointer((PVOID*)&DeviceExtension->PendingIdleIrp, NULL);
InterlockedExchange(&DeviceExtension->IdleReqPend, 0);
KeReleaseSpinLock(&DeviceExtension->IdleReqStateLock, oldIrql);
@@ -1104,7 +1104,7 @@
if(!CanDeviceSuspend(DeviceExtension))
{
FreeBT_DbgPrint(3, ("Device is not idle\n"));
- irp = (PIRP) InterlockedExchangePointer(&DeviceExtension->PendingIdleIrp,
NULL);
+ irp = (PIRP)
InterlockedExchangePointer((PVOID*)&DeviceExtension->PendingIdleIrp, NULL);
}
@@ -1195,4 +1195,4 @@
return;
-}
+}
Modified: trunk/reactos/drivers/bluetooth/fbtusb/fbtpwr.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bluetooth/fbtusb/f…
==============================================================================
--- trunk/reactos/drivers/bluetooth/fbtusb/fbtpwr.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/bluetooth/fbtusb/fbtpwr.c [iso-8859-1] Sun Apr 12 12:24:01 2015
@@ -926,7 +926,8 @@
FreeBT_DbgPrint(3, ("FBTUSB: CancelWaitWake: Entered\n"));
- Irp = (PIRP) InterlockedExchangePointer(&DeviceExtension->WaitWakeIrp, NULL);
+ Irp = (PIRP)
InterlockedExchangePointer((PVOID*)&DeviceExtension->WaitWakeIrp,
+ NULL);
if(Irp)
{
IoCancelIrp(Irp);
@@ -957,7 +958,7 @@
// Nullify the WaitWakeIrp pointer-the Irp is released
// as part of the completion process. If it's already NULL,
// avoid race with the CancelWaitWake routine.
- if(InterlockedExchangePointer(&DeviceExtension->WaitWakeIrp, NULL))
+ if(InterlockedExchangePointer((PVOID*)&DeviceExtension->WaitWakeIrp, NULL))
{
PoStartNextPowerIrp(Irp);
Modified: trunk/reactos/drivers/serial/serial/devctrl.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/serial/serial/devc…
==============================================================================
--- trunk/reactos/drivers/serial/serial/devctrl.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/serial/serial/devctrl.c [iso-8859-1] Sun Apr 12 12:24:01 2015
@@ -832,7 +832,7 @@
IoMarkIrpPending(Irp);
WaitingIrp = InterlockedCompareExchangePointer(
- &DeviceExtension->WaitOnMaskIrp,
+ (PVOID*)&DeviceExtension->WaitOnMaskIrp,
Irp,
NULL);
Modified: trunk/reactos/drivers/storage/classpnp/autorun.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/storage/classpnp/a…
==============================================================================
--- trunk/reactos/drivers/storage/classpnp/autorun.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/storage/classpnp/autorun.c [iso-8859-1] Sun Apr 12 12:24:01
2015
@@ -160,7 +160,7 @@
// non-MMC-compliant devices also from sense codes.
//
- DBGTRACE(ClassDebugTrace, ("ClassSendEjectionNotification: media
EJECT_REQUEST"));
+ DBGTRACE(ClassDebugTrace, ("ClassSendEjectionNotification: media
EJECT_REQUEST"));
ClasspSendNotification(FdoExtension,
&GUID_IO_MEDIA_EJECT_REQUEST,
0,
@@ -412,7 +412,7 @@
&GUID_IO_GENERIC_GESN_EVENT,
sizeof(NOTIFICATION_EVENT_STATUS_HEADER) + dataLength,
Header)
-*/
+*/
switch (Header->NotificationClass) {
@@ -450,7 +450,7 @@
KeQuerySystemTime(&(externalData.SystemTime));
externalData.SystemTime.QuadPart *= (LONGLONG)KeQueryTimeIncrement();
- DBGTRACE(ClassDebugTrace, ("ClasspInterpretGesnData: media
DEVICE_EXTERNAL_REQUEST"));
+ DBGTRACE(ClassDebugTrace, ("ClasspInterpretGesnData: media
DEVICE_EXTERNAL_REQUEST"));
ClasspSendNotification(FdoExtension,
&GUID_IO_DEVICE_EXTERNAL_REQUEST,
sizeof(DEVICE_EVENT_EXTERNAL_REQUEST),
@@ -541,7 +541,7 @@
busyData.Estimated100msToReady
));
- DBGTRACE(ClassDebugTrace, ("ClasspInterpretGesnData: media
BECOMING_READY"));
+ DBGTRACE(ClassDebugTrace, ("ClasspInterpretGesnData: media
BECOMING_READY"));
ClasspSendNotification(FdoExtension,
&GUID_IO_DEVICE_BECOMING_READY,
sizeof(DEVICE_EVENT_BECOMING_READY),
@@ -555,7 +555,7 @@
}
- } // end switch on notification class
+ } // end switch on notification class
return;
}
@@ -660,7 +660,7 @@
sizeof(ULONG),
&data);
- }
+ }
else if (NewState == MediaNotPresent) {
DBGTRACE(ClassDebugTrace, ("ClasspInternalSetMediaChangeState: media
REMOVAL"));
@@ -858,12 +858,12 @@
PSENSE_DATA senseData = srb->SenseInfoBuffer;
- if ((senseData->SenseKey == SCSI_SENSE_NOT_READY) &&
+ if ((senseData->SenseKey == SCSI_SENSE_NOT_READY) &&
(senseData->AdditionalSenseCode == SCSI_ADSENSE_LUN_NOT_READY)){
srb->SrbStatus = SRB_STATUS_SUCCESS;
}
- }
-
+ }
+
//
// use ClassInterpretSenseInfo() to check for media state, and also
@@ -882,7 +882,7 @@
&status,
NULL);
- }
+ }
else {
fdoData->LoggedTURFailureSinceLastIO = FALSE;
@@ -910,7 +910,7 @@
status = STATUS_SUCCESS;
}
- if (!NT_SUCCESS(status)) {
+ if (!NT_SUCCESS(status)) {
DBGTRACE(ClassDebugMCN, ("ClasspMediaChangeDetectionCompletion: GESN
failed with status %x", status));
} else {
@@ -1067,7 +1067,7 @@
if (status == REMOVE_COMPLETE) {
ASSERT(status != REMOVE_COMPLETE);
return NULL;
- }
+ }
else if (status == REMOVE_PENDING) {
ClassReleaseRemoveLock(FdoExtension->DeviceObject, irp);
return NULL;
@@ -3363,7 +3363,7 @@
//
InterlockedExchange((PLONG)&info->CountDown, info->Period);
- workItem = InterlockedExchangePointer(&info->WorkQueueItem, NULL);
+ workItem = InterlockedExchangePointer((PVOID*)&info->WorkQueueItem, NULL);
if (ClasspCanSendPollingIrp(fdoExtension)) {
Modified: trunk/reactos/lib/3rdparty/libwine/debug_ros.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/3rdparty/libwine/debug…
==============================================================================
--- trunk/reactos/lib/3rdparty/libwine/debug_ros.c [iso-8859-1] (original)
+++ trunk/reactos/lib/3rdparty/libwine/debug_ros.c [iso-8859-1] Sun Apr 12 12:24:01 2015
@@ -5,7 +5,6 @@
#define free libwine_free
#define realloc libwine_realloc
#define _strdup libwine__strdup
-#define interlocked_xchg_add InterlockedExchangeAdd
#include "debug.c"
Modified: trunk/reactos/ntoskrnl/ke/ipi.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/ipi.c?rev=6717…
==============================================================================
--- trunk/reactos/ntoskrnl/ke/ipi.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/ke/ipi.c [iso-8859-1] Sun Apr 12 12:24:01 2015
@@ -178,7 +178,7 @@
{
while (0 !=
InterlockedCompareExchangeUL(&Prcb->SignalDone->TargetSet, 0, 0));
}
- (void)InterlockedExchangePointer(&Prcb->SignalDone, NULL);
+ (void)InterlockedExchangePointer((PVOID*)&Prcb->SignalDone, NULL);
}
#endif
return TRUE;
Modified: trunk/reactos/ntoskrnl/ps/kill.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ps/kill.c?rev=671…
==============================================================================
--- trunk/reactos/ntoskrnl/ps/kill.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/ps/kill.c [iso-8859-1] Sun Apr 12 12:24:01 2015
@@ -177,7 +177,7 @@
do
{
/* Write magic value and return the next entry to process */
- NextEntry = InterlockedExchangePointer(&PspReaperListHead.Flink,
+ NextEntry = InterlockedExchangePointer((PVOID*)&PspReaperListHead.Flink,
(PVOID)1);
ASSERT((NextEntry != NULL) && (NextEntry != (PVOID)1));
@@ -200,7 +200,7 @@
} while ((NextEntry != NULL) && (NextEntry != (PVOID)1));
/* Remove magic value, keep looping if it got changed */
- } while (InterlockedCompareExchangePointer(&PspReaperListHead.Flink,
+ } while (InterlockedCompareExchangePointer((PVOID*)&PspReaperListHead.Flink,
0,
(PVOID)1) != (PVOID)1);
}
Modified: trunk/reactos/ntoskrnl/ps/quota.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ps/quota.c?rev=67…
==============================================================================
--- trunk/reactos/ntoskrnl/ps/quota.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/ps/quota.c [iso-8859-1] Sun Apr 12 12:24:01 2015
@@ -428,7 +428,7 @@
QuotaBlock->QuotaEntry[2].Limit = PspDefaultQuotaBlock.QuotaEntry[2].Limit;
/* Try to exchange the quota block, if that failed, just drop it */
- OldQuotaBlock = InterlockedCompareExchangePointer(&Process->QuotaBlock,
+ OldQuotaBlock =
InterlockedCompareExchangePointer((PVOID*)&Process->QuotaBlock,
QuotaBlock,
&PspDefaultQuotaBlock);
if (OldQuotaBlock == &PspDefaultQuotaBlock)
Modified: trunk/reactos/win32ss/user/winsrv/consrv/frontends/gui/guiterm.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/winsrv/consrv…
==============================================================================
--- trunk/reactos/win32ss/user/winsrv/consrv/frontends/gui/guiterm.c [iso-8859-1]
(original)
+++ trunk/reactos/win32ss/user/winsrv/consrv/frontends/gui/guiterm.c [iso-8859-1] Sun Apr
12 12:24:01 2015
@@ -797,7 +797,7 @@
EnterCriticalSection(&GuiData->Lock);
GuiData->WindowSizeLock = TRUE;
- InterlockedExchangePointer(&GuiData->ActiveBuffer,
+ InterlockedExchangePointer((PVOID*)&GuiData->ActiveBuffer,
ConDrvGetActiveScreenBuffer(GuiData->Console));
GuiData->WindowSizeLock = FALSE;
@@ -867,7 +867,7 @@
EnterCriticalSection(&GuiData->Lock);
GuiData->WindowSizeLock = TRUE;
- InterlockedExchangePointer(&GuiData->ActiveBuffer, NULL);
+ InterlockedExchangePointer((PVOID*)&GuiData->ActiveBuffer, NULL);
GuiData->WindowSizeLock = FALSE;
LeaveCriticalSection(&GuiData->Lock);