Remove unused RunLocker and related code

RunLocker was not used anywhere, and was the only instance of the
WriteLocker class.  Remove both.

llvm-svn: 186361
This commit is contained in:
Ed Maste 2013-07-15 22:59:08 +00:00
parent 7f98240df6
commit d591a24b86
2 changed files with 0 additions and 59 deletions

View File

@ -170,64 +170,6 @@ public:
DISALLOW_COPY_AND_ASSIGN(ReadLocker);
};
class WriteLocker
{
public:
WriteLocker () :
m_lock (NULL)
{
}
WriteLocker (ReadWriteLock &lock) :
m_lock (NULL)
{
Lock(&lock);
}
WriteLocker (ReadWriteLock *lock) :
m_lock (NULL)
{
Lock(lock);
}
~WriteLocker()
{
Unlock();
}
void
Lock (ReadWriteLock *lock)
{
if (m_lock)
{
if (m_lock == lock)
return; // We already have this lock locked
else
Unlock();
}
if (lock)
{
lock->WriteLock();
m_lock = lock;
}
}
void
Unlock ()
{
if (m_lock)
{
m_lock->WriteUnlock();
m_lock = NULL;
}
}
protected:
ReadWriteLock *m_lock;
private:
DISALLOW_COPY_AND_ASSIGN(WriteLocker);
};
protected:
pthread_rwlock_t m_rwlock;
private:

View File

@ -1393,7 +1393,6 @@ public:
// try to lock it to see if they can immediately access the stopped
// process. If the try read lock fails, then the process is running.
typedef ReadWriteLock::ReadLocker StopLocker;
typedef ReadWriteLock::WriteLocker RunLocker;
// These two functions fill out the Broadcaster interface: