THRIFT-1459 declare shared_ptr as boost::shared_ptr
git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1213090 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/lib/cpp/test/RWMutexStarveTest.cpp b/lib/cpp/test/RWMutexStarveTest.cpp
index ca04e6e..8042d49 100644
--- a/lib/cpp/test/RWMutexStarveTest.cpp
+++ b/lib/cpp/test/RWMutexStarveTest.cpp
@@ -36,7 +36,7 @@
class Locker : public Runnable
{
protected:
- Locker(shared_ptr<ReadWriteMutex> rwlock, bool writer) :
+ Locker(boost::shared_ptr<ReadWriteMutex> rwlock, bool writer) :
rwlock_(rwlock), writer_(writer),
started_(false), gotLock_(false), signaled_(false) { }
@@ -61,7 +61,7 @@
void signal() { signaled_ = true; }
protected:
- shared_ptr<ReadWriteMutex> rwlock_;
+ boost::shared_ptr<ReadWriteMutex> rwlock_;
bool writer_;
volatile bool started_;
volatile bool gotLock_;
@@ -71,13 +71,13 @@
class Reader : public Locker
{
public:
- Reader(shared_ptr<ReadWriteMutex> rwlock) : Locker(rwlock, false) { }
+ Reader(boost::shared_ptr<ReadWriteMutex> rwlock) : Locker(rwlock, false) { }
};
class Writer : public Locker
{
public:
- Writer(shared_ptr<ReadWriteMutex> rwlock) : Locker(rwlock, true) { }
+ Writer(boost::shared_ptr<ReadWriteMutex> rwlock) : Locker(rwlock, true) { }
};
void test_starve(PosixThreadFactory::POLICY policy)
@@ -88,15 +88,15 @@
PosixThreadFactory factory(policy);
factory.setDetached(false);
- shared_ptr<ReadWriteMutex> rwlock(new NoStarveReadWriteMutex());
+ boost::shared_ptr<ReadWriteMutex> rwlock(new NoStarveReadWriteMutex());
- shared_ptr<Reader> reader1(new Reader(rwlock));
- shared_ptr<Reader> reader2(new Reader(rwlock));
- shared_ptr<Writer> writer(new Writer(rwlock));
+ boost::shared_ptr<Reader> reader1(new Reader(rwlock));
+ boost::shared_ptr<Reader> reader2(new Reader(rwlock));
+ boost::shared_ptr<Writer> writer(new Writer(rwlock));
- shared_ptr<Thread> treader1 = factory.newThread(reader1);
- shared_ptr<Thread> treader2 = factory.newThread(reader2);
- shared_ptr<Thread> twriter = factory.newThread(writer);
+ boost::shared_ptr<Thread> treader1 = factory.newThread(reader1);
+ boost::shared_ptr<Thread> treader2 = factory.newThread(reader2);
+ boost::shared_ptr<Thread> twriter = factory.newThread(writer);
// launch a reader and make sure he has the lock
treader1->start();