Changeset 34991 in webkit for trunk/JavaScriptCore/kjs/JSLock.cpp
- Timestamp:
- Jul 3, 2008, 5:06:11 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/kjs/JSLock.cpp
r34990 r34991 49 49 50 50 // Lock nesting count. 51 ssize_t JSLock::lockCount()52 { 53 pthread_once(&createJSLockCountOnce, createJSLockCount); 54 55 return reinterpret_cast< ssize_t>(pthread_getspecific(JSLockCount));56 } 57 58 static void setLockCount( ssize_t count)51 intptr_t JSLock::lockCount() 52 { 53 pthread_once(&createJSLockCountOnce, createJSLockCount); 54 55 return reinterpret_cast<intptr_t>(pthread_getspecific(JSLockCount)); 56 } 57 58 static void setLockCount(intptr_t count) 59 59 { 60 60 ASSERT(count >= 0); … … 80 80 pthread_once(&createJSLockCountOnce, createJSLockCount); 81 81 82 ssize_t currentLockCount = lockCount();82 intptr_t currentLockCount = lockCount(); 83 83 if (!currentLockCount && lockForReal) { 84 84 int result; … … 99 99 #endif 100 100 101 ssize_t newLockCount = lockCount() - 1;101 intptr_t newLockCount = lockCount() - 1; 102 102 setLockCount(newLockCount); 103 103 if (!newLockCount && lockForReal) { … … 135 135 136 136 m_lockCount = JSLock::lockCount(); 137 for ( ssize_t i = 0; i < m_lockCount; i++)137 for (intptr_t i = 0; i < m_lockCount; i++) 138 138 JSLock::unlock(m_lockingForReal); 139 139 } … … 148 148 149 149 m_lockCount = JSLock::lockCount(); 150 for ( ssize_t i = 0; i < m_lockCount; i++)150 for (intptr_t i = 0; i < m_lockCount; i++) 151 151 JSLock::unlock(m_lockingForReal); 152 152 } … … 154 154 JSLock::DropAllLocks::~DropAllLocks() 155 155 { 156 for ( ssize_t i = 0; i < m_lockCount; i++)156 for (intptr_t i = 0; i < m_lockCount; i++) 157 157 JSLock::lock(m_lockingForReal); 158 158 } … … 167 167 // If threading support is off, set the lock count to a constant value of 1 so assertions 168 168 // that the lock is held don't fail 169 ssize_t JSLock::lockCount()169 intptr_t JSLock::lockCount() 170 170 { 171 171 return 1;
Note:
See TracChangeset
for help on using the changeset viewer.