VirtualBox

Changeset 64432 in vbox


Ignore:
Timestamp:
Oct 26, 2016 4:57:32 PM (8 years ago)
Author:
vboxsync
Message:

HostDrivers/Darwin,VBoxGuest/Darwin: Some notes about why we don't require to call task_reference() in initWithTask()

Location:
trunk/src/VBox
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/common/VBoxGuest/VBoxGuest-darwin.cpp

    r63516 r64432  
    984984    if (IOUserClient::initWithTask(OwningTask, pvSecurityId , u32Type))
    985985    {
     986        /*
     987         * In theory we have to call task_reference() to make sure that the task is
     988         * valid during the lifetime of this object. The pointer is only used to check
     989         * for the context this object is called in though and never dereferenced
     990         * or passed to anything which might, so we just skip this step.
     991         */
    986992        m_Task = OwningTask;
    987993        m_pSession = NULL;
  • trunk/src/VBox/HostDrivers/Support/darwin/SUPDrv-darwin.cpp

    r63510 r64432  
    16601660    if (IOUserClient::initWithTask(OwningTask, pvSecurityId , u32Type))
    16611661    {
     1662        /*
     1663         * In theory we have to call task_reference() to make sure that the task is
     1664         * valid during the lifetime of this object. The pointer is only used to check
     1665         * for the context this object is called in though and never dereferenced
     1666         * or passed to anything which might, so we just skip this step.
     1667         */
    16621668        m_Task = OwningTask;
    16631669        m_pSession = NULL;
  • trunk/src/VBox/HostDrivers/VBoxUSB/darwin/VBoxUSB.cpp

    r63511 r64432  
    599599    if (IOUserClient::initWithTask(OwningTask, pvSecurityId , u32Type))
    600600    {
     601        /*
     602         * In theory we have to call task_reference() to make sure that the task is
     603         * valid during the lifetime of this object. The pointer is only used to check
     604         * for the context this object is called in though and never dereferenced
     605         * or passed to anything which might, so we just skip this step.
     606         */
    601607        m_pProvider = NULL;
    602608        m_Task = OwningTask;
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