VirtualBox

Changeset 32449 in vbox


Ignore:
Timestamp:
Sep 13, 2010 2:27:19 PM (14 years ago)
Author:
vboxsync
Message:

common/VBoxGuest: Addressed the deferred wake-up requirements of Solaris and Windows. Uses RTList instead of custom linking code. (untested)

Location:
trunk/src/VBox/Additions/common/VBoxGuest
Files:
4 edited

Legend:

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

    r32349 r32449  
    682682    pDevExt->pIrqAckEvents = NULL;
    683683    pDevExt->PhysIrqAckEvents = NIL_RTCCPHYS;
    684     pDevExt->WaitList.pHead = NULL;
    685     pDevExt->WaitList.pTail = NULL;
     684    RTListInit(&pDevExt->WaitList);
    686685#ifdef VBOX_WITH_HGCM
    687     pDevExt->HGCMWaitList.pHead = NULL;
    688     pDevExt->HGCMWaitList.pTail = NULL;
     686    RTListInit(&pDevExt->HGCMWaitList);
    689687#endif
    690     pDevExt->FreeList.pHead = NULL;
    691     pDevExt->FreeList.pTail = NULL;
     688#ifdef VBOXGUEST_USE_DEFERRED_WAKE_UP
     689    RTListInit(&pDevExt->WakeUpList);
     690#endif
     691    RTListInit(&pDevExt->WokenUpList);
     692    RTListInit(&pDevExt->FreeList);
    692693    pDevExt->f32PendingEvents = 0;
    693694    pDevExt->u32MousePosChangedSeq = 0;
     
    807808/**
    808809 * Deletes all the items in a wait chain.
    809  * @param   pWait       The head of the chain.
    810  */
    811 static void VBoxGuestDeleteWaitList(PVBOXGUESTWAITLIST pList)
    812 {
    813     while (pList->pHead)
     810 * @param   pList       The head of the chain.
     811 */
     812static void VBoxGuestDeleteWaitList(PRTLISTNODE pList)
     813{
     814    while (!RTListIsEmpty(pList))
    814815    {
    815816        int             rc2;
    816         PVBOXGUESTWAIT  pWait = pList->pHead;
    817         pList->pHead = pWait->pNext;
    818 
    819         pWait->pNext = NULL;
    820         pWait->pPrev = NULL;
     817        PVBOXGUESTWAIT  pWait = RTListNodeGetFirst(pList, VBOXGUESTWAIT, ListNode);
     818        RTListNodeRemove(&pWait->ListNode);
     819
    821820        rc2 = RTSemEventMultiDestroy(pWait->Event); AssertRC(rc2);
    822821        pWait->Event = NIL_RTSEMEVENTMULTI;
     
    824823        RTMemFree(pWait);
    825824    }
    826     pList->pHead = NULL;
    827     pList->pTail = NULL;
    828825}
    829826
     
    862859    VBoxGuestDeleteWaitList(&pDevExt->HGCMWaitList);
    863860#endif
     861#ifdef VBOXGUEST_USE_DEFERRED_WAKE_UP
     862    VBoxGuestDeleteWaitList(&pDevExt->WakeUpList);
     863#endif
     864    VBoxGuestDeleteWaitList(&pDevExt->WokenUpList);
    864865    VBoxGuestDeleteWaitList(&pDevExt->FreeList);
    865866
     
    968969
    969970/**
    970  * Links the wait-for-event entry into the tail of the given list.
    971  *
    972  * @param   pList           The list to link it into.
    973  * @param   pWait           The wait for event entry to append.
    974  */
    975 DECLINLINE(void) VBoxGuestWaitAppend(PVBOXGUESTWAITLIST pList, PVBOXGUESTWAIT pWait)
    976 {
    977     const PVBOXGUESTWAIT pTail = pList->pTail;
    978     pWait->pNext = NULL;
    979     pWait->pPrev = pTail;
    980     if (pTail)
    981         pTail->pNext = pWait;
    982     else
    983         pList->pHead = pWait;
    984     pList->pTail = pWait;
    985 }
    986 
    987 
    988 /**
    989  * Unlinks the wait-for-event entry.
    990  *
    991  * @param   pList           The list to unlink it from.
    992  * @param   pWait           The wait for event entry to unlink.
    993  */
    994 DECLINLINE(void) VBoxGuestWaitUnlink(PVBOXGUESTWAITLIST pList, PVBOXGUESTWAIT pWait)
    995 {
    996     const PVBOXGUESTWAIT pPrev = pWait->pPrev;
    997     const PVBOXGUESTWAIT pNext = pWait->pNext;
    998     if (pNext)
    999         pNext->pPrev = pPrev;
    1000     else
    1001         pList->pTail = pPrev;
    1002     if (pPrev)
    1003         pPrev->pNext = pNext;
    1004     else
    1005         pList->pHead = pNext;
    1006 }
    1007 
    1008 
    1009 /**
    1010  * Allocates a wiat-for-event entry.
     971 * Allocates a wait-for-event entry.
    1011972 *
    1012973 * @returns The wait-for-event entry.
     
    1019980     * Allocate it one way or the other.
    1020981     */
    1021     PVBOXGUESTWAIT pWait = pDevExt->FreeList.pTail;
     982    PVBOXGUESTWAIT pWait = RTListNodeGetFirst(&pDevExt->FreeList, VBOXGUESTWAIT, ListNode);
    1022983    if (pWait)
    1023984    {
     
    1025986        RTSpinlockAcquireNoInts(pDevExt->EventSpinlock, &Tmp);
    1026987
    1027         pWait = pDevExt->FreeList.pTail;
     988        pWait = RTListNodeGetFirst(&pDevExt->FreeList, VBOXGUESTWAIT, ListNode);
    1028989        if (pWait)
    1029             VBoxGuestWaitUnlink(&pDevExt->FreeList, pWait);
     990            RTListNodeRemove(&pWait->ListNode);
    1030991
    1031992        RTSpinlockReleaseNoInts(pDevExt->EventSpinlock, &Tmp);
     
    10521013            return NULL;
    10531014        }
     1015
     1016        pWait->ListNode.pNext = NULL;
     1017        pWait->ListNode.pPrev = NULL;
    10541018    }
    10551019
     
    10571021     * Zero members just as an precaution.
    10581022     */
    1059     pWait->pNext = NULL;
    1060     pWait->pPrev = NULL;
    10611023    pWait->fReqEvents = 0;
    10621024    pWait->fResEvents = 0;
     1025#ifdef VBOXGUEST_USE_DEFERRED_WAKE_UP
     1026    pWait->fPendingWakeUp = false;
     1027    pWait->fFreeMe = false;
     1028#endif
    10631029    pWait->pSession = pSession;
    10641030#ifdef VBOX_WITH_HGCM
     
    10721038/**
    10731039 * Frees the wait-for-event entry.
    1074  * The caller must own the wait spinlock!
     1040 *
     1041 * The caller must own the wait spinlock !
     1042 * The entry must be in a list!
    10751043 *
    10761044 * @param   pDevExt         The device extension.
     
    10841052    pWait->pHGCMReq = NULL;
    10851053#endif
    1086     VBoxGuestWaitAppend(&pDevExt->FreeList, pWait);
     1054#ifdef VBOXGUEST_USE_DEFERRED_WAKE_UP
     1055    Assert(!pWait->fFreeMe);
     1056    if (pWait->fPendingWakeUp)
     1057        pWait->fFreeMe = true;
     1058    else
     1059#endif
     1060    {
     1061        RTListNodeRemove(&pWait->ListNode);
     1062        RTListAppend(&pDevExt->FreeList, &pWait->ListNode);
     1063    }
    10871064}
    10881065
     
    11011078    RTSpinlockReleaseNoInts(pDevExt->EventSpinlock, &Tmp);
    11021079}
     1080
     1081
     1082#ifdef VBOXGUEST_USE_DEFERRED_WAKE_UP
     1083/**
     1084 * Processes the wake-up list.
     1085 *
     1086 * All entries in the wake-up list gets signalled and moved to the woken-up
     1087 * list.
     1088 *
     1089 * @param   pDevExt         The device extension.
     1090 */
     1091void VBoxGuestWaitDoWakeUps(PVBOXGUESTDEVEXT pDevExt)
     1092{
     1093    if (!RTListIsEmpty(&pDevExt->WakeUpList))
     1094    {
     1095        RTSPINLOCKTMP Tmp = RTSPINLOCKTMP_INITIALIZER;
     1096        RTSpinlockAcquireNoInts(pDevExt->EventSpinlock, &Tmp);
     1097        for (;;)
     1098        {
     1099            int            rc;
     1100            PVBOXGUESTWAIT pWait = RTListNodeGetFirst(&pDevExt->WakeUpList, VBOXGUESTWAIT, ListNode);
     1101            if (!pWait)
     1102                break;
     1103            pWait->fPendingWakeUp = true;
     1104            RTSpinlockReleaseNoInts(pDevExt->EventSpinlock, &Tmp);
     1105
     1106            rc = RTSemEventMultiSignal(pWait->Event);
     1107            AssertRC(rc);
     1108
     1109            RTSpinlockAcquireNoInts(pDevExt->EventSpinlock, &Tmp);
     1110            pWait->fPendingWakeUp = false;
     1111            if (!pWait->fFreeMe)
     1112            {
     1113                RTListNodeRemove(&pWait->ListNode);
     1114                RTListAppend(&pDevExt->WokenUpList, &pWait->ListNode);
     1115            }
     1116            else
     1117            {
     1118                pWait->fFreeMe = false;
     1119                VBoxGuestWaitFreeLocked(pDevExt, pWait);
     1120            }
     1121        }
     1122        RTSpinlockReleaseNoInts(pDevExt->EventSpinlock, &Tmp);
     1123    }
     1124}
     1125#endif /* VBOXGUEST_USE_DEFERRED_WAKE_UP */
    11031126
    11041127
     
    11771200/**
    11781201 * Worker VBoxGuestCommonIOCtl_WaitEvent.
    1179  * The caller enters the spinlock, we may or may not leave it.
     1202 *
     1203 * The caller enters the spinlock, we leave it.
    11801204 *
    11811205 * @returns VINF_SUCCESS if we've left the spinlock and can return immediately.
     
    11981222        return VINF_SUCCESS;
    11991223    }
     1224    RTSpinlockReleaseNoInts(pDevExt->EventSpinlock, pTmp);
    12001225    return VERR_TIMEOUT;
    12011226}
     
    12341259    if (rc == VINF_SUCCESS)
    12351260        return rc;
    1236     RTSpinlockReleaseNoInts(pDevExt->EventSpinlock, &Tmp);
    12371261
    12381262    if (!pInfo->u32TimeoutIn)
     
    12541278     */
    12551279    RTSpinlockAcquireNoInts(pDevExt->EventSpinlock, &Tmp);
     1280    RTListAppend(&pDevExt->WaitList, &pWait->ListNode);
    12561281    rc = WaitEventCheckCondition(pDevExt, pInfo, iEvent, fReqEvents, &Tmp);
    12571282    if (rc == VINF_SUCCESS)
     
    12601285        return rc;
    12611286    }
    1262     VBoxGuestWaitAppend(&pDevExt->WaitList, pWait);
    1263     RTSpinlockReleaseNoInts(pDevExt->EventSpinlock, &Tmp);
    12641287
    12651288    if (fInterruptible)
     
    12821305     */
    12831306    RTSpinlockAcquireNoInts(pDevExt->EventSpinlock, &Tmp);
    1284     VBoxGuestWaitUnlink(&pDevExt->WaitList, pWait);
    12851307    fResEvents = pWait->fResEvents;
    12861308    VBoxGuestWaitFreeLocked(pDevExt, pWait);
     
    13331355{
    13341356    RTSPINLOCKTMP           Tmp   = RTSPINLOCKTMP_INITIALIZER;
    1335 #if defined(RT_OS_SOLARIS)
    1336     RTTHREADPREEMPTSTATE    State = RTTHREADPREEMPTSTATE_INITIALIZER;
     1357    PVBOXGUESTWAIT          pWait;
     1358    PVBOXGUESTWAIT          pSafe;
     1359    int                     rc = 0;
     1360
     1361    Log(("VBoxGuestCommonIOCtl: CANCEL_ALL_WAITEVENTS\n"));
     1362
     1363    /*
     1364     * Walk the event list and wake up anyone with a matching session.
     1365     */
     1366    RTSpinlockAcquireNoInts(pDevExt->EventSpinlock, &Tmp);
     1367    RTListForEachSafe(&pDevExt->WaitList, pWait, pSafe, VBOXGUESTWAIT, ListNode)
     1368    {
     1369        if (pWait->pSession == pSession)
     1370        {
     1371            pWait->fResEvents = UINT32_MAX;
     1372            RTListNodeRemove(&pWait->ListNode);
     1373#ifdef VBOXGUEST_USE_DEFERRED_WAKE_UP
     1374            RTListAppend(&pDevExt->WakeUpList, &pWait->ListNode);
     1375#else
     1376            rc |= RTSemEventMultiSignal(pWait->Event);
     1377            RTListAppend(&pDevExt->WokenUpList, &pWait->ListNode);
    13371378#endif
    1338     PVBOXGUESTWAIT          pWait;
    1339     int                     rc = 0;
    1340 
    1341     Log(("VBoxGuestCommonIOCtl: CANCEL_ALL_WAITEVENTS\n"));
    1342 
    1343     /*
    1344      * Walk the event list and wake up anyone with a matching session.
    1345      *
    1346      * Note! On Solaris we have to do really ugly stuff here because
    1347      *       RTSemEventMultiSignal cannot be called with interrupts disabled.
    1348      *       The hack is racy, but what we can we do... (Eliminate this
    1349      *       termination hack, perhaps?)
    1350      */
    1351 #if defined(RT_OS_SOLARIS)
    1352     RTThreadPreemptDisable(&State);
    1353     RTSpinlockAcquireNoInts(pDevExt->EventSpinlock, &Tmp);
    1354     do
    1355     {
    1356         for (pWait = pDevExt->WaitList.pHead; pWait; pWait = pWait->pNext)
    1357             if (    pWait->pSession   == pSession
    1358                 &&  pWait->fResEvents != UINT32_MAX)
    1359             {
    1360                 RTSEMEVENTMULTI hEvent = pWait->Event;
    1361                 pWait->fResEvents = UINT32_MAX;
    1362                 RTSpinlockReleaseNoInts(pDevExt->EventSpinlock, &Tmp);
    1363                 /* HACK ALRET! This races wakeup + reuse! */
    1364                 rc |= RTSemEventMultiSignal(hEvent);
    1365                 RTSpinlockAcquireNoInts(pDevExt->EventSpinlock, &Tmp);
    1366                 break;
    1367             }
    1368     } while (pWait);
     1379        }
     1380    }
    13691381    RTSpinlockReleaseNoInts(pDevExt->EventSpinlock, &Tmp);
    1370     RTThreadPreemptDisable(&State);
    1371 #else
    1372     RTSpinlockAcquireNoInts(pDevExt->EventSpinlock, &Tmp);
    1373     for (pWait = pDevExt->WaitList.pHead; pWait; pWait = pWait->pNext)
    1374         if (pWait->pSession == pSession)
    1375         {
    1376             pWait->fResEvents = UINT32_MAX;
    1377             rc |= RTSemEventMultiSignal(pWait->Event);
    1378         }
    1379     RTSpinlockReleaseNoInts(pDevExt->EventSpinlock, &Tmp);
     1382    Assert(rc == 0);
     1383
     1384#ifdef VBOXGUEST_USE_DEFERRED_WAKE_UP
     1385    VBoxGuestWaitDoWakeUps(pDevExt);
    13801386#endif
    1381     Assert(rc == 0);
    13821387
    13831388    return VINF_SUCCESS;
     
    15301535     */
    15311536    RTSpinlockAcquireNoInts(pDevExt->EventSpinlock, &Tmp);
     1537    RTListAppend(&pDevExt->HGCMWaitList, &pWait->ListNode);
    15321538    if ((pHdr->fu32Flags & VBOX_HGCM_REQ_DONE) != 0)
    15331539    {
     
    15361542        return VINF_SUCCESS;
    15371543    }
    1538     VBoxGuestWaitAppend(&pDevExt->HGCMWaitList, pWait);
    15391544    RTSpinlockReleaseNoInts(pDevExt->EventSpinlock, &Tmp);
    15401545
     
    15551560        LogRel(("VBoxGuestHGCMAsyncWaitCallback: wait failed! %Rrc\n", rc));
    15561561
    1557     RTSpinlockAcquireNoInts(pDevExt->EventSpinlock, &Tmp);
    1558     VBoxGuestWaitUnlink(&pDevExt->HGCMWaitList, pWait);
    1559     VBoxGuestWaitFreeLocked(pDevExt, pWait);
    1560     RTSpinlockReleaseNoInts(pDevExt->EventSpinlock, &Tmp);
     1562    VBoxGuestWaitFreeUnlocked(pDevExt, pWait);
    15611563    return rc;
    15621564}
     
    22612263    /*
    22622264     * Enter the spinlock and check if it's our IRQ or not.
    2263      *
    2264      * Note! Solaris cannot do RTSemEventMultiSignal with interrupts disabled
    2265      *       so we're entering the spinlock without disabling them.  This works
    2266      *       fine as long as we never called in a nested fashion.
    2267      */
    2268 #if defined(RT_OS_SOLARIS)
    2269     RTSpinlockAcquire(pDevExt->EventSpinlock, &Tmp);
    2270 #else
     2265     */
    22712266    RTSpinlockAcquireNoInts(pDevExt->EventSpinlock, &Tmp);
    2272 #endif
    22732267    fOurIrq = pDevExt->pVMMDevMemory->V.V1_04.fHaveEvents;
    22742268    if (fOurIrq)
     
    22872281            uint32_t        fEvents = pReq->events;
    22882282            PVBOXGUESTWAIT  pWait;
     2283            PVBOXGUESTWAIT  pSafe;
    22892284
    22902285            Log(("VBoxGuestCommonISR: acknowledge events succeeded %#RX32\n", fEvents));
     
    23052300            if (fEvents & VMMDEV_EVENT_HGCM)
    23062301            {
    2307                 for (pWait = pDevExt->HGCMWaitList.pHead; pWait; pWait = pWait->pNext)
    2308                     if (    !pWait->fResEvents
    2309                         &&  (pWait->pHGCMReq->fu32Flags & VBOX_HGCM_REQ_DONE))
     2302                RTListForEachSafe(&pDevExt->HGCMWaitList, pWait, pSafe, VBOXGUESTWAIT, ListNode)
     2303                {
     2304                    if (pWait->pHGCMReq->fu32Flags & VBOX_HGCM_REQ_DONE)
    23102305                    {
    23112306                        pWait->fResEvents = VMMDEV_EVENT_HGCM;
     2307                        RTListNodeRemove(&pWait->ListNode);
     2308# ifdef VBOXGUEST_USE_DEFERRED_WAKE_UP
     2309                        RTListAppend(&pDevExt->WakeUpList, &pWait->ListNode);
     2310# else
     2311                        RTListAppend(&pDevExt->WokenUpList, &pWait->ListNode);
    23122312                        rc |= RTSemEventMultiSignal(pWait->Event);
     2313# endif
    23132314                    }
     2315                }
    23142316                fEvents &= ~VMMDEV_EVENT_HGCM;
    23152317            }
     
    23202322             */
    23212323            fEvents |= pDevExt->f32PendingEvents;
    2322             for (pWait = pDevExt->WaitList.pHead; pWait; pWait = pWait->pNext)
     2324            RTListForEachSafe(&pDevExt->HGCMWaitList, pWait, pSafe, VBOXGUESTWAIT, ListNode)
     2325            {
    23232326                if (    (pWait->fReqEvents & fEvents)
    23242327                    &&  !pWait->fResEvents)
     
    23262329                    pWait->fResEvents = pWait->fReqEvents & fEvents;
    23272330                    fEvents &= ~pWait->fResEvents;
     2331                    RTListNodeRemove(&pWait->ListNode);
     2332#ifdef VBOXGUEST_USE_DEFERRED_WAKE_UP
     2333                    RTListAppend(&pDevExt->WakeUpList, &pWait->ListNode);
     2334#else
     2335                    RTListAppend(&pDevExt->WokenUpList, &pWait->ListNode);
    23282336                    rc |= RTSemEventMultiSignal(pWait->Event);
     2337#endif
    23292338                    if (!fEvents)
    23302339                        break;
    23312340                }
     2341            }
    23322342            ASMAtomicWriteU32(&pDevExt->f32PendingEvents, fEvents);
    23332343        }
     
    23392349        LogFlow(("VBoxGuestCommonISR: not ours\n"));
    23402350
     2351    RTSpinlockReleaseNoInts(pDevExt->EventSpinlock, &Tmp);
     2352
     2353#if defined(VBOXGUEST_USE_DEFERRED_WAKE_UP) && !defined(RT_OS_WINDOWS)
     2354    /*
     2355     * Do wake-ups.
     2356     * Note. On Windows this isn't possible at this IRQL, so a DPC will take
     2357     *       care of it.
     2358     */
     2359    VBoxGuestWaitDoWakeUps(pDevExt);
     2360#endif
     2361
    23412362    /*
    23422363     * Work the poll and async notification queues on OSes that implements that.
    2343      * Do this outside the spinlock to prevent some recursive spinlocking.
    2344      */
    2345 #if defined(RT_OS_SOLARIS)
    2346     RTSpinlockRelease(pDevExt->EventSpinlock, &Tmp);
    2347 #else
    2348     RTSpinlockReleaseNoInts(pDevExt->EventSpinlock, &Tmp);
    2349 #endif
    2350 
     2364     * (Do this outside the spinlock to prevent some recursive spinlocking.)
     2365     */
    23512366    if (fMousePositionChanged)
    23522367    {
  • trunk/src/VBox/Additions/common/VBoxGuest/VBoxGuestInternal.h

    r32283 r32449  
    2020
    2121#include <iprt/types.h>
     22#include <iprt/list.h>
    2223#include <iprt/semaphore.h>
    2324#include <iprt/spinlock.h>
     
    2627#include <VBox/VBoxGuestLib.h>
    2728
     29/** @def VBOXGUEST_USE_WAKE_UP_LIST
     30 * Defer wake-up of waiting thread when defined. */
     31#if defined(RT_OS_SOLARIS) || defined(RT_OS_WINDOWS) || defined(DOXYGEN_RUNNING)
     32# define VBOXGUEST_USE_DEFERRED_WAKE_UP
     33#endif
     34
    2835
    2936/** Pointer to the VBoxGuest per session data. */
     
    4148typedef struct VBOXGUESTWAIT
    4249{
    43     /** The next entry in the list. */
    44     PVBOXGUESTWAIT volatile     pNext;
    45     /** The previous entry in the list. */
    46     PVBOXGUESTWAIT volatile     pPrev;
    47     /** The event semaphore. */
    48     RTSEMEVENTMULTI             Event;
     50    /** The list node. */
     51    RTLISTNODE                  ListNode;
    4952    /** The events we are waiting on. */
    5053    uint32_t                    fReqEvents;
    5154    /** The events we received. */
    5255    uint32_t volatile           fResEvents;
     56#ifdef VBOXGUEST_USE_DEFERRED_WAKE_UP
     57    /** Set by VBoxGuestWaitDoWakeUps before leaving the spinlock to call
     58     *  RTSemEventMultiSignal. */
     59    bool volatile               fPendingWakeUp;
     60    /** Set by the requestor thread if it got the spinlock before the
     61     * signaller.  Deals with the race in VBoxGuestWaitDoWakeUps. */
     62    bool volatile               fFreeMe;
     63#endif
     64    /** The event semaphore. */
     65    RTSEMEVENTMULTI             Event;
    5366    /** The session that's waiting. */
    5467    PVBOXGUESTSESSION           pSession;
     
    5871#endif
    5972} VBOXGUESTWAIT;
    60 
    61 /**
    62  * VBox guest wait for event list.
    63  */
    64 typedef struct VBOXGUESTWAITLIST
    65 {
    66     /** The head. */
    67     PVBOXGUESTWAIT volatile     pHead;
    68     /** The tail. */
    69     PVBOXGUESTWAIT volatile     pTail;
    70 } VBOXGUESTWAITLIST;
    71 /** Pointer to a wait list. */
    72 typedef VBOXGUESTWAITLIST *PVBOXGUESTWAITLIST;
    7373
    7474
     
    122122    RTCCPHYS                    PhysIrqAckEvents;
    123123    /** Wait-for-event list for threads waiting for multiple events. */
    124     VBOXGUESTWAITLIST           WaitList;
     124    RTLISTNODE                  WaitList;
    125125#ifdef VBOX_WITH_HGCM
    126126    /** Wait-for-event list for threads waiting on HGCM async completion.
    127127     * The entire list is evaluated upon the arrival of an HGCM event, unlike
    128128     * the other lists which are only evaluated till the first thread has been woken up. */
    129     VBOXGUESTWAITLIST           HGCMWaitList;
    130 #endif
     129    RTLISTNODE                  HGCMWaitList;
     130#endif
     131#ifdef VBOXGUEST_USE_DEFERRED_WAKE_UP
     132    /** List of wait-for-event entries that needs waking up. */
     133    RTLISTNODE                  WakeUpList;
     134#endif
     135    /** List of wait-for-event entries that has been woken up. */
     136    RTLISTNODE                  WokenUpList;
    131137    /** List of free wait-for-event entries. */
    132     VBOXGUESTWAITLIST           FreeList;
     138    RTLISTNODE                  FreeList;
    133139    /** Mask of pending events. */
    134140    uint32_t volatile           f32PendingEvents;
     
    217223int  VBoxGuestReinitDevExtAfterHibernation(PVBOXGUESTDEVEXT pDevExt, VBOXOSTYPE enmOSType);
    218224int  VBoxGuestSetGuestCapabilities(uint32_t fOr, uint32_t fNot);
     225#ifdef VBOXGUEST_USE_DEFERRED_WAKE_UP
     226void VBoxGuestWaitDoWakeUps(PVBOXGUESTDEVEXT pDevExt);
     227#endif
    219228
    220229int  VBoxGuestCreateUserSession(PVBOXGUESTDEVEXT pDevExt, PVBOXGUESTSESSION *ppSession);
  • trunk/src/VBox/Additions/common/VBoxGuest/freebsd/files_vboxguest

    r32394 r32449  
    3232    ${PATH_ROOT}/include/iprt/handletable.h=>include/iprt/handletable.h \
    3333    ${PATH_ROOT}/include/iprt/initterm.h=>include/iprt/initterm.h \
     34    ${PATH_ROOT}/include/iprt/list.h=>include/iprt/list.h \
    3435    ${PATH_ROOT}/include/iprt/lockvalidator.h=>include/iprt/lockvalidator.h \
    3536    ${PATH_ROOT}/include/iprt/log.h=>include/iprt/log.h \
  • trunk/src/VBox/Additions/common/VBoxGuest/linux/files_vboxguest

    r32404 r32449  
    3232    ${PATH_ROOT}/include/iprt/heap.h=>include/iprt/heap.h \
    3333    ${PATH_ROOT}/include/iprt/initterm.h=>include/iprt/initterm.h \
     34    ${PATH_ROOT}/include/iprt/list.h=>include/iprt/list.h \
    3435    ${PATH_ROOT}/include/iprt/lockvalidator.h=>include/iprt/lockvalidator.h \
    3536    ${PATH_ROOT}/include/iprt/log.h=>include/iprt/log.h \
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