Changeset 162777 in webkit for trunk/Source/JavaScriptCore/profiler/ProfilerDatabase.cpp
- Timestamp:
- Jan 25, 2014, 1:16:42 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/profiler/ProfilerDatabase.cpp
r156968 r162777 34 34 namespace JSC { namespace Profiler { 35 35 36 #if COMPILER(MINGW) || COMPILER(MSVC7_OR_LOWER) || OS(WINCE) 37 static int databaseCounter; 38 #else 39 static volatile int databaseCounter; 40 #endif 36 static std::atomic<int> databaseCounter; 37 41 38 static SpinLock registrationLock = SPINLOCK_INITIALIZER; 42 static intdidRegisterAtExit;39 static std::atomic<int> didRegisterAtExit; 43 40 static Database* firstDatabase; 44 41 45 42 Database::Database(VM& vm) 46 : m_databaseID( atomicIncrement(&databaseCounter))43 : m_databaseID(++databaseCounter) 47 44 , m_vm(vm) 48 45 , m_shouldSaveAtExit(false) … … 139 136 void Database::addDatabaseToAtExit() 140 137 { 141 if ( atomicIncrement(&didRegisterAtExit)== 1)138 if (++didRegisterAtExit == 1) 142 139 atexit(atExitCallback); 143 140
Note:
See TracChangeset
for help on using the changeset viewer.