mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-24 09:53:24 +00:00
Implement new scheduling API in OSTD
This commit is contained in:
committed by
Tate, Hongliang Tian
parent
4844e7ca7c
commit
f5464e82c0
@ -129,7 +129,7 @@ pub fn call_ostd_main() -> ! {
|
||||
unsafe {
|
||||
use alloc::boxed::Box;
|
||||
|
||||
use crate::task::{set_scheduler, FifoScheduler, Scheduler, TaskOptions};
|
||||
use crate::task::TaskOptions;
|
||||
|
||||
crate::init();
|
||||
// The whitelists that will be generated by OSDK runner as static consts.
|
||||
@ -137,10 +137,6 @@ pub fn call_ostd_main() -> ! {
|
||||
static KTEST_TEST_WHITELIST: Option<&'static [&'static str]>;
|
||||
static KTEST_CRATE_WHITELIST: Option<&'static [&'static str]>;
|
||||
}
|
||||
// Set the global scheduler a FIFO scheduler.
|
||||
let simple_scheduler = Box::new(FifoScheduler::new());
|
||||
let static_scheduler: &'static dyn Scheduler = Box::leak(simple_scheduler);
|
||||
set_scheduler(static_scheduler);
|
||||
|
||||
let test_task = move || {
|
||||
run_ktests(KTEST_TEST_WHITELIST, KTEST_CRATE_WHITELIST);
|
||||
|
Reference in New Issue
Block a user