add PID printout to every service as it starts

This commit is contained in:
bunnie 2021-02-15 19:16:21 +08:00
parent 2a46f541f2
commit 07b3dd9afa
12 changed files with 12 additions and 1 deletions

View file

@ -11,6 +11,7 @@ use log::{error, info};
#[xous::xous_main]
fn xmain() -> ! {
log_server::init_wait().unwrap();
info!("BENCHTARGET: my PID is {}", xous::process::id());
let bench_sid = xous_names::register_name(xous::names::SERVER_NAME_BENCHMARK).expect("BENCHTARGET: can't register server");
info!("BENCHTARGET: registered with NS -- {:?}", bench_sid);

View file

@ -90,6 +90,7 @@ fn stopwatch_thread(_arg: xous::SID) {
#[xous::xous_main]
fn shell_main() -> ! {
log_server::init_wait().unwrap();
info!("BENCHMARK: my PID is {}", xous::process::id());
info!("BENCHMARK: ticktimer");
let ticktimer_server_id = xous::SID::from_bytes(b"ticktimer-server").unwrap();

View file

@ -244,6 +244,7 @@ fn xmain() -> ! {
use rkyv::{archived_value_mut, Unarchive};
log_server::init_wait().unwrap();
info!("COM: my PID is {}", xous::process::id());
let com_sid = xous_names::register_name(xous::names::SERVER_NAME_COM).expect("COM: can't register server");
info!("COM: registered with NS -- {:?}", com_sid);

View file

@ -448,6 +448,7 @@ pub union sl_wfx_indication_data_u {
#[xous::xous_main]
fn xmain() -> ! {
log_server::init_wait().unwrap();
print!("FCCAGENT: my PID is {}", xous::process::id());
let ticktimer_server_id = xous::SID::from_bytes(b"ticktimer-server").unwrap();
let ticktimer_conn = xous::connect(ticktimer_server_id).unwrap();

View file

@ -137,6 +137,7 @@ fn tv_draw(gfx_conn: xous::CID, trng_conn: xous::CID, canvases: &mut FnvIndexMap
#[xous::xous_main]
fn xmain() -> ! {
log_server::init_wait().unwrap();
info!("GAM: my PID is {}", xous::process::id());
let gam_sid = xous_names::register_name(xous::names::SERVER_NAME_GAM).expect("GAM: can't register server");
info!("GAM: starting up...");

View file

@ -30,6 +30,7 @@ fn draw_boot_logo(display: &mut XousDisplay) {
#[xous::xous_main]
fn xmain() -> ! {
log_server::init_wait().unwrap();
info!("GFX: my PID is {}", xous::process::id());
// Create a new monochrome simulator display.
let mut display = XousDisplay::new();

View file

@ -797,6 +797,7 @@ fn xmain() -> ! {
use crate::implementation::Keyboard;
log_server::init_wait().unwrap();
info!("KBD: my PID is {}", xous::process::id());
let kbd_sid = xous_names::register_name(xous::names::SERVER_NAME_KBD).expect("KBD: can't register server");
info!("KBD: registered with NS -- {:?}", kbd_sid);

View file

@ -347,6 +347,7 @@ fn xmain() -> ! {
use heapless::consts::*;
log_server::init_wait().unwrap();
info!("LLIO: my PID is {}", xous::process::id());
let llio_sid = xous_names::register_name(xous::names::SERVER_NAME_LLIO).expect("LLIO: can't register server");
info!("LLIO: registered with NS -- {:?}", llio_sid);

View file

@ -329,6 +329,7 @@ fn some_main() -> ! {
let mut output = implementation::init();
let writer = output.get_writer();
println!("LOG: my PID is {}", xous::process::id());
println!("LOG: Creating the reader thread");
xous::create_thread_simple(reader_thread, writer).unwrap();
println!("LOG: Running the output");

View file

@ -155,8 +155,8 @@ fn event_thread(_arg: usize) {
#[xous::xous_main]
fn shell_main() -> ! {
log_server::init_wait().unwrap();
info!("SHELL: my PID is {}", xous::process::id());
info!("SHELL: ticktimer");
let ticktimer_server_id = xous::SID::from_bytes(b"ticktimer-server").unwrap();
let ticktimer_conn = xous::connect(ticktimer_server_id).unwrap();

View file

@ -151,6 +151,7 @@ fn xmain() -> ! {
use crate::implementation::Trng;
log_server::init_wait().unwrap();
info!("TRNG: my PID is {}", xous::process::id());
let trng_sid = xous_names::register_name(xous::names::SERVER_NAME_TRNG).expect("TRNG: can't register server");
info!("TRNG: registered with NS -- {:?}", trng_sid);

View file

@ -18,6 +18,7 @@ const FAIL_TIMEOUT_MS: u64 = 100;
#[xous::xous_main]
fn xmain() -> ! {
log_server::init_wait().unwrap();
info!("NS: my PID is {}", xous::process::id());
let name_server = xous::create_server_with_address(b"xous-name-server")
.expect("Couldn't create xousnames-server");