Changeset 38673 in webkit for trunk/JavaScriptCore/wtf/TCSpinLock.h
- Timestamp:
- Nov 21, 2008, 1:20:41 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/wtf/TCSpinLock.h
r38672 r38673 47 47 #include <sys/types.h> 48 48 #endif 49 #include <stdlib.h> /* for abort() */50 49 51 50 #if PLATFORM(WIN_OS) … … 200 199 201 200 inline void Init() { 202 if (pthread_mutex_init(&private_lock_, NULL) != 0) abort();201 if (pthread_mutex_init(&private_lock_, NULL) != 0) CRASH(); 203 202 } 204 203 inline void Finalize() { 205 if (pthread_mutex_destroy(&private_lock_) != 0) abort();204 if (pthread_mutex_destroy(&private_lock_) != 0) CRASH(); 206 205 } 207 206 inline void Lock() { 208 if (pthread_mutex_lock(&private_lock_) != 0) abort();207 if (pthread_mutex_lock(&private_lock_) != 0) CRASH(); 209 208 } 210 209 inline void Unlock() { 211 if (pthread_mutex_unlock(&private_lock_) != 0) abort();210 if (pthread_mutex_unlock(&private_lock_) != 0) CRASH(); 212 211 } 213 212 };
Note:
See TracChangeset
for help on using the changeset viewer.