39 lines
795 B
C
39 lines
795 B
C
//---
|
|
// fxBoot:hypervisor:gint - Gint workaround
|
|
//---
|
|
#if 0
|
|
#include "fxBoot/hypervisor.h"
|
|
|
|
#include <gint/atomic.h>
|
|
#include <gint/drivers.h>
|
|
|
|
/* external symbols */
|
|
extern void *kernel_env_casio;
|
|
extern void *kernel_env_gint;
|
|
|
|
/* gint_switch_to_casio(): Restore Casio's environment */
|
|
void gint_switch_to_casio(void)
|
|
{
|
|
drivers_wait();
|
|
drivers_switch(kernel_env_gint, kernel_env_casio);
|
|
//hypervisor_install();
|
|
}
|
|
|
|
/* gint_switch_to_gint(): Restore Gint's environment */
|
|
void gint_switch_to_gint(void)
|
|
{
|
|
drivers_wait();
|
|
drivers_switch(kernel_env_casio, kernel_env_gint);
|
|
//hypervisor_install();
|
|
}
|
|
|
|
/* gint_switch(): Temporarily switch out of gint */
|
|
void gint_switch(void (*function)(void))
|
|
{
|
|
gint_switch_to_casio();
|
|
if(function != NULL)
|
|
function();
|
|
gint_switch_to_gint();
|
|
}
|
|
#endif
|