diff options
author | bunnei <ericbunnie@gmail.com> | 2014-05-21 05:23:58 +0200 |
---|---|---|
committer | bunnei <ericbunnie@gmail.com> | 2014-05-21 05:23:58 +0200 |
commit | eb537c560a33db9955413a96afd3b98203a729fe (patch) | |
tree | 6bb55926f3b811a578a2680b0cd454476a144244 /src/core/hle/kernel/mutex.cpp | |
parent | mutex: initial commit of HLE module (diff) | |
download | yuzu-eb537c560a33db9955413a96afd3b98203a729fe.tar yuzu-eb537c560a33db9955413a96afd3b98203a729fe.tar.gz yuzu-eb537c560a33db9955413a96afd3b98203a729fe.tar.bz2 yuzu-eb537c560a33db9955413a96afd3b98203a729fe.tar.lz yuzu-eb537c560a33db9955413a96afd3b98203a729fe.tar.xz yuzu-eb537c560a33db9955413a96afd3b98203a729fe.tar.zst yuzu-eb537c560a33db9955413a96afd3b98203a729fe.zip |
Diffstat (limited to 'src/core/hle/kernel/mutex.cpp')
-rw-r--r-- | src/core/hle/kernel/mutex.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/core/hle/kernel/mutex.cpp b/src/core/hle/kernel/mutex.cpp index 2b2cff4ea..7cf3439e9 100644 --- a/src/core/hle/kernel/mutex.cpp +++ b/src/core/hle/kernel/mutex.cpp @@ -102,7 +102,7 @@ Result ReleaseMutex(Handle handle) { * @param handle Reference to handle for the newly created mutex * @param initial_locked Specifies if the mutex should be locked initially */ -Result CreateMutex(Handle& handle, bool initial_locked) { +Mutex* CreateMutex(Handle& handle, bool initial_locked) { Mutex* mutex = new Mutex; handle = Kernel::g_object_pool.Create(mutex); @@ -116,7 +116,17 @@ Result CreateMutex(Handle& handle, bool initial_locked) { } else { mutex->lock_thread = -1; } - return 0; + return mutex; +} + +/** + * Creates a mutex + * @param initial_locked Specifies if the mutex should be locked initially + */ +Handle CreateMutex(bool initial_locked) { + Handle handle; + Mutex* mutex = CreateMutex(handle, initial_locked); + return handle; } } // namespace |