VirtualBox

Changeset 14264 in vbox


Ignore:
Timestamp:
Nov 17, 2008 5:49:17 PM (16 years ago)
Author:
vboxsync
Message:

VBoxGuest.cpp: @todo r=bird: merge callback code.

File:
1 edited

Legend:

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

    r14223 r14264  
    919919}
    920920
    921 #ifdef HGCM_TIMEOUT
     921
     922# ifdef HGCM_TIMEOUT
    922923/**
    923924 * This is a callback for dealing with async waits with a timeout.
    924925 *
    925926 * It operates in a manner similar to VBoxGuestCommonIOCtl_WaitEvent.
     927 * @todo r=bird: merge VBoxGuestHGCMAsyncWaitCallbackTimeout into
     928 *       VBoxGuestHGCMAsyncWaitCallback, either by using a stack argument or
     929 *       (better) create a common worker for them
    926930 */
    927931static DECLCALLBACK(void)
    928 VBoxGuestHGCMAsyncWaitCallbackTimeout(VMMDevHGCMRequestHeader *pHdrNonVolatile, void *pvUser,
    929                                       uint32_t u32User)
     932VBoxGuestHGCMAsyncWaitCallbackTimeout(VMMDevHGCMRequestHeader *pHdrNonVolatile, void *pvUser, uint32_t u32User)
    930933{
    931934    VMMDevHGCMRequestHeader volatile *pHdr = (VMMDevHGCMRequestHeader volatile *)pHdrNonVolatile;
     
    991994    RTSpinlockReleaseNoInts(pDevExt->WaitSpinlock, &Tmp);
    992995}
    993 #endif /* HGCM_TIMEOUT */
     996# endif /* HGCM_TIMEOUT */
    994997
    995998
     
    10961099
    10971100
     1101/** @remarks Identical to VBoxGuestCommonIOCtl_HGCMCallTimeout. */
    10981102static int VBoxGuestCommonIOCtl_HGCMCall(PVBOXGUESTDEVEXT pDevExt, PVBOXGUESTSESSION pSession, VBoxGuestHGCMCallInfo *pInfo,
    10991103                                         size_t cbData, size_t *pcbDataReturned)
     
    11531157
    11541158
    1155 #ifdef HGCM_TIMEOUT
     1159# ifdef HGCM_TIMEOUT
     1160/** @remarks Identical to VBoxGuestCommonIOCtl_HGCMCall. */
    11561161static int VBoxGuestCommonIOCtl_HGCMCallTimeout(PVBOXGUESTDEVEXT pDevExt, PVBOXGUESTSESSION pSession, VBoxGuestHGCMCallInfoTimeout *pInfoTimeout,
    1157                                          size_t cbData, size_t *pcbDataReturned)
     1162                                                size_t cbData, size_t *pcbDataReturned)
    11581163{
    11591164    VBoxGuestHGCMCallInfo *pInfo = &pInfoTimeout->info;
     
    12101215    return rc;
    12111216}
    1212 #endif /* HGCM_TIMEOUT */
     1217# endif /* HGCM_TIMEOUT */
    12131218
    12141219
     
    12541259    Info.result = (uint32_t)VERR_WRONG_ORDER;
    12551260
    1256     rc = VbglHGCMConnect(&Info,VBoxGuestHGCMAsyncWaitCallback, pDevExt, 0);
     1261    rc = VbglHGCMConnect(&Info, VBoxGuestHGCMAsyncWaitCallback, pDevExt, 0);
    12571262    if (RT_FAILURE(rc))
    12581263    {
     
    13641369        rc = VBoxGuestCommonIOCtl_HGCMCall(pDevExt, pSession, (VBoxGuestHGCMCallInfo *)pvData, cbData, pcbDataReturned);
    13651370    }
    1366 #ifdef HGCM_TIMEOUT
     1371# ifdef HGCM_TIMEOUT
    13671372    else if (VBOXGUEST_IOCTL_STRIP_SIZE(iFunction) == VBOXGUEST_IOCTL_STRIP_SIZE(VBOXGUEST_IOCTL_HGCM_CALL_TIMEOUT(0)))
    13681373    {
    1369         CHECKRET_MIN_SIZE("HGCM_CALL", sizeof(VBoxGuestHGCMCallInfoTimeout));
     1374        CHECKRET_MIN_SIZE("HGCM_CALL_TIMEOUT", sizeof(VBoxGuestHGCMCallInfoTimeout));
    13701375        rc = VBoxGuestCommonIOCtl_HGCMCallTimeout(pDevExt, pSession, (VBoxGuestHGCMCallInfoTimeout *)pvData, cbData, pcbDataReturned);
    13711376    }
    1372 #endif /* HGCM_TIMEOUT */
     1377# endif /* HGCM_TIMEOUT */
    13731378#endif /* VBOX_WITH_HGCM */
    13741379    else if (VBOXGUEST_IOCTL_STRIP_SIZE(iFunction) == VBOXGUEST_IOCTL_STRIP_SIZE(VBOXGUEST_IOCTL_LOG(0)))
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