services: gam: use create_thread_4

This replaces create_thread_simple() which is unsound and has been
deprecated.

Signed-off-by: Sean Cross <sean@xobs.io>
This commit is contained in:
Sean Cross 2021-03-25 13:15:42 +08:00
parent 006101835e
commit 52c993556f
2 changed files with 5 additions and 3 deletions

View file

@ -224,7 +224,8 @@ fn xmain() -> ! {
if debugc{info!("GAM: chatlayout made st {:?} co {:?} pr {:?} in {:?}", chatlayout.status, chatlayout.content, chatlayout.predictive, chatlayout.input);}
// make a thread to manage the status bar -- this needs to start after the IMEF is initialized
// the status bar is a trusted element managed by the OS, and we are chosing to domicile this in the GAM process for now
xous::create_thread_simple(status_thread, chatlayout.status.gid()).expect("GAM: couldn't create status thread");
let gid = chatlayout.status.gid();
xous::create_thread_4(status_thread, gid[0] as _, gid[1] as _, gid[2] as _, gid[3] as _).expect("GAM: couldn't create status thread");
let mut powerdown_requested = false;
let mut last_time: u64 = ticktimer_server::elapsed_ms(ticktimer_conn).unwrap();

View file

@ -7,7 +7,8 @@ use core::convert::TryFrom;
use blitstr_ref as blitstr;
pub fn status_thread(canvas_gid: [u32; 4]) {
pub fn status_thread(canvas_gid_0: usize, canvas_gid_1: usize, canvas_gid_2: usize, canvas_gid_3: usize) {
let canvas_gid = [canvas_gid_0 as u32, canvas_gid_1 as u32, canvas_gid_2 as u32, canvas_gid_3 as u32];
let debug1 = false;
let status_gid: Gid = Gid::new(canvas_gid);
if debug1{info!("GAM|status: my canvas {:?}", status_gid)};
@ -114,4 +115,4 @@ pub fn status_thread(canvas_gid: [u32; 4]) {
}
}
}
}