diff options
Diffstat (limited to 'src/user/raleigh/runtime.cpp')
-rw-r--r-- | src/user/raleigh/runtime.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
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 <raleigh/runtime.h> +#include <raleigh/window.h> +#include <pland/pcrt.h> + +namespace raleigh { + dllist<window &> open_windows; + + __attribute__ ((noreturn)) + void start_runtime() { + while (1) { + if (!open_windows.first) + __pcrt_quit(); + for (dllist<window &>::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 |