(Irp->IoStatus.Information == IO_REPARSE_TAG_MOUNT_POINT))
{
/* We should never get this yet */
- DPRINT1("Reparse support not yet present!\n");
- while (TRUE);
+ UNIMPLEMENTED_DBGBREAK("Reparse support not yet present!\n");
+ return;
}
}
/* Check if we should charge quota */
if (ChargeQuota)
{
- /* Irp = ExAllocatePoolWithQuotaTag(NonPagedPool, Size, TAG_IRP); */
- /* FIXME */
- Irp = ExAllocatePoolWithTag(NonPagedPool, Size, TAG_IRP);
+ Irp = ExAllocatePoolWithQuotaTag(NonPagedPool | POOL_QUOTA_FAIL_INSTEAD_OF_RAISE,
+ Size,
+ TAG_IRP);
}
else
{
- /* Allocate the IRP With no Quota charge */
+ /* Allocate the IRP with no quota charge */
Irp = ExAllocatePoolWithTag(NonPagedPool, Size, TAG_IRP);
}
/* Make sure it was sucessful */
- if (!Irp) return(NULL);
+ if (!Irp) return NULL;
}
else
{
return Irp;
}
+/*
+ * @implemented
+ */
+PIRP
+NTAPI
+IopAllocateIrpMustSucceed(IN CCHAR StackSize)
+{
+ LONG i;
+ PIRP Irp;
+ LARGE_INTEGER Sleep;
+
+ /* Try to get an IRP */
+ Irp = IoAllocateIrp(StackSize, FALSE);
+ if (Irp)
+ return Irp;
+
+ /* If we fail, start looping till we may get one */
+ i = LONG_MAX;
+ do {
+ i--;
+
+ /* First, sleep for 10ms */
+ Sleep.QuadPart = -10 * 1000 * 10;;
+ KeDelayExecutionThread(KernelMode, FALSE, &Sleep);
+
+ /* Then, retry allocation */
+ Irp = IoAllocateIrp(StackSize, FALSE);
+ if (Irp)
+ return Irp;
+ } while (i > 0);
+
+ return Irp;
+}
+
/*
* @implemented
*/
PriorityBoost);
#else
/* Not implemented yet. */
- DPRINT1("Not supported!\n");
- while (TRUE);
+ UNIMPLEMENTED_DBGBREAK("Not supported!\n");
#endif
}