mirror of
https://github.com/godotengine/godot.git
synced 2025-01-30 21:33:18 +08:00
WorkerThreadPool: Fix wrong pointer used in the case of BinaryMutex
This commit is contained in:
parent
811ce36c60
commit
f2f9a6b8a1
@ -427,7 +427,7 @@ void WorkerThreadPool::_lock_unlockable_mutexes() {
|
||||
if ((((uintptr_t)unlockable_mutexes[i]) & 1) == 0) {
|
||||
((Mutex *)unlockable_mutexes[i])->lock();
|
||||
} else {
|
||||
((BinaryMutex *)unlockable_mutexes[i])->lock();
|
||||
((BinaryMutex *)(unlockable_mutexes[i] & ~1))->lock();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -441,7 +441,7 @@ void WorkerThreadPool::_unlock_unlockable_mutexes() {
|
||||
if ((((uintptr_t)unlockable_mutexes[i]) & 1) == 0) {
|
||||
((Mutex *)unlockable_mutexes[i])->unlock();
|
||||
} else {
|
||||
((BinaryMutex *)unlockable_mutexes[i])->unlock();
|
||||
((BinaryMutex *)(unlockable_mutexes[i] & ~1))->unlock();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user