[Mutex] Make less dumb
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user