summaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorGravatar bunnei2021-02-05 23:00:43 -0800
committerGravatar GitHub2021-02-05 23:00:43 -0800
commit1498a7c9a84037d7c78ff21b3bc996622269db43 (patch)
tree0fb418f721db6e307fb7105cc57fe3a2eec7d0bf /src/common
parentMerge pull request #5875 from lioncash/identifier (diff)
parenthle: kernel: Drop R_UNLESS_NOLOG in favor of expanded if-statement. (diff)
downloadyuzu-1498a7c9a84037d7c78ff21b3bc996622269db43.tar.gz
yuzu-1498a7c9a84037d7c78ff21b3bc996622269db43.tar.xz
yuzu-1498a7c9a84037d7c78ff21b3bc996622269db43.zip
Merge pull request #5862 from bunnei/kevent
Kernel Rework: Refactor KEvent/KReadableEvent/KWritableEvent
Diffstat (limited to 'src/common')
-rw-r--r--src/common/scope_exit.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/common/scope_exit.h b/src/common/scope_exit.h
index fa46cb394..35dac3a8f 100644
--- a/src/common/scope_exit.h
+++ b/src/common/scope_exit.h
@@ -49,3 +49,9 @@ ScopeExitHelper<Func> ScopeExit(Func&& func) {
49 * \endcode 49 * \endcode
50 */ 50 */
51#define SCOPE_EXIT(body) auto CONCAT2(scope_exit_helper_, __LINE__) = detail::ScopeExit([&]() body) 51#define SCOPE_EXIT(body) auto CONCAT2(scope_exit_helper_, __LINE__) = detail::ScopeExit([&]() body)
52
53/**
54 * This macro is similar to SCOPE_EXIT, except the object is caller managed. This is intended to be
55 * used when the caller might want to cancel the ScopeExit.
56 */
57#define SCOPE_GUARD(body) detail::ScopeExit([&]() body)