From 6269f68b038b05a35dd25575392e3a36a0edd9a5 Mon Sep 17 00:00:00 2001
From: Jeremy Soller <jackpot51@gmail.com>
Date: Wed, 31 Aug 2016 17:45:21 -0600
Subject: [PATCH] Fill in all exception and IRQ entries. Handle PIT, keyboard
 IRQs

---
 context/mod.rs | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/context/mod.rs b/context/mod.rs
index f563c051..c5daab2b 100644
--- a/context/mod.rs
+++ b/context/mod.rs
@@ -151,13 +151,11 @@ pub unsafe fn switch() {
         return;
     }
 
-    unsafe {
-        (&mut *from_ptr).running = false;
-        (&mut *to_ptr).running = true;
-        CONTEXT_ID.store((&mut *to_ptr).id, Ordering::SeqCst);
-        
-        (&mut *from_ptr).arch.switch_to(&mut (&mut *to_ptr).arch);
-    }
+    (&mut *from_ptr).running = false;
+    (&mut *to_ptr).running = true;
+    CONTEXT_ID.store((&mut *to_ptr).id, Ordering::SeqCst);
+
+    (&mut *from_ptr).arch.switch_to(&mut (&mut *to_ptr).arch);
 }
 
 /// A context, which identifies either a process or a thread
-- 
GitLab