VirtualBox

Changeset 8746 in vbox for trunk/include


Ignore:
Timestamp:
May 9, 2008 7:34:44 PM (17 years ago)
Author:
vboxsync
Message:

Updates to the async completion manager. PDMR3AsyncCompletionTaskSubmit takes an array of tasks now to minimize overhead of the wakeups

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/pdmasynccompletion.h

    r8155 r8746  
    265265
    266266/**
    267  * Start processing the task handle.
    268  * The task must have a type specific context.
    269  *
    270  * @returns VBox status code.
    271  * @param   pTask   Pointer to the task which should be submited.
    272  */
    273 PDMR3DECL(int) PDMR3AsyncCompletionTaskSubmit(PPDMASYNCCOMPLETIONTASK pTask);
     267 * Submit an array of tasks for processing
     268 * The tasks must have a type specific context.
     269 *
     270 * @returns VBox status code.
     271 * @param   apTasks  Array of tasks which should be processed.
     272 * @param   cTasks   Number of tasks in the array which should be processed.
     273 */
     274PDMR3DECL(int) PDMR3AsyncCompletionTaskSubmit(PPDMASYNCCOMPLETIONTASK apTasks[], unsigned cTasks);
    274275
    275276/**
     
    355356    }
    356357
    357     rc = PDMR3AsyncCompletionTaskSubmit(pTask);
    358     if (VBOX_FAILURE(rc))
    359     {
    360         AssertMsgFailed(("Submitting Linux task failed\n"));
    361         PDMR3AsyncCompletionTaskDestroy(pTask);
    362         return rc;
    363     }
    364 
    365358    *ppTask = pTask;
    366359
     
    397390    }
    398391
    399     rc = PDMR3AsyncCompletionTaskSubmit(pTask);
    400     if (VBOX_FAILURE(rc))
    401     {
    402         AssertMsgFailed(("Submitting AIO task failed\n"));
    403         PDMR3AsyncCompletionTaskDestroy(pTask);
    404         return rc;
    405     }
    406 
    407392    *ppTask = pTask;
    408393
     
    435420    }
    436421
    437     rc = PDMR3AsyncCompletionTaskSubmit(pTask);
    438     if (VBOX_FAILURE(rc))
    439     {
    440         AssertMsgFailed(("Submitting OS/2 task failed\n"));
    441         PDMR3AsyncCompletionTaskDestroy(pTask);
    442         return rc;
    443     }
    444 
    445422    *ppTask = pTask;
    446423
     
    470447    {
    471448        AssertMsgFailed(("Creating Windows task failed\n"));
    472         return rc;
    473     }
    474 
    475     rc = PDMR3AsyncCompletionTaskSubmit(pTask);
    476     if (VBOX_FAILURE(rc))
    477     {
    478         AssertMsgFailed(("Submitting Windows task failed\n"));
    479         PDMR3AsyncCompletionTaskDestroy(pTask);
    480449        return rc;
    481450    }
     
    536505    }
    537506
    538     rc = PDMR3AsyncCompletionTaskSubmit(pTask);
    539     if (VBOX_FAILURE(rc))
    540     {
    541         AssertMsgFailed(("Submitting Socket task failed\n"));
    542         PDMR3AsyncCompletionTaskDestroy(pTask);
    543         return rc;
    544     }
    545 
    546507    *ppTask = pTask;
    547508
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette