From 17a79e666b6714c5f7b1fdc46b25f7ecebc84886 Mon Sep 17 00:00:00 2001
From: Nadav Har'El <nyh@cloudius-systems.com>
Date: Wed, 22 May 2013 18:41:30 +0300
Subject: [PATCH] Use osv::hang() in abort()

abort() did the same thing as the new osv::hang(), so let's just use
osv::hang(). Note that it's important that osv::hang() doesn't print
anything - abort() does, but avoids infinite recursion that can happen
when abort()'s printing itself causes a crash, and another abort().
---
 runtime.cc | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/runtime.cc b/runtime.cc
index 07ee36a0c..1ee7f0f59 100644
--- a/runtime.cc
+++ b/runtime.cc
@@ -32,6 +32,7 @@
 #include "barrier.hh"
 #include "smp.hh"
 #include "bsd/sys/sys/sysctl.h"
+#include <osv/power.hh>
 
 #define __LC_LAST 13
 
@@ -87,9 +88,7 @@ void abort()
         debug("Aborted\n");
         already_aborted = true;
     }
-    crash_other_processors();
-    while (true)
-	processor::halt_no_interrupts();
+    osv::halt();
 }
 
 void __cxa_pure_virtual(void)
-- 
GitLab