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:
parent
7f98240df6
commit
d591a24b86
|
@ -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:
|
||||
|
|
|
@ -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:
|
||||
|
||||
|
|
Loading…
Reference in New Issue