From 406af09ade55553e2b064506c3ba3c89bd965d73 Mon Sep 17 00:00:00 2001 From: Benji Dial Date: Thu, 4 Mar 2021 19:11:42 -0500 Subject: start of a c++ widget toolkit, c++ runtime --- src/user/raleigh/runtime.cpp | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 src/user/raleigh/runtime.cpp (limited to 'src/user/raleigh/runtime.cpp') diff --git a/src/user/raleigh/runtime.cpp b/src/user/raleigh/runtime.cpp new file mode 100644 index 0000000..1152575 --- /dev/null +++ b/src/user/raleigh/runtime.cpp @@ -0,0 +1,21 @@ +#include +#include +#include + +namespace raleigh { + dllist open_windows; + + __attribute__ ((noreturn)) + void start_runtime() { + while (1) { + if (!open_windows.first) + __pcrt_quit(); + for (dllist::node *w = open_windows.first; w; w = w->next) + if (w->d.try_actions() == window::DELETE) + if (!(w = open_windows.remove_in_place(w))) + break; + _wait_for_action(); + _yield_task(); + } + } +} \ No newline at end of file -- cgit v1.2.3