kill SpinLock
It is unused (and not implemented on OSX) so killing it seems good. It was introduced in rFBCODEe991769c74e876f345e2cd92edf1d970801e884b with no users.
Esse commit está contido em:
@@ -206,42 +206,6 @@ public:
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
class SpinLock {
|
||||
#ifdef DEBUG
|
||||
Rank m_rank;
|
||||
#endif
|
||||
public:
|
||||
explicit SpinLock(Rank rank = RankUnranked)
|
||||
#ifdef DEBUG
|
||||
: m_rank(rank)
|
||||
#endif
|
||||
{
|
||||
pthread_spin_init(&m_spinlock, 0);
|
||||
}
|
||||
~SpinLock() {
|
||||
pthread_spin_destroy(&m_spinlock);
|
||||
}
|
||||
|
||||
void lock() {
|
||||
pushRank(m_rank);
|
||||
pthread_spin_lock(&m_spinlock);
|
||||
}
|
||||
void unlock() {
|
||||
popRank(m_rank);
|
||||
pthread_spin_unlock(&m_spinlock);
|
||||
}
|
||||
|
||||
pthread_spinlock_t &getRaw() { return m_spinlock;}
|
||||
|
||||
private:
|
||||
SpinLock(const SpinLock &); // suppress
|
||||
SpinLock &operator=(const SpinLock &); // suppress
|
||||
|
||||
pthread_spinlock_t m_spinlock;
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/**
|
||||
* Read-write lock wrapper.
|
||||
*/
|
||||
|
||||
Referência em uma Nova Issue
Bloquear um usuário