VirtualBox

Changeset 19093 in vbox


Ignore:
Timestamp:
Apr 21, 2009 9:24:10 PM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
46242
Message:

SysHlp.cpp: No need to check in vbglUnlockLinear, NIL_RTRTR0MEMOBJ doesn't need to 0, and finally, it's not ugly, just necessary.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/common/VBoxGuestLib/SysHlp.cpp

    r19091 r19093  
    3636    int rc = VINF_SUCCESS;
    3737
    38     /* Ugly edge case - zero size buffers shouldn't be locked. */
     38    /* Zero size buffers shouldn't be locked. */
    3939    if (u32Size == 0)
    4040    {
     41        Assert(pv == NULL);
     42#ifdef RT_OS_WINDOWS
     43        *ppvCtx = NULL;
     44#else
    4145        *ppvCtx = NIL_RTR0MEMOBJ;
    42         return VINF_SUCCESS;
    43     }
     46#endif
     47        return VINF_SUCCESS;
     48    }
     49
    4450#ifdef RT_OS_WINDOWS
    4551    PMDL pMdl = IoAllocateMdl (pv, u32Size, FALSE, FALSE, NULL);
     
    7783     * r=michael: on Linux, we sometimes have R3 addresses (e.g. shared
    7884     *  clipboard) and sometimes R0 (e.g. shared folders).  We really ought
    79      *  to have two separate paths here - at any rate, Linux R0 shouldn't 
     85     *  to have two separate paths here - at any rate, Linux R0 shouldn't
    8086     *  end up calling this API.  In practice, Linux R3 does it's own thing
    8187     *  before winding up in the R0 path - which calls this stub API.
     
    104110    NOREF(u32Size);
    105111
    106     /* Ugly edge case - zero size buffers aren't be locked. */
    107     if (pvCtx == NIL_RTR0MEMOBJ)
    108         return;
    109112#ifdef RT_OS_WINDOWS
    110113    PMDL pMdl = (PMDL)pvCtx;
Note: See TracChangeset for help on using the changeset viewer.

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