rt: Add a stack check to upcall_get_type_desc

This commit is contained in:
Patrick Walton
2011-07-06 15:06:30 -07:00
parent 2f7bc90514
commit 91eb63eaee
3 changed files with 29 additions and 0 deletions

View File

@@ -121,6 +121,17 @@ rust_kernel::log(uint32_t level, char const *fmt, ...) {
va_end(args);
}
void
rust_kernel::fatal(char const *fmt, ...) {
char buf[BUF_BYTES];
va_list args;
va_start(args, fmt);
vsnprintf(buf, sizeof(buf), fmt, args);
_log.trace_ln(NULL, (uint32_t)0, buf);
exit(1);
va_end(args);
}
void
rust_kernel::pump_message_queues() {
for (size_t i = 0; i < message_queues.length(); i++) {