VirtualBox

Changeset 75863 in vbox for trunk


Ignore:
Timestamp:
Dec 2, 2018 12:43:41 AM (6 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
127067
Message:

Main/Guest: Added a few codereview comments, mainly in the guest base class area. Replaced the object ID management in GuestSession with a classic allocation bitmap approach as that's much less memory intensive than 16 byte structs in a insert-only std::map and an additional map tracking free 32-bit IDs after we run out. bugref:9313 [build fix]

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

Legend:

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

    r75861 r75863  
    257257     *  The key specifies the (global) context ID. */
    258258    typedef std::map <uint32_t, SessionObject> SessionObjects;
    259     /** Queue containing context IDs which are no longer in use.
    260      *  Useful for quickly retrieving a new, unused context ID. */
    261     typedef std::deque <uint32_t>              SessionObjectsFree;
    262259
    263260public:
  • trunk/src/VBox/Main/src-client/GuestCtrlImpl.cpp

    r75862 r75863  
    169169         */
    170170        bool fDispatch = true;
     171        rc = VERR_INVALID_FUNCTION;
    171172        if (   pCtxCb->uFunction == GUEST_EXEC_STATUS
    172173            && pSvcCb->mParms    >= 5)
     
    185186                Assert(dataCb.uPID == 0);
    186187                fDispatch = false;
    187                 rc = VINF_SUCCESS;
    188188            }
    189189        }
     
    220220            }
    221221        }
    222         else
    223             rc = VERR_INVALID_FUNCTION;
    224222    }
    225223    else
  • trunk/src/VBox/Main/src-client/GuestCtrlPrivate.cpp

    r75861 r75863  
    12621262 *                                  for this event. Optional.
    12631263 */
    1264 int GuestBase::waitForEvent(GuestWaitEvent *pEvent, uint32_t msTimeout, VBoxEventType_T *pType, IEvent **ppEvent)
    1265 {
    1266     AssertPtrReturn(pEvent, VERR_INVALID_POINTER);
     1264int GuestBase::waitForEvent(GuestWaitEvent *pWaitEvt, uint32_t msTimeout, VBoxEventType_T *pType, IEvent **ppEvent)
     1265{
     1266    AssertPtrReturn(pWaitEvt, VERR_INVALID_POINTER);
    12671267    /* pType is optional. */
    12681268    /* ppEvent is optional. */
    12691269
    1270     int vrc = pEvent->Wait(msTimeout);
     1270    int vrc = pWaitEvt->Wait(msTimeout);
    12711271    if (RT_SUCCESS(vrc))
    12721272    {
    1273         const ComPtr<IEvent> pThisEvent = pEvent->Event();
     1273        const ComPtr<IEvent> pThisEvent = pWaitEvt->Event();
    12741274        if (pThisEvent.isNotNull()) /* Having a VBoxEventType_ event is optional. */ /** @todo r=bird: misplaced comment? */
    12751275        {
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