forked from AbleOS/ableos
mini size fixes
This commit is contained in:
parent
5d152811b2
commit
f6a8a78b6c
|
@ -1,7 +1,5 @@
|
|||
//! Environment call handling routines
|
||||
|
||||
use log::log;
|
||||
|
||||
use {alloc::boxed::Box, core::cell::LazyCell, hbvm::mem::Address};
|
||||
|
||||
use crate::{
|
||||
|
@ -244,13 +242,16 @@ pub fn handler(vm: &mut Vm, pid: &usize) {
|
|||
vm.registers[3] = x
|
||||
}
|
||||
}
|
||||
6 => { // Wait till interrupt
|
||||
6 => {
|
||||
// Wait till interrupt
|
||||
use crate::kmain::EXECUTOR;
|
||||
let interrupt_type = vm.registers[3].cast::<u8>();
|
||||
info!("Interrupt subscribled: {}", interrupt_type);
|
||||
unsafe {
|
||||
EXECUTOR.pause(pid.clone());
|
||||
LazyCell::<Executor>::get_mut(&mut EXECUTOR).unwrap().interrupt_subscribe(pid.clone(), interrupt_type);
|
||||
LazyCell::<Executor>::get_mut(&mut EXECUTOR)
|
||||
.unwrap()
|
||||
.interrupt_subscribe(pid.clone(), interrupt_type);
|
||||
}
|
||||
}
|
||||
_ => {
|
||||
|
|
|
@ -35,9 +35,10 @@ mod task;
|
|||
mod utils;
|
||||
|
||||
// #[cfg(feature = "tests")]
|
||||
#[allow(improper_ctypes, non_upper_case_globals)]
|
||||
mod ktest;
|
||||
|
||||
use {alloc::string::ToString, versioning::Version};
|
||||
use versioning::Version;
|
||||
|
||||
/// Kernel's version
|
||||
pub const VERSION: Version = Version {
|
||||
|
@ -49,6 +50,7 @@ pub const VERSION: Version = Version {
|
|||
#[panic_handler]
|
||||
#[cfg(target_os = "none")]
|
||||
fn panic(info: &core::panic::PanicInfo) -> ! {
|
||||
use alloc::string::ToString;
|
||||
arch::register_dump();
|
||||
|
||||
if let Some(loc) = info.location() {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
sleep := @use("../../../libraries/stn/src/sleep.hb")
|
||||
log := @use("../../../libraries/stn/src/log.hb")
|
||||
|
||||
main := fn(): int {
|
||||
main := fn(): void {
|
||||
log.info("BEFORE\0")
|
||||
sleep.sleep_until_interrupt(32)
|
||||
log.info("AFTER\0")
|
||||
|
|
Loading…
Reference in a new issue