about summary refs log tree commit diff
path: root/src/rt/rust_kernel.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/rt/rust_kernel.h')
-rw-r--r--src/rt/rust_kernel.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/rt/rust_kernel.h b/src/rt/rust_kernel.h
new file mode 100644
index 00000000000..478d030c177
--- /dev/null
+++ b/src/rt/rust_kernel.h
@@ -0,0 +1,21 @@
+#ifndef RUST_KERNEL_H
+#define RUST_KERNEL_H
+
+/**
+ * A global object shared by all domains.
+ */
+class rust_kernel {
+    memory_region &_region;
+    rust_log _log;
+public:
+    synchronized_indexed_list<rust_dom> domains;
+    synchronized_indexed_list<lock_free_queue<rust_message*> > message_queues;
+    rust_kernel(rust_srv *srv);
+    void register_domain(rust_dom *dom);
+    void deregister_domain(rust_dom *dom);
+    void log_all_domain_state();
+    void log(uint32_t type_bits, char const *fmt, ...);
+    virtual ~rust_kernel();
+};
+
+#endif /* RUST_KERNEL_H */