mirror of
https://github.com/bkaradzic/bx.git
synced 2026-02-18 04:53:06 +01:00
Cleanup.
This commit is contained in:
@@ -29,7 +29,7 @@ namespace bx
|
||||
|
||||
void push(Ty* _ptr) // producer only
|
||||
{
|
||||
LwMutexScope lock(m_write);
|
||||
MutexScope lock(m_write);
|
||||
m_queue.push(_ptr);
|
||||
}
|
||||
|
||||
|
||||
@@ -57,28 +57,6 @@ namespace bx
|
||||
Mutex& m_mutex;
|
||||
};
|
||||
|
||||
typedef Mutex LwMutex;
|
||||
|
||||
///
|
||||
class LwMutexScope
|
||||
{
|
||||
BX_CLASS(LwMutexScope
|
||||
, NO_DEFAULT_CTOR
|
||||
, NO_COPY
|
||||
, NO_ASSIGNMENT
|
||||
);
|
||||
|
||||
public:
|
||||
///
|
||||
LwMutexScope(LwMutex& _mutex);
|
||||
|
||||
///
|
||||
~LwMutexScope();
|
||||
|
||||
private:
|
||||
LwMutex& m_mutex;
|
||||
};
|
||||
|
||||
} // namespace bx
|
||||
|
||||
#include "mutex.inl"
|
||||
|
||||
@@ -20,15 +20,4 @@ namespace bx
|
||||
m_mutex.unlock();
|
||||
}
|
||||
|
||||
inline LwMutexScope::LwMutexScope(LwMutex& _mutex)
|
||||
: m_mutex(_mutex)
|
||||
{
|
||||
m_mutex.lock();
|
||||
}
|
||||
|
||||
inline LwMutexScope::~LwMutexScope()
|
||||
{
|
||||
m_mutex.unlock();
|
||||
}
|
||||
|
||||
} // namespace bx
|
||||
|
||||
Reference in New Issue
Block a user