[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] mini-os: Use a single start_info_ptr variable



Signed-off-by: Costin Lupu <costin.lupu@xxxxxxxxx>
---
 arch/x86/setup.c | 2 +-
 shutdown.c       | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/x86/setup.c b/arch/x86/setup.c
index 4fd8e39..2ba74fb 100644
--- a/arch/x86/setup.c
+++ b/arch/x86/setup.c
@@ -45,7 +45,7 @@ union start_info_union start_info_union;
 /*
  * This pointer holds a reference to the copy of the start_info struct.
  */
-static start_info_t *start_info_ptr;
+start_info_t *start_info_ptr;
 
 /*
  * Shared page for communicating with the hypervisor.
diff --git a/shutdown.c b/shutdown.c
index 4c0b13c..4d0617f 100644
--- a/shutdown.c
+++ b/shutdown.c
@@ -46,7 +46,7 @@
 #include <mini-os/xmalloc.h>
 
 
-static start_info_t *start_info_ptr;
+extern start_info_t *start_info_ptr;
 
 #ifdef CONFIG_XENBUS
 static const char *path = "control/shutdown";
@@ -113,7 +113,7 @@ static void shutdown_thread(void *p)
 
 void init_shutdown(start_info_t *si)
 {
-    start_info_ptr = si;
+    ASSERT(start_info_ptr == si);
 
     end_shutdown_thread = 0;
     create_thread("shutdown", shutdown_thread, NULL);
-- 
2.20.1




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.