mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-04-07 14:45:41 +12:00
[Mutex] Make less dumb
This commit is contained in:
parent
91e008ad1d
commit
2ebbb08766
2 changed files with 1 additions and 2 deletions
|
@ -177,7 +177,7 @@ struct Mutex {
|
|||
u32 lockCount; // Number of times this mutex has been locked by its daddy. 0 = not locked
|
||||
bool locked;
|
||||
|
||||
Mutex(bool lock = false) : locked(lock), waitlist(0), lockCount(0) {}
|
||||
Mutex(bool lock = false) : locked(lock), waitlist(0), lockCount(lock ? 1 : 0) {}
|
||||
};
|
||||
|
||||
struct Semaphore {
|
||||
|
|
|
@ -169,7 +169,6 @@ Handle Kernel::makeMutex(bool locked) {
|
|||
if (locked) {
|
||||
Mutex* moo = objects[ret].getData<Mutex>();
|
||||
moo->ownerThread = currentThreadIndex;
|
||||
moo->lockCount = 1;
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
|
Loading…
Add table
Reference in a new issue