diff options
| author | 2021-01-11 14:36:26 -0800 | |
|---|---|---|
| committer | 2021-01-11 14:36:26 -0800 | |
| commit | eb3cb54aa53e23af61afb9b7e35af28c9d37ae2a (patch) | |
| tree | 56a80760bd0ba8ecd85dc8d9f09fb9e2068c91d4 /src/common/common_funcs.h | |
| parent | Merge pull request #5229 from Morph1984/fullscreen-opt (diff) | |
| parent | hle: kernel: thread: Preserve thread wait reason for debugging only. (diff) | |
| download | yuzu-eb3cb54aa53e23af61afb9b7e35af28c9d37ae2a.tar.gz yuzu-eb3cb54aa53e23af61afb9b7e35af28c9d37ae2a.tar.xz yuzu-eb3cb54aa53e23af61afb9b7e35af28c9d37ae2a.zip | |
Merge pull request #5266 from bunnei/kernel-synch
Rewrite KSynchronizationObject, KConditonVariable, and KAddressArbiter
Diffstat (limited to '')
| -rw-r--r-- | src/common/common_funcs.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/common/common_funcs.h b/src/common/common_funcs.h index 367b6bf6e..c90978f9c 100644 --- a/src/common/common_funcs.h +++ b/src/common/common_funcs.h | |||
| @@ -93,6 +93,14 @@ __declspec(dllimport) void __stdcall DebugBreak(void); | |||
| 93 | return static_cast<T>(key) == 0; \ | 93 | return static_cast<T>(key) == 0; \ |
| 94 | } | 94 | } |
| 95 | 95 | ||
| 96 | /// Evaluates a boolean expression, and returns a result unless that expression is true. | ||
| 97 | #define R_UNLESS(expr, res) \ | ||
| 98 | { \ | ||
| 99 | if (!(expr)) { \ | ||
| 100 | return res; \ | ||
| 101 | } \ | ||
| 102 | } | ||
| 103 | |||
| 96 | namespace Common { | 104 | namespace Common { |
| 97 | 105 | ||
| 98 | [[nodiscard]] constexpr u32 MakeMagic(char a, char b, char c, char d) { | 106 | [[nodiscard]] constexpr u32 MakeMagic(char a, char b, char c, char d) { |