| OLD | NEW | 
|---|
| 1 /* | 1 /* | 
| 2  * Copyright 2015 Google Inc. | 2  * Copyright 2015 Google Inc. | 
| 3  * | 3  * | 
| 4  * Use of this source code is governed by a BSD-style license that can be | 4  * Use of this source code is governed by a BSD-style license that can be | 
| 5  * found in the LICENSE file. | 5  * found in the LICENSE file. | 
| 6  */ | 6  */ | 
| 7 | 7 | 
| 8 #include "SkSharedMutex.h" | 8 #include "SkSharedMutex.h" | 
| 9 | 9 | 
| 10 #include "../private/SkAtomics.h" | 10 #include "SkAtomics.h" | 
| 11 #include "SkTypes.h" | 11 #include "SkTypes.h" | 
| 12 #include "../private/SkSemaphore.h" | 12 #include "../private/SkSemaphore.h" | 
| 13 | 13 | 
| 14 #if defined(THREAD_SANITIZER) | 14 #if defined(THREAD_SANITIZER) | 
| 15 | 15 | 
| 16 /* Report that a lock has been created at address "lock". */ | 16 /* Report that a lock has been created at address "lock". */ | 
| 17 #define ANNOTATE_RWLOCK_CREATE(lock) \ | 17 #define ANNOTATE_RWLOCK_CREATE(lock) \ | 
| 18     AnnotateRWLockCreate(__FILE__, __LINE__, lock) | 18     AnnotateRWLockCreate(__FILE__, __LINE__, lock) | 
| 19 | 19 | 
| 20 /* Report that the lock at address "lock" is about to be destroyed. */ | 20 /* Report that the lock at address "lock" is about to be destroyed. */ | 
| (...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 349 | 349 | 
| 350         // If shared count is going to zero (because the old count == 1) and the
     re are exclusive | 350         // If shared count is going to zero (because the old count == 1) and the
     re are exclusive | 
| 351         // waiters, then run a single exclusive waiter. | 351         // waiters, then run a single exclusive waiter. | 
| 352         if (((oldQueueCounts & kSharedMask) >> kSharedOffset) == 1 | 352         if (((oldQueueCounts & kSharedMask) >> kSharedOffset) == 1 | 
| 353             && (oldQueueCounts & kWaitingExclusiveMask) > 0) { | 353             && (oldQueueCounts & kWaitingExclusiveMask) > 0) { | 
| 354             fExclusiveQueue.signal(); | 354             fExclusiveQueue.signal(); | 
| 355         } | 355         } | 
| 356     } | 356     } | 
| 357 | 357 | 
| 358 #endif | 358 #endif | 
| OLD | NEW | 
|---|