Mutex fix

This commit is contained in:
plutoo 2017-11-26 20:45:55 +01:00
parent de52de8e88
commit 40dd1adc23

View File

@ -49,13 +49,12 @@ void mutexUnlock(Mutex* m) {
} }
void rmutexLock(RMutex* m) { void rmutexLock(RMutex* m) {
if (m->thread_tag == _GetTag()) { if (m->thread_tag != _GetTag()) {
m->counter++;
}
else {
mutexLock(&m->lock); mutexLock(&m->lock);
m->thread_tag = _GetTag(); m->thread_tag = _GetTag();
} }
m->counter++;
} }
void rmutexUnlock(RMutex* m) { void rmutexUnlock(RMutex* m) {