remove an unnecessary xns registration

This commit is contained in:
bunnie 2022-04-07 00:20:07 +08:00
parent 92c6a93147
commit c36d0d4111

View file

@ -30,7 +30,6 @@ use std::sync::atomic::{AtomicBool, Ordering};
)]
use std::thread;
const SERVER_NAME_STATUS: &str = "_Status bar manager_";
const SERVER_NAME_STATUS_GID: &str = "_Status bar GID receiver_";
#[derive(Debug, num_derive::FromPrimitive, num_derive::ToPrimitive)]
@ -138,10 +137,8 @@ fn xmain() -> ! {
log::trace!("|status: my canvas {:?}", status_gid);
log::debug!("|status: registering GAM|status thread");
// we have one connection, from the status main loop; but we make it with a local call, not using xns. so there's 0 in xns.
let status_sid = xns
.register_name(SERVER_NAME_STATUS, Some(0))
.expect("|status: can't register server");
let status_sid = xous::create_server().unwrap(); // completely private to this crate
// create a connection for callback hooks
let cb_cid = xous::connect(status_sid).unwrap();
unsafe { CB_TO_MAIN_CONN = Some(cb_cid) };