From 92524557952ee9de12b7deb381043eddb4471cd3 Mon Sep 17 00:00:00 2001 From: bunnie Date: Wed, 20 Jan 2021 14:57:40 +0800 Subject: [PATCH] fix Gid passing issue to status thread --- services/gam/src/main.rs | 2 +- services/gam/src/status.rs | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/services/gam/src/main.rs b/services/gam/src/main.rs index b5e32ef64..994f29a3c 100644 --- a/services/gam/src/main.rs +++ b/services/gam/src/main.rs @@ -159,7 +159,7 @@ fn xmain() -> ! { canvases = recompute_canvases(canvases, Rectangle::new(Point::new(0, 0), screensize)); // make a thread to manage the status bar - xous::create_thread_simple(status_thread, chatlayout.status).expect("GAM: couldn't create status thread"); + xous::create_thread_simple(status_thread, chatlayout.status.gid()).expect("GAM: couldn't create status thread"); let mut last_time: u64 = ticktimer_server::elapsed_ms(ticktimer_conn).unwrap(); info!("GAM: entering main loop"); diff --git a/services/gam/src/status.rs b/services/gam/src/status.rs index bb97297ad..c5a890d20 100644 --- a/services/gam/src/status.rs +++ b/services/gam/src/status.rs @@ -7,7 +7,9 @@ use graphics_server::*; use core::fmt::Write; use core::convert::TryFrom; -pub fn status_thread(status_gid: Gid) { +pub fn status_thread(canvas_gid: [u32; 4]) { + let status_gid: Gid = Gid::new(canvas_gid); + info!("GAM|status: registering GAM|status thread"); let status_sid = xous_names::register_name(xous::names::SERVER_NAME_STATUS).expect("GAM|status: can't register server");