VirtualBox

Changeset 102058 in vbox


Ignore:
Timestamp:
Nov 10, 2023 7:56:37 AM (11 months ago)
Author:
vboxsync
Message:

libs/xpcom: Convert nsProxyEventObject to use a IPRT fast mutex instead of a PRMonitor, bugref:10545

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/libs/xpcom18a4/xpcom/proxy/src/nsProxyEventObject.cpp

    r101967 r102058  
    8989
    9090#ifdef DEBUG_xpcom_proxy
    91 static PRMonitor* mon = nsnull;
     91
     92#include <iprt/semaphore.h>
     93
     94static RTSEMFASTMUTEX g_hMtxDbg = NIL_RTSEMFASTMUTEX;
    9295static PRUint32 totalProxyObjects = 0;
    9396static PRUint32 outstandingProxyObjects = 0;
     
    97100{
    98101
    99     if (mon == nsnull)
     102    if (g_hMtxDbg == NIL_RTSEMFASTMUTEX)
    100103    {
    101         mon = PR_NewMonitor();
    102     }
    103 
    104     PR_EnterMonitor(mon);
     104        int vrc = RTSemFastMutexCreate(&g_hMtxDbg);
     105        AssertRC(vrc); RT_NOREF(vrc);
     106    }
     107
     108    RTSemFastMutexRequest(g_hMtxDbg);
    105109
    106110    if (message)
     
    153157        printf("-=-=-=-=-=-=-=-=-=-=-=-=-\n");
    154158
    155     PR_ExitMonitor(mon);
     159    RTSemFastMutexRelease(g_hMtxDbg);
    156160}
    157161#endif
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