Bug 592557 - Eliminate uses of PR_Atomic{Increment,Decrement} functions in favor of PR_ATOMIC_{INCREMENT,DECREMENT} macros. r=bsmedberg,gal

This commit is contained in:
Justin Lebar
2011-03-28 15:58:49 -04:00
parent 749b04e120
commit 02a6d6af4a
35 changed files with 101 additions and 89 deletions

View File

@@ -104,7 +104,7 @@ nsExceptionManager::nsExceptionManager(nsExceptionService *svc) :
{
/* member initializers and constructor code */
#ifdef NS_DEBUG
PR_AtomicIncrement(&totalInstances);
PR_ATOMIC_INCREMENT(&totalInstances);
#endif
}
@@ -112,7 +112,7 @@ nsExceptionManager::~nsExceptionManager()
{
/* destructor code */
#ifdef NS_DEBUG
PR_AtomicDecrement(&totalInstances);
PR_ATOMIC_DECREMENT(&totalInstances);
#endif // NS_DEBUG
}
@@ -160,7 +160,7 @@ nsExceptionService::nsExceptionService()
: mProviders(4, PR_TRUE) /* small, thread-safe hashtable */
{
#ifdef NS_DEBUG
if (PR_AtomicIncrement(&totalInstances)!=1) {
if (PR_ATOMIC_INCREMENT(&totalInstances)!=1) {
NS_ERROR("The nsExceptionService is a singleton!");
}
#endif
@@ -186,7 +186,7 @@ nsExceptionService::~nsExceptionService()
Shutdown();
/* destructor code */
#ifdef NS_DEBUG
PR_AtomicDecrement(&totalInstances);
PR_ATOMIC_DECREMENT(&totalInstances);
#endif
}