From f8ff013e3cc737b92b5a140dfd0ddcc5ab6773d9 Mon Sep 17 00:00:00 2001 From: Michael Bebenita Date: Fri, 27 Aug 2010 18:26:36 -0700 Subject: Added a few utility classes, cleaned up the include order of .h files, and started to make the Rust kernel own domain message queues rather than the Rust domains themselves. --- src/rt/rust_kernel.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 src/rt/rust_kernel.h (limited to 'src/rt/rust_kernel.h') 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 domains; + synchronized_indexed_list > 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 */ -- cgit 1.4.1-3-g733a5