macros: call xous::init() at init-time

This allows for hooking things like the panic handler.

Signed-off-by: Sean Cross <sean@xobs.io>
This commit is contained in:
Sean Cross 2020-10-29 19:39:34 +08:00
parent ef33cc577f
commit ca32e4f9c1

View file

@ -94,8 +94,10 @@ pub fn xous_main(args: TokenStream, input: TokenStream) -> TokenStream {
#[export_name = "xous_entry"]
#(#attrs)*
pub #unsafety fn #hash() -> ! {
xous::init();
#(#stmts)*
}
xous::maybe_main!();
);
r.into()