| Index: components/shared_memory_seqlock/one_writer_seqlock_unittest.cc
|
| diff --git a/content/common/one_writer_seqlock_unittest.cc b/components/shared_memory_seqlock/one_writer_seqlock_unittest.cc
|
| similarity index 87%
|
| rename from content/common/one_writer_seqlock_unittest.cc
|
| rename to components/shared_memory_seqlock/one_writer_seqlock_unittest.cc
|
| index a72ab5d3b7be3a652b8f1078f5b46c40f72ace6a..10c69777c70392acdaee955d4826c90edd189f2c 100644
|
| --- a/content/common/one_writer_seqlock_unittest.cc
|
| +++ b/components/shared_memory_seqlock/one_writer_seqlock_unittest.cc
|
| @@ -2,7 +2,7 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#include "content/common/one_writer_seqlock.h"
|
| +#include "components/shared_memory_seqlock/one_writer_seqlock.h"
|
|
|
| #include <stdlib.h>
|
|
|
| @@ -23,10 +23,9 @@ class BasicSeqLockTestThread : public PlatformThread::Delegate {
|
| public:
|
| BasicSeqLockTestThread() {}
|
|
|
| - void Init(
|
| - content::OneWriterSeqLock* seqlock,
|
| - TestData* data,
|
| - base::subtle::Atomic32* ready) {
|
| + void Init(shared_memory_seqlock::OneWriterSeqLock* seqlock,
|
| + TestData* data,
|
| + base::subtle::Atomic32* ready) {
|
| seqlock_ = seqlock;
|
| data_ = data;
|
| ready_ = ready;
|
| @@ -52,7 +51,7 @@ class BasicSeqLockTestThread : public PlatformThread::Delegate {
|
| }
|
|
|
| private:
|
| - content::OneWriterSeqLock* seqlock_;
|
| + shared_memory_seqlock::OneWriterSeqLock* seqlock_;
|
| TestData* data_;
|
| base::AtomicRefCount* ready_;
|
|
|
| @@ -60,8 +59,8 @@ class BasicSeqLockTestThread : public PlatformThread::Delegate {
|
| };
|
|
|
| TEST(OneWriterSeqLockTest, ManyThreads) {
|
| - content::OneWriterSeqLock seqlock;
|
| - TestData data = { 0, 0, 0 };
|
| + shared_memory_seqlock::OneWriterSeqLock seqlock;
|
| + TestData data = {0, 0, 0};
|
| base::AtomicRefCount ready = 0;
|
|
|
| ANNOTATE_BENIGN_RACE_SIZED(&data, sizeof(data), "Racey reads are discarded");
|
|
|