diff options
author | bunnei <ericbunnie@gmail.com> | 2014-05-28 04:42:16 +0200 |
---|---|---|
committer | bunnei <ericbunnie@gmail.com> | 2014-05-28 04:42:16 +0200 |
commit | 2ed6652f100fdbc5ad7d72a0602dc2c99ef79cce (patch) | |
tree | d57f9249ca490d8b2d4cbff3708a4714becb2400 /src | |
parent | svc: implemented WaitSynchronization1, WaitSynchronizationN, and CreateEvent (diff) | |
download | yuzu-2ed6652f100fdbc5ad7d72a0602dc2c99ef79cce.tar yuzu-2ed6652f100fdbc5ad7d72a0602dc2c99ef79cce.tar.gz yuzu-2ed6652f100fdbc5ad7d72a0602dc2c99ef79cce.tar.bz2 yuzu-2ed6652f100fdbc5ad7d72a0602dc2c99ef79cce.tar.lz yuzu-2ed6652f100fdbc5ad7d72a0602dc2c99ef79cce.tar.xz yuzu-2ed6652f100fdbc5ad7d72a0602dc2c99ef79cce.tar.zst yuzu-2ed6652f100fdbc5ad7d72a0602dc2c99ef79cce.zip |
Diffstat (limited to 'src')
-rw-r--r-- | src/core/hle/kernel/mutex.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/core/hle/kernel/mutex.cpp b/src/core/hle/kernel/mutex.cpp index 17fd40acd..23c064571 100644 --- a/src/core/hle/kernel/mutex.cpp +++ b/src/core/hle/kernel/mutex.cpp @@ -31,6 +31,7 @@ public: */ Result SyncRequest(bool* wait) { // TODO(bunnei): ImplementMe + locked = true; return 0; } @@ -41,6 +42,7 @@ public: */ Result WaitSynchronization(bool* wait) { // TODO(bunnei): ImplementMe + *wait = locked; return 0; } }; @@ -111,6 +113,9 @@ bool ReleaseMutex(Mutex* mutex) { */ Result ReleaseMutex(Handle handle) { Mutex* mutex = Kernel::g_object_pool.GetFast<Mutex>(handle); + + _assert_msg_(KERNEL, mutex, "ReleaseMutex tried to release a NULL mutex!"); + if (!ReleaseMutex(mutex)) { return -1; } @@ -121,6 +126,7 @@ Result ReleaseMutex(Handle handle) { * Creates a mutex * @param handle Reference to handle for the newly created mutex * @param initial_locked Specifies if the mutex should be locked initially + * @return Pointer to new Mutex object */ Mutex* CreateMutex(Handle& handle, bool initial_locked) { Mutex* mutex = new Mutex; |