use core::cell::OnceCell;
use crate::uuid::Uuid;
use core::panic::PanicInfo;
pub static mut GLOBAL_PROCESS_START_INFO: OnceCell< ProcessStartInfo> = OnceCell::new();
pub struct ProcessStartInfo {
pub processId: Uuid,
pub debugPrint: extern "win64" fn(&str),
pub debugPrintInt: extern "win64" fn(u64),
pub debugPrintUuid: extern "win64" fn(Uuid),
pub debugPanicRust: extern "win64" fn(&PanicInfo),
pub allocate: extern "win64" fn(size: u64, align: u64) -> u64,
pub syscallSync: extern "win64" fn(usize) -> usize,
}
impl ProcessStartInfo {
pub fn init(info: ProcessStartInfo) {
unsafe {
GLOBAL_PROCESS_START_INFO = OnceCell::from(info);
}
}
}