Updated IoIsSystemThread() prototype.
[reactos.git] / include / ddk / iofuncs.h
index 595b33e..b2cd827 100644 (file)
@@ -757,10 +757,11 @@ STDCALL
 IoIsOperationSynchronous (
        IN      PIRP    Irp
        );
+typedef struct _ETHREAD *PETHREAD;
 BOOLEAN
 STDCALL
 IoIsSystemThread (
-       PVOID   Unknown0
+       IN PETHREAD Thread
        );
 PIRP
 STDCALL
@@ -936,16 +937,20 @@ IoReportResourceUsage (
        (KeInsertQueueDpc(&(DeviceObject)->Dpc,(Irp),(Context)))
 
 #define IoSetCancelRoutine(Irp,NewCancelRoutine) \
-       ((PDRIVER_CANCEL)InterlockedExchange((PULONG)&(Irp)->CancelRoutine, \
-                                            (ULONG)(NewCancelRoutine)))
+       ((PDRIVER_CANCEL)InterlockedExchangePointer(&(Irp)->CancelRoutine, \
+                                            NewCancelRoutine))
 
-#define IoSetCompletionRoutine(Irp,Routine,Context,Success,Error,Cancel) \
+// AG: Context is now NewContext, otherwise we end up with this:
+// param->LocalLength=(LocalLength)
+// ...which isn't possible.
+
+#define IoSetCompletionRoutine(Irp,Routine,NewContext,Success,Error,Cancel) \
        { \
                PIO_STACK_LOCATION param; \
                assert((Success)||(Error)||(Cancel)?(Routine)!=NULL:TRUE); \
                param = IoGetNextIrpStackLocation((Irp)); \
                param->CompletionRoutine=(Routine); \
-               param->CompletionContext=(Context); \
+               param->Context=(NewContext); \
                param->Control = 0; \
                if ((Success)) \
                        param->Control = SL_INVOKE_ON_SUCCESS; \
@@ -1139,15 +1144,6 @@ IofCompleteRequest (
 
 /* --- EXPORTED BY HAL --- */
 
-VOID
-STDCALL
-IoAssignDriveLetters (
-       IN      PLOADER_PARAMETER_BLOCK LoaderBlock,
-       IN      PSTRING                 NtDeviceName,
-       OUT     PUCHAR                  NtSystemPath,
-       OUT     PSTRING                 NtSystemPathString
-       );
-
 BOOLEAN
 STDCALL
 IoFlushAdapterBuffers (