VirtualBox

Ignore:
Timestamp:
May 12, 2010 9:50:16 PM (15 years ago)
Author:
vboxsync
Message:

Guest Control/VBoxService: Added support for cancel pending (blocking) calls; added support for properly stopping + shutting down main thread.

File:
1 edited

Legend:

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

    r28887 r29438  
    103103 *                          in a second call to the host.
    104104 */
    105 VBGLR3DECL(int) VbglR3GuestCtrlGetHostMsg(uint32_t u32ClientId, uint32_t *puMsg, uint32_t *puNumParms, uint32_t u32Timeout)
     105VBGLR3DECL(int) VbglR3GuestCtrlGetHostMsg(uint32_t u32ClientId, uint32_t *puMsg, uint32_t *puNumParms)
    106106{
    107107    AssertPtr(puMsg);
     
    127127                rc = Msg.hdr.result;
    128128                /* Ok, so now we know what message type and how much parameters there are. */
     129    }
     130    return rc;
     131}
     132
     133
     134/**
     135 * Asks the host to cancel (release) all pending waits which were deferred.
     136 *
     137 * @returns VBox status code.
     138 * @param   u32ClientId     The client id returned by VbglR3GuestCtrlConnect().
     139 */
     140VBGLR3DECL(int) VbglR3GuestCtrlCancelPendingWaits(uint32_t u32ClientId)
     141{
     142    VBoxGuestCtrlHGCMMsgCancelPendingWaits Msg;
     143
     144    Msg.hdr.result = VERR_WRONG_ORDER;
     145    Msg.hdr.u32ClientID = u32ClientId;
     146    Msg.hdr.u32Function = GUEST_CANCEL_PENDING_WAITS;
     147    Msg.hdr.cParms = 0;
     148
     149    int rc = vbglR3DoIOCtl(VBOXGUEST_IOCTL_HGCM_CALL(sizeof(Msg)), &Msg, sizeof(Msg));
     150    if (RT_SUCCESS(rc))
     151    {
     152        int rc2 = Msg.hdr.result;
     153        if (RT_FAILURE(rc2))
     154            rc = rc2;
    129155    }
    130156    return rc;
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