VirtualBox

Changeset 91112 in vbox for trunk/src/VBox/Main


Ignore:
Timestamp:
Sep 3, 2021 10:58:51 PM (3 years ago)
Author:
vboxsync
Message:

HGCM: Use RTAvlU32 instead of RTAvlUL for the handle management, as it's a better type fit.

Location:
trunk/src/VBox/Main
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/include/HGCMObjects.h

    r82968 r91112  
    3131typedef struct _ObjectAVLCore
    3232{
    33     AVLULNODECORE AvlCore;
     33    AVLU32NODECORE AvlCore;
    3434    HGCMObject *pSelf;
    3535} ObjectAVLCore;
  • trunk/src/VBox/Main/src-client/HGCMObjects.cpp

    r82968 r91112  
    3636static uint32_t volatile g_u32ClientHandleCount;
    3737
    38 static PAVLULNODECORE g_pTree;
     38static PAVLU32NODECORE g_pTree;
    3939
    4040
     
    123123            pCore->AvlCore.Key = Key;
    124124
    125             bool fRC = RTAvlULInsert(&g_pTree, &pCore->AvlCore);
     125            bool fRC = RTAvlU32Insert(&g_pTree, &pCore->AvlCore);
    126126
    127127            /* Could not insert a handle. */
     
    185185        if (RT_SUCCESS(rc))
    186186        {
    187             ObjectAVLCore *pCore = (ObjectAVLCore *)RTAvlULRemove(&g_pTree, handle);
     187            ObjectAVLCore *pCore = (ObjectAVLCore *)RTAvlU32Remove(&g_pTree, handle);
    188188
    189189            if (pCore)
     
    220220    if (RT_SUCCESS(rc))
    221221    {
    222         ObjectAVLCore *pCore = (ObjectAVLCore *)RTAvlULGet(&g_pTree, handle);
     222        ObjectAVLCore *pCore = (ObjectAVLCore *)RTAvlU32Get(&g_pTree, handle);
    223223
    224224        Assert(!pCore || (pCore->pSelf && pCore->pSelf->Type() == enmObjType));
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