mirror of
https://github.com/switchbrew/libnx.git
synced 2025-08-07 08:39:24 +02:00
Mutex fix
This commit is contained in:
parent
de52de8e88
commit
40dd1adc23
@ -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) {
|
||||||
|
Loading…
Reference in New Issue
Block a user