Skip to content

Commit 0c8af22

Browse files
authored
♻️ Re-organize modules & rename uptr to stack_word (#85)
1 parent 5cd5f1e commit 0c8af22

10 files changed

Lines changed: 2166 additions & 2171 deletions

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ libhal_project_init()
2424
libhal_add_library(async_context
2525
MODULES
2626
modules/async_context.cppm
27+
modules/coroutine.cppm
2728
modules/schedulers.cppm)
2829
libhal_apply_compile_options(async_context)
2930
libhal_install_library(async_context NAMESPACE libhal)

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ performance.
2727
#include <thread>
2828

2929
import async_context;
30-
import async_context.schedulers;
3130

3231
using namespace std::chrono_literals;
3332

@@ -108,7 +107,10 @@ int main()
108107

109108
// Drive all three contexts to completion.
110109
// run_until_done sleeps until the nearest time deadline when all contexts
111-
// are blocked, and wakes immediately when any context becomes ready.
110+
// are blocked.
111+
//
112+
// NOTE: A proper wake function should wake immediately when any context
113+
// becomes ready, where as this one sleeps until it is awoken.
112114
async::chrono_clock_adapter<std::chrono::steady_clock> clk;
113115
async::run_until_done(
114116
clk,
@@ -244,7 +246,7 @@ The base context class that manages coroutine execution and memory. Contexts
244246
are initialized with stack memory via their constructor:
245247

246248
```cpp
247-
std::array<async::uptr, 1024> my_stack{};
249+
std::array<async::stack_word, 1024> my_stack{};
248250
async::context ctx(my_stack);
249251
```
250252

0 commit comments

Comments
 (0)