return gcvSTATUS_OK;
OnError:
-
/* Roll back. */
if (mmu != gcvNULL)
{
/* Not enough pages avaiable. */
gcmkONERROR(gcvSTATUS_OUT_OF_RESOURCES);
}
-
+
/* Grab the mutex. */
gcmkONERROR(gckOS_AcquireMutex(Mmu->os, Mmu->pageTableMutex, gcvINFINITE));
mutex = gcvTRUE;
return gcvSTATUS_OK;
OnError:
-
if (mutex)
{
/* Release the mutex. */
gcmkHEADER_ARG("Mmu=0x%x PageTable=0x%x PageCount=%lu",
Mmu, PageTable, PageCount);
-
/* Verify the arguments. */
gcmkVERIFY_OBJECT(Mmu, gcvOBJ_MMU);
gcmkVERIFY_ARGUMENT(PageTable != gcvNULL);
if (!signal->manualReset && timeout == 0) timeout = 1;
rc = wait_for_completion_interruptible_timeout(&signal->event, timeout);
+
+#if 1 // dkm : avoid return OK when timeout in kernel3.0
+ status = (rc == 0) ? gcvSTATUS_TIMEOUT : gcvSTATUS_OK;
+#else
status = ((rc == 0) && !signal->event.done) ? gcvSTATUS_TIMEOUT
: gcvSTATUS_OK;
+#endif
/* Return status. */
gcmkFOOTER();