diff options
| author | Julian Blake Kongslie | 2022-06-25 19:30:03 -0700 |
|---|---|---|
| committer | Julian Blake Kongslie | 2022-06-25 19:30:03 -0700 |
| commit | 1ecef319d7c8a07073fb37c3b88e3ccce8c94c97 (patch) | |
| tree | e08c68a34be268febf6e2d999ea420e21ae34a7b | |
| parent | Reorganize Makefile. (diff) | |
| download | issim-1ecef319d7c8a07073fb37c3b88e3ccce8c94c97.tar.xz | |
Remove aisa::suspend() which was trivial.
Diffstat (limited to '')
| -rw-r--r-- | aisa/coroutine.h | 2 | ||||
| -rw-r--r-- | aisa/eval.h | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/aisa/coroutine.h b/aisa/coroutine.h index 40a6982..a456c89 100644 --- a/aisa/coroutine.h +++ b/aisa/coroutine.h | |||
| @@ -4,8 +4,6 @@ | |||
| 4 | 4 | ||
| 5 | namespace aisa { | 5 | namespace aisa { |
| 6 | 6 | ||
| 7 | inline auto suspend() noexcept { return std::suspend_always{}; } | ||
| 8 | |||
| 9 | template<typename result_t> struct promise; | 7 | template<typename result_t> struct promise; |
| 10 | 8 | ||
| 11 | template<typename result_t> struct task : public std::coroutine_handle<promise<result_t>> { | 9 | template<typename result_t> struct task : public std::coroutine_handle<promise<result_t>> { |
diff --git a/aisa/eval.h b/aisa/eval.h index f97740c..6d65520 100644 --- a/aisa/eval.h +++ b/aisa/eval.h | |||
| @@ -1,5 +1,7 @@ | |||
| 1 | #pragma once | 1 | #pragma once |
| 2 | 2 | ||
| 3 | #include <coroutine> | ||
| 4 | |||
| 3 | #include "aisa/aisa.h" | 5 | #include "aisa/aisa.h" |
| 4 | 6 | ||
| 5 | namespace aisa { | 7 | namespace aisa { |
| @@ -12,7 +14,7 @@ namespace aisa { | |||
| 12 | while (true) { | 14 | while (true) { |
| 13 | if (auto rv = crtp().load_reg(rn); rv.has_value()) | 15 | if (auto rv = crtp().load_reg(rn); rv.has_value()) |
| 14 | co_return *rv; | 16 | co_return *rv; |
| 15 | co_await suspend(); | 17 | co_await std::suspend_always{}; |
| 16 | } | 18 | } |
| 17 | } | 19 | } |
| 18 | 20 | ||
| @@ -21,7 +23,7 @@ namespace aisa { | |||
| 21 | while (true) { | 23 | while (true) { |
| 22 | if (crtp().store_reg(rn, rv)) | 24 | if (crtp().store_reg(rn, rv)) |
| 23 | co_return; | 25 | co_return; |
| 24 | co_await suspend(); | 26 | co_await std::suspend_always{}; |
| 25 | } | 27 | } |
| 26 | } | 28 | } |
| 27 | 29 | ||
