VirtualBox

Ignore:
Timestamp:
Nov 8, 2023 1:31:55 PM (18 months ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
160072
Message:

libs/xpcom/xpcom: Convert some code from using PRLock to IPRT's RTSEMFASTMUTEX locks, bugref:10545

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/libs/xpcom18a4/xpcom/base/nsTraceRefcntImpl.cpp

    r101828 r101975  
    101101#include "prmem.h"
    102102
    103 #include "prlock.h"
    104 
    105 static PRLock* gTraceLock;
    106 
    107 #define LOCK_TRACELOG()   PR_Lock(gTraceLock)
    108 #define UNLOCK_TRACELOG() PR_Unlock(gTraceLock)
     103#include <iprt/assert.h>
     104#include <iprt/errcore.h>
     105#include <iprt/semaphore.h>
     106
     107static RTSEMFASTMUTEX gTraceLock = NIL_RTSEMFASTMUTEX;
     108
     109#define LOCK_TRACELOG()   RTSemFastMutexRequest(gTraceLock)
     110#define UNLOCK_TRACELOG() RTSemFastMutexRelease(gTraceLock)
    109111
    110112static PLHashTable* gBloatView;
     
    828830  }
    829831
    830   gTraceLock = PR_NewLock();
     832  int vrc = RTSemFastMutexCreate(&gTraceLock);
     833  AssertRC(vrc); RT_NOREF(vrc);
    831834}
    832835
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