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) {
if (m->thread_tag == _GetTag()) {
m->counter++;
}
else {
if (m->thread_tag != _GetTag()) {
mutexLock(&m->lock);
m->thread_tag = _GetTag();
}
m->counter++;
}
void rmutexUnlock(RMutex* m) {