VirtualBox

Ignore:
Timestamp:
Nov 26, 2018 3:44:41 PM (6 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
126937
Message:

HGCM: Replace C++-style inline members on VBOXHGCMSVCPARM with simple functions.
bugref:9172: Shared folder performance tuning
Changes in bugref:9172 caused a build regression on Ubuntu 18.10 due to the
use of RT_ZERO on a structure containing an embedded VBOXHGCMSVCPARM, as
VBOXHGCMSVCPARM had member functions and was therefore not a simple plain-
old-data structure. Rather than just doing the sensible thing and zeroing
it in a different way, I converted the inline member getters and setters to
standard inline C functions, including fixing callers. Actually I had planned
this for some time, as the member function use seemed a bit gratuitous in
hindsight.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostServices/GuestControl/testcase/tstGuestControlSvc.cpp

    r75500 r75737  
    152152
    153153    VBOXHGCMSVCPARM aParms[1];
    154     aParms[0].setUInt32(1000 /* Context ID */);
     154    HGCMSvcSetU32(&aParms[0], 1000 /* Context ID */);
    155155
    156156    CMDHOST aCmdHostAll[] =
     
    208208        /* No commands from host yet. */
    209209        VBOXHGCMSVCPARM aParmsGuest[8];
    210         aParmsGuest[0].setUInt32(0 /* Msg type */);
    211         aParmsGuest[1].setUInt32(0 /* Parameters */);
     210        HGCMSvcSetU32(&aParmsGuest[0], 0 /* Msg type */);
     211        HGCMSvcSetU32(&aParmsGuest[1], 0 /* Parameters */);
    212212        pTable->pfnCall(pTable->pvService, &callHandle, 1 /* Client ID */, NULL /* pvClient */,
    213213                        GUEST_MSG_WAIT, 2, &aParmsGuest[0], 0);
     
    216216        /* Host: Add a dummy command. */
    217217        VBOXHGCMSVCPARM aParmsHost[8];
    218         aParmsHost[0].setUInt32(1000 /* Context ID */);
    219         aParmsHost[1].setString("foo.bar");
    220         aParmsHost[2].setString("baz");
     218        HGCMSvcSetU32(&aParmsHost[0], 1000 /* Context ID */);
     219        HGCMSvcSetStr(&aParmsHost[1], "foo.bar");
     220        HGCMSvcSetStr(&aParmsHost[2], "baz");
    221221
    222222        rc = pTable->pfnHostCall(pTable->pvService, HOST_EXEC_CMD, 3, &aParmsHost[0]);
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