Minor fixes

Libmixer: additional patterns
This commit is contained in:
Nekotekina 2014-03-29 02:50:05 +04:00
parent 70cc2494aa
commit 689c41ccb3
9 changed files with 316 additions and 102 deletions

View file

@ -21,7 +21,7 @@ template
<
typename T,
u64 free_value = 0,
u64 dead_value = ~0,
u64 dead_value = 0xffffffff,
void (*wait)() = SM_Sleep
>
class SMutexBase
@ -139,7 +139,7 @@ class SMutexLockerBase
public:
const T tid;
SMutexLockerBase(SMutexBase<T>& _sm)
__forceinline SMutexLockerBase(SMutexBase<T>& _sm)
: sm(_sm)
, tid(get_tid())
{
@ -155,7 +155,7 @@ public:
sm.lock(tid);
}
~SMutexLockerBase()
__forceinline ~SMutexLockerBase()
{
if (tid) sm.unlock(tid);
}