mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-20 09:03:28 +00:00
services: log-server: use create_thread_1()
This moves away from the deprecated `create_thread_simple()` call. Signed-off-by: Sean Cross <sean@xobs.io>
This commit is contained in:
parent
5410d62ef5
commit
4cbfe5f90f
1 changed files with 4 additions and 3 deletions
|
|
@ -224,7 +224,8 @@ fn handle_scalar(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn reader_thread(mut output: implementation::OutputWriter) {
|
fn reader_thread(arg: usize) {
|
||||||
|
let mut output = unsafe { &mut *(arg as *mut implementation::OutputWriter) };
|
||||||
writeln!(output, "LOG: Xous Logging Server starting up...").unwrap();
|
writeln!(output, "LOG: Xous Logging Server starting up...").unwrap();
|
||||||
|
|
||||||
writeln!(output, "LOG: ****************************************************************").unwrap();
|
writeln!(output, "LOG: ****************************************************************").unwrap();
|
||||||
|
|
@ -331,10 +332,10 @@ fn some_main() -> ! {
|
||||||
*/
|
*/
|
||||||
|
|
||||||
let mut output = implementation::init();
|
let mut output = implementation::init();
|
||||||
let writer = output.get_writer();
|
let mut writer = output.get_writer();
|
||||||
println!("LOG: my PID is {}", xous::process::id());
|
println!("LOG: my PID is {}", xous::process::id());
|
||||||
println!("LOG: Creating the reader thread");
|
println!("LOG: Creating the reader thread");
|
||||||
xous::create_thread_simple(reader_thread, writer).unwrap();
|
xous::create_thread_1(reader_thread, &mut writer as *mut implementation::OutputWriter as usize).unwrap();
|
||||||
println!("LOG: Running the output");
|
println!("LOG: Running the output");
|
||||||
output.run();
|
output.run();
|
||||||
panic!("LOG: Exited");
|
panic!("LOG: Exited");
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue