| Index: third_party/WebKit/Source/web/tests/SpinLockTest.cpp
|
| diff --git a/third_party/WebKit/Source/web/tests/SpinLockTest.cpp b/third_party/WebKit/Source/web/tests/SpinLockTest.cpp
|
| index 18abef96e2ecfe6f7b0adb4d3fa976f61400979f..7806b5bb710660837a4542b76f17e509474a9d6f 100644
|
| --- a/third_party/WebKit/Source/web/tests/SpinLockTest.cpp
|
| +++ b/third_party/WebKit/Source/web/tests/SpinLockTest.cpp
|
| @@ -44,7 +44,7 @@ namespace blink {
|
|
|
| static const size_t bufferSize = 16;
|
|
|
| -static int lock = 0;
|
| +static SpinLock lock;
|
|
|
| static void fillBuffer(volatile char* buffer, char fillPattern)
|
| {
|
| @@ -69,9 +69,8 @@ static void changeAndCheckBuffer(volatile char* buffer)
|
| static void threadMain(volatile char* buffer)
|
| {
|
| for (int i = 0; i < 500000; ++i) {
|
| - spinLockLock(&lock);
|
| + SpinLock::Guard guard(lock);
|
| changeAndCheckBuffer(buffer);
|
| - spinLockUnlock(&lock);
|
| }
|
| }
|
|
|
|
|