/*
* 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.
#endif
start_info_ptr = (start_info_t *)par;
- start_kernel((start_info_t *)par);
+ start_kernel();
}
void arch_pre_suspend(void)
#define MAX_CMDLINE_SIZE 1024
extern char cmdline[MAX_CMDLINE_SIZE];
-void start_kernel(void* par);
+void start_kernel(void);
void pre_suspend(void);
void post_suspend(int canceled);
void do_exit(void) __attribute__((noreturn));
#include <mini-os/hypervisor.h>
-void init_shutdown(start_info_t *si);
+void init_shutdown(void);
void fini_shutdown(void);
void kernel_suspend(void);
return 0;
}
-void start_kernel(void* par)
+void start_kernel(void)
{
/* Set up events. */
init_events();
#ifdef CONFIG_XENBUS
/* Init shutdown thread */
- init_shutdown((start_info_t *)par);
+ init_shutdown();
#endif
/* Call (possibly overridden) app_main() */
#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";
}
}
-void init_shutdown(start_info_t *si)
+void init_shutdown(void)
{
- start_info_ptr = si;
-
end_shutdown_thread = 0;
create_thread("shutdown", shutdown_thread, NULL);
}
/*
* This hypercall returns 1 if the suspend
* was cancelled and 0 if resuming in a new domain
+ *
+ * TODO Fix this for ARM
*/
rc = HYPERVISOR_suspend(virt_to_mfn(start_info_ptr));