Acquire this SpinLock. TODO(csilvers): uncomment the annotation when we figure out how to support this macro with 0 args (see thread_annotations.h)
| 70 | // TODO(csilvers): uncomment the annotation when we figure out how to |
| 71 | // support this macro with 0 args (see thread_annotations.h) |
| 72 | inline void Lock() /*EXCLUSIVE_LOCK_FUNCTION()*/ { |
| 73 | if (base::subtle::Acquire_CompareAndSwap(&lockword_, kSpinLockFree, |
| 74 | kSpinLockHeld) != kSpinLockFree) { |
| 75 | SlowLock(); |
| 76 | } |
| 77 | ANNOTATE_RWLOCK_ACQUIRED(this, 1); |
| 78 | } |
| 79 | |
| 80 | // Try to acquire this SpinLock without blocking and return true if the |
| 81 | // acquisition was successful. If the lock was not acquired, false is |