mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-15 08:30:02 +00:00
kernel: fix hosted mode exception support
Signed-off-by: Sean Cross <sean@xobs.io>
This commit is contained in:
parent
32eb3c202c
commit
fa2a841f8a
2 changed files with 4 additions and 3 deletions
|
|
@ -9,7 +9,8 @@ use std::net::TcpStream;
|
|||
use std::thread_local;
|
||||
use xous_kernel::{ProcessInit, ProcessKey, ThreadInit, PID, TID};
|
||||
|
||||
pub const INITIAL_TID: usize = 1;
|
||||
pub const INITIAL_TID: usize = 2;
|
||||
pub const EXCEPTION_TID: usize = 1;
|
||||
pub const MAX_PROCESS_COUNT: usize = 32;
|
||||
|
||||
pub struct Process {
|
||||
|
|
@ -241,7 +242,7 @@ impl Process {
|
|||
// }
|
||||
|
||||
/// Set the current context number.
|
||||
pub fn set_thread(&mut self, thread: TID) -> Result<(), xous_kernel::Error> {
|
||||
pub fn set_tid(&mut self, thread: TID) -> Result<(), xous_kernel::Error> {
|
||||
assert!(thread > 0);
|
||||
PROCESS_TABLE.with(|pt| {
|
||||
let mut process_table = pt.borrow_mut();
|
||||
|
|
|
|||
|
|
@ -250,7 +250,7 @@ std::thread_local!(static SYSTEM_SERVICES: core::cell::RefCell<SystemServices> =
|
|||
mapping: arch::mem::DEFAULT_MEMORY_MAPPING,
|
||||
current_thread: 0 as TID,
|
||||
previous_thread: INITIAL_TID as TID,
|
||||
exception_thread: None,
|
||||
exception_handler: None,
|
||||
}; MAX_PROCESS_COUNT],
|
||||
// Note we can't use MAX_SERVER_COUNT here because of how Rust's
|
||||
// macro tokenization works
|
||||
|
|
|
|||
Loading…
Reference in a new issue