mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-19 09:00:54 +00:00
os_timer: move preemption from shell to ticktimer server
This is responsible for preemption in the system. Move it to the timer server since it seems to make more sense to have there. Signed-off-by: Sean Cross <sean@xobs.io>
This commit is contained in:
parent
513b99f916
commit
684ba69a31
2 changed files with 79 additions and 74 deletions
|
|
@ -4,6 +4,8 @@
|
||||||
mod api;
|
mod api;
|
||||||
use api::Opcode;
|
use api::Opcode;
|
||||||
|
|
||||||
|
mod os_timer;
|
||||||
|
|
||||||
use core::convert::TryFrom;
|
use core::convert::TryFrom;
|
||||||
|
|
||||||
use heapless::binary_heap::{BinaryHeap, Min};
|
use heapless::binary_heap::{BinaryHeap, Min};
|
||||||
|
|
@ -260,6 +262,9 @@ fn recalculate_sleep(
|
||||||
|
|
||||||
#[xous::xous_main]
|
#[xous::xous_main]
|
||||||
fn xmain() -> ! {
|
fn xmain() -> ! {
|
||||||
|
// Start the OS timer which is responsible for setting up preemption.
|
||||||
|
os_timer::init();
|
||||||
|
|
||||||
log_server::init_wait().unwrap();
|
log_server::init_wait().unwrap();
|
||||||
|
|
||||||
// "Sleep" commands get put in here and are ordered as necessary
|
// "Sleep" commands get put in here and are ordered as necessary
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue